Add reusable workflow to build all apps #179
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: E2E testing of the reusable workflows | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
- main | |
- develop | |
pull_request: | |
# This workflow file contains the duplicates of several applications that use reusable workflows | |
# The duplication is unfortunate but can't be avoided as github actions do not (yet ?) accept the | |
# syntax 'uses: org/repo@${{ inputs.ref }}' | |
# | |
# Related tickets on Github org | |
# https://github.com/actions/runner/issues/1541 | |
# https://github.com/orgs/community/discussions/45342 | |
jobs: | |
################################## | |
######### Exchange tests ######### | |
################################## | |
build_sideloaded_applications_for_exchange: | |
name: Build sideloaded applications | |
strategy: | |
fail-fast: false | |
matrix: | |
coin: | |
- name: stellar | |
repo: 'LedgerHQ/app-stellar' | |
branch: 'develop' | |
- name: tezos | |
repo: 'LedgerHQ/app-tezos' | |
branch: 'develop' | |
- name: xrp | |
repo: 'LedgerHQ/app-xrp' | |
branch: 'develop' | |
- name: ethereum | |
repo: 'LedgerHQ/app-ethereum' | |
branch: 'develop' | |
- name: ethereum_classic | |
repo: 'LedgerHQ/app-ethereum' | |
branch: 'develop' | |
- name: litecoin | |
repo: 'LedgerHQ/app-bitcoin' | |
branch: 'develop' | |
- name: bitcoin_legacy | |
repo: 'LedgerHQ/app-bitcoin' | |
branch: 'develop' | |
- name: bitcoin | |
repo: 'LedgerHQ/app-bitcoin-new' | |
branch: 'develop' | |
- name: bitcoin | |
repo: 'LedgerHQ/app-bitcoin-new' | |
branch: 'nanos' | |
- name: solana | |
repo: 'LedgerHQ/app-solana' | |
branch: 'develop' | |
- name: solana | |
repo: 'LedgerHQ/app-solana' | |
branch: 'nanos' | |
- name: DOT | |
repo: 'LedgerHQ/app-polkadot' | |
branch: 'develop' | |
- name: tron | |
repo: 'LedgerHQ/app-tron' | |
branch: 'develop' | |
- name: ton | |
repo: 'LedgerHQ/app-ton-new' | |
branch: 'develop' | |
- name: cardano | |
repo: 'LedgerHQ/app-cardano' | |
branch: 'develop' | |
uses: ./.github/workflows/reusable_build.yml | |
with: | |
app_repository: ${{ matrix.coin.repo }} | |
app_branch_name: ${{ matrix.coin.branch }} | |
# Set the coin variant to build with COIN or CHAIN depending on the app + flags for ETH compilation | |
# As a rule of thumb we don't care about giving unexisting flags to other apps, it has no effect | |
flags: "COIN=${{ matrix.coin.name }} CHAIN=${{ matrix.coin.name }} CAL_TEST_KEY=1 DOMAIN_NAME_TEST_KEY=1 SET_PLUGIN_TEST_KEY=1 NFT_TEST_KEY=1" | |
upload_app_binaries_artifact: libraries_binaries-${{ matrix.coin.name }}-${{ strategy.job-index }} | |
upload_as_lib_artifact: ${{ matrix.coin.name }} | |
merge_libraries_build: | |
name: Merge built libraries | |
needs: build_sideloaded_applications_for_exchange | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/upload-artifact/merge@v4 | |
with: | |
name: libraries_binaries | |
pattern: libraries_binaries-* | |
delete-merged: true | |
build_exchange_application: | |
name: Build Exchange | |
uses: ./.github/workflows/reusable_build.yml | |
with: | |
app_repository: LedgerHQ/app-exchange | |
app_branch_name: develop | |
flags: "TESTING=1 TEST_PUBLIC_KEY=1" | |
upload_app_binaries_artifact: exchange_binaries | |
ragger_tests_exchange: | |
name: Run Exchange tests | |
needs: | |
- build_exchange_application | |
- build_sideloaded_applications_for_exchange | |
uses: ./.github/workflows/reusable_ragger_tests.yml | |
with: | |
app_repository: LedgerHQ/app-exchange | |
app_branch_name: develop | |
download_app_binaries_artifact: exchange_binaries | |
lib_binaries_artifact: libraries_binaries | |
# No need to run everyone, we are testing the reusable workflows not exchange | |
test_filter: "ethereum" | |
##################################### | |
######### Boilerplate tests ######### | |
##################################### | |
build_boilerplate_application: | |
name: Build boilerplate | |
uses: ./.github/workflows/reusable_build.yml | |
with: | |
app_repository: LedgerHQ/app-boilerplate | |
app_branch_name: master | |
upload_app_binaries_artifact: "boilerplate_binaries" | |
ragger_tests_boilerplate: | |
name: Run boilerplate tests | |
needs: build_boilerplate_application | |
uses: ./.github/workflows/reusable_ragger_tests.yml | |
with: | |
app_repository: LedgerHQ/app-boilerplate | |
app_branch_name: master | |
download_app_binaries_artifact: "boilerplate_binaries" | |
build_nanos_boilerplate_application: | |
name: Build boilerplate for Nano S | |
uses: ./.github/workflows/reusable_build.yml | |
with: | |
app_repository: LedgerHQ/app-boilerplate | |
app_branch_name: nanos_baseline | |
upload_app_binaries_artifact: "boilerplate_binaries_nanos" | |
ragger_tests_nanos_boilerplate: | |
name: Run boilerplate tests for Nano S | |
needs: build_nanos_boilerplate_application | |
uses: ./.github/workflows/reusable_ragger_tests.yml | |
with: | |
app_repository: LedgerHQ/app-boilerplate | |
app_branch_name: nanos_baseline | |
download_app_binaries_artifact: "boilerplate_binaries_nanos" | |
############################################ | |
######### Plugin Boilerplate tests ######### | |
############################################ | |
build_plugin_boilerplate: | |
name: Build plugin boilerplate | |
uses: ./.github/workflows/reusable_build.yml | |
with: | |
app_repository: LedgerHQ/app-plugin-boilerplate | |
app_branch_name: develop | |
upload_app_binaries_artifact: plugin_boilerplate_binaries | |
flags: "DEBUG=1" | |
build_develop_ethereum_app: | |
name: Build Ethereum | |
uses: ./.github/workflows/reusable_build.yml | |
with: | |
app_repository: LedgerHQ/app-ethereum | |
app_branch_name: develop | |
flags: "DEBUG=1 CAL_TEST_KEY=1" | |
upload_app_binaries_artifact: ethereum_build_develop | |
ragger_tests_plugin_boilerplate: | |
name: Run plugin boilerplate tests | |
needs: | |
- build_plugin_boilerplate | |
- build_develop_ethereum_app | |
uses: ./.github/workflows/reusable_ragger_tests.yml | |
with: | |
app_repository: LedgerHQ/app-plugin-boilerplate | |
app_branch_name: develop | |
download_app_binaries_artifact: plugin_boilerplate_binaries | |
additional_app_binaries_artifact: ethereum_build_develop | |
additional_app_binaries_artifact_dir: ./tests/.test_dependencies/ethereum/build | |
#################################### | |
######### Rust Boilerplate ######### | |
#################################### | |
build_rust_boilerplate_application: | |
name: Build rust boilerplate | |
uses: ./.github/workflows/reusable_build.yml | |
with: | |
app_repository: LedgerHQ/app-boilerplate-rust | |
app_branch_name: main | |
upload_app_binaries_artifact: "rust_boilerplate_binaries" | |
builder: ledger-app-builder | |
ragger_tests_rust_boilerplate: | |
name: Run rust boilerplate tests | |
needs: build_rust_boilerplate_application | |
uses: ./.github/workflows/reusable_ragger_tests.yml | |
with: | |
app_repository: LedgerHQ/app-boilerplate-rust | |
app_branch_name: main | |
download_app_binaries_artifact: "rust_boilerplate_binaries" |