From ee2ddef27632be4c8e7312f3bca5e9be0ab612fd Mon Sep 17 00:00:00 2001 From: tdejoigny-ledger Date: Fri, 26 Jul 2024 16:15:23 +0200 Subject: [PATCH 1/2] Update CI due to NanoS support deletion --- .github/workflows/reusable_ragger_tests_latest_speculos.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable_ragger_tests_latest_speculos.yml b/.github/workflows/reusable_ragger_tests_latest_speculos.yml index 21c2d130..8d236153 100644 --- a/.github/workflows/reusable_ragger_tests_latest_speculos.yml +++ b/.github/workflows/reusable_ragger_tests_latest_speculos.yml @@ -69,6 +69,7 @@ jobs: - device: nanox - device: nanosp - device: stax + - device: flex steps: - name: Clone uses: actions/checkout@v4 @@ -82,7 +83,7 @@ jobs: uses: actions/checkout@v4 with: repository: ${{ inputs.app_repository }} - ref: ${{ inputs.app_branch_name }} + ref: ${{ matrix.device == 'nanos' && 'nanos_baseline' || inputs.app_branch_name }} path: app submodules: recursive fetch-depth: 0 From a5d366a4b1a168bdf3a712f01349821372bf0236 Mon Sep 17 00:00:00 2001 From: tdejoigny-ledger Date: Mon, 29 Jul 2024 18:05:06 +0200 Subject: [PATCH 2/2] PR remarks fixes --- .../continuous-integration-workflow.yml | 9 +++++++ .../reusable_ragger_tests_latest_speculos.yml | 27 ++++++++++--------- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index f5db54f7..47eb917b 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -140,6 +140,15 @@ jobs: test_dir: tests speculos_app_branch_name: ${{ github.ref }} + package_and_test_docker_for_nanos: + name: Build and test the Speculos docker for Nano S + uses: ./.github/workflows/reusable_ragger_tests_latest_speculos.yml + with: + app_repository: LedgerHQ/app-boilerplate + app_branch_name: nanos_baseline + test_dir: tests + speculos_app_branch_name: ${{ github.ref }} + deploy_docker: name: Build and Upload the Speculos docker runs-on: ubuntu-latest diff --git a/.github/workflows/reusable_ragger_tests_latest_speculos.yml b/.github/workflows/reusable_ragger_tests_latest_speculos.yml index 8d236153..b98475f0 100644 --- a/.github/workflows/reusable_ragger_tests_latest_speculos.yml +++ b/.github/workflows/reusable_ragger_tests_latest_speculos.yml @@ -26,7 +26,7 @@ jobs: with: app_repository: ${{ inputs.app_repository }} app_branch_name: ${{ inputs.app_branch_name }} - upload_app_binaries_artifact: "compiled_app_binaries" + upload_app_binaries_artifact: compiled_app_binaries-${{ inputs.app_branch_name }} build_docker_image: name: Build Speculos Docker image @@ -54,22 +54,25 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v4 with: - name: speculos_image + name: speculos_image-${{ inputs.app_branch_name }} path: /tmp/speculos_image.tar + call_get_app_metadata: + name: Retrieve application metadata + uses: LedgerHQ/ledger-app-workflows/.github/workflows/_get_app_metadata.yml@v1 + with: + app_repository: ${{ inputs.app_repository }} + app_branch_name: ${{ inputs.app_branch_name }} + ragger_tests: name: Functional tests with Ragger runs-on: ubuntu-latest - needs: [build_docker_image, build_application] + needs: [build_docker_image, build_application, call_get_app_metadata] strategy: fail-fast: false matrix: - include: - - device: nanos - - device: nanox - - device: nanosp - - device: stax - - device: flex + device: ${{ fromJSON(needs.call_get_app_metadata.outputs.compatible_devices) }} + steps: - name: Clone uses: actions/checkout@v4 @@ -83,7 +86,7 @@ jobs: uses: actions/checkout@v4 with: repository: ${{ inputs.app_repository }} - ref: ${{ matrix.device == 'nanos' && 'nanos_baseline' || inputs.app_branch_name }} + ref: ${{ inputs.app_branch_name }} path: app submodules: recursive fetch-depth: 0 @@ -94,7 +97,7 @@ jobs: - name: Download artifact uses: actions/download-artifact@v4 with: - name: speculos_image + name: speculos_image-${{ inputs.app_branch_name }} path: /tmp - name: Load image @@ -105,7 +108,7 @@ jobs: - name: Download app binaries uses: actions/download-artifact@v4 with: - name: "compiled_app_binaries" + name: compiled_app_binaries-${{ inputs.app_branch_name }} path: ${{ github.workspace }}/app/build - name: Run and test Speculos docker