This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Building several apps, depending on given inputs | ||
on: | ||
workflow_call: | ||
inputs: | ||
sdk: | ||
description: | | ||
The type of SDK the apps use. Could be `c`, `rust` or `all` (defaults to `all`) | ||
required: false | ||
default: 'all' | ||
type: string | ||
sdk_reference: | ||
description: | | ||
Commit of the SDK to checkout. | ||
If not specified, use the current app-builder SDK versions | ||
required: false | ||
default: 'None' | ||
type: string | ||
devices: | ||
description: | | ||
The list of device(s) the CI will run on. If an app does not implement a device, it will be ignored. | ||
Defaults to the all the devices. | ||
required: false | ||
default: 'all' | ||
type: string | ||
jobs: | ||
call_get_apps_metadata: | ||
name: Rertieve applications metadata | ||
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_get_apps_metadata.yml | ||
with: | ||
sdk: ${{ inputs.sdk }} | ||
devices: ${{ inputs.devices }} | ||
build_applications: | ||
name: Build all selected applications using the reusable workflow | ||
needs: call_get_apps_metadata | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
app: ${{ fromJSON(needs.call_get_apps_metadata.outputs.apps_metadata) }} | ||
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_build.yml@v1 | ||
with: | ||
app_repository: ${{ matrix.app.repository }} | ||
run_for_devices: ${{ matrix.app.devices }} | ||
upload_app_binaries_artifact: ${{ matrix.app.name }} # else will colide with other matrix' jobs | ||
app_branch_name: ${{ matrix.app.default_branch }} # else takes the current repo default branch | ||
builder: ledger-app-builder # needed for Rust applications |