Skip to content

Commit 2d929a8

Browse files
Unify ragger lib loading
1 parent 30934be commit 2d929a8

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

.github/workflows/end_to_end_tests_of_reusable_workflows.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ jobs:
135135
app_branch_name: develop
136136
download_app_binaries_artifact: exchange_binaries
137137
lib_binaries_artifact: libraries_binaries
138+
lib_binaries_artifact_dir: test/python/lib_binaries
138139
# No need to run everyone, we are testing the reusable workflows not exchange
139140
test_filter: "ethereum"
140141

.github/workflows/reusable_ragger_tests.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ on:
4444
required: false
4545
default: ''
4646
type: string
47+
lib_binaries_artifact_dir:
48+
description: 'The directory where the additional lib binaries will be downloaded (defaults to ".")'
49+
required: false
50+
default: '.'
51+
type: string
4752
run_for_devices:
4853
description: |
4954
The list of device(s) on which the test will run.
@@ -148,12 +153,7 @@ jobs:
148153
path: ${{ steps.set_binary_path.outputs.binary_path }}
149154

150155
- name: Display structure of downloaded files
151-
run: |
152-
if [ "${{ needs.call_get_app_metadata.outputs.is_rust }}" = "true" ]; then
153-
ls -R ${{ env.binary_path }}
154-
else
155-
ls -R ${{ needs.call_get_app_metadata.outputs.build_directory }}
156-
fi
156+
run: ls -R ${{ steps.set_binary_path.outputs.binary_path }}
157157

158158
- name: Download additional app binaries if required
159159
if: ${{ inputs.additional_app_binaries_artifact != '' }}
@@ -171,11 +171,11 @@ jobs:
171171
uses: actions/download-artifact@v4
172172
with:
173173
name: ${{ inputs.lib_binaries_artifact }}
174-
path: ${{ needs.call_get_test_metadata.outputs.pytest_directory }}/lib_binaries/
174+
path: ${{ inputs.lib_binaries_artifact_dir }}
175175

176176
- name: Display structure of downloaded files
177177
if: ${{ inputs.lib_binaries_artifact != '' }}
178-
run: ls -R ${{ needs.call_get_test_metadata.outputs.pytest_directory }}/lib_binaries/
178+
run: ls -R ${{ inputs.lib_binaries_artifact_dir }}
179179

180180
- name: Install tests dependencies
181181
run: |

.github/workflows/reusable_swap_tests.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
build_exchange:
3131
name: Build Exchange app using the reusable workflow
3232
if: ${{ inputs.exchange_build_artifact == '' }}
33-
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_build.yml@v1
33+
uses: ./.github/workflows/reusable_build.yml
3434
with:
3535
app_repository: 'LedgerHQ/app-exchange'
3636
app_branch_name: 'develop'
@@ -40,12 +40,11 @@ jobs:
4040
build_ethereum:
4141
name: Build Ethereum app using the reusable workflow
4242
if: ${{ inputs.ethereum_build_artifact == '' }}
43-
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_build.yml@v1
43+
uses: ./.github/workflows/reusable_build.yml
4444
with:
4545
app_repository: 'LedgerHQ/app-ethereum'
4646
app_branch_name: 'develop'
4747
upload_app_binaries_artifact: "app_ethereum_binaries"
48-
upload_as_lib_artifact: "ethereum_"
4948
use_case: 'use_test_keys'
5049

5150
get_artifacts_names:
@@ -90,27 +89,31 @@ jobs:
9089
outputs:
9190
swap_test_dir: ${{ steps.get_swap_test_dir.outputs.swap_test_dir }}
9291
main_app_dir: ${{ steps.get_swap_test_dir.outputs.main_app_dir }}
92+
lib_app_dir: ${{ steps.get_swap_test_dir.outputs.lib_app_dir }}
9393
steps:
9494
- name: Get swap test directory
9595
id: get_swap_test_dir
9696
run: |
9797
echo "swap_test_dir=${{ inputs.swap_test_dir }}" >> "$GITHUB_OUTPUT"
98-
echo "main_app_dir=${{ inputs.swap_test_dir }}/main_app/exchange/build" >> "$GITHUB_OUTPUT"
98+
echo "main_app_dir=${{ inputs.swap_test_dir }}/.test_dependencies/main/app-exchange/build" >> "$GITHUB_OUTPUT"
99+
echo "lib_app_dir=${{ inputs.swap_test_dir }}/.test_dependencies/libraries/app-ethereum/build" >> "$GITHUB_OUTPUT"
99100
- name: Show swap test directory
100101
run: |
101102
echo "Swap test directory: ${{ steps.get_swap_test_dir.outputs.swap_test_dir }}"
102103
echo "Main app directory: ${{ steps.get_swap_test_dir.outputs.main_app_dir }}"
104+
echo "Lib app directory: ${{ steps.get_swap_test_dir.outputs.lib_app_dir }}"
103105
104106
105107
# This job runs the swap functional tests using the reusable workflow
106108
ragger_tests_swap:
107109
name: Run swap ragger tests using the reusable workflow
108110
needs: [get_artifacts_names, get_dir_names]
109-
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_ragger_tests.yml@v1
111+
uses: ./.github/workflows/reusable_ragger_tests.yml
110112
with:
111113
download_app_binaries_artifact: ${{ inputs.app_build_artifact }}
112114
additional_app_binaries_artifact: ${{ needs.get_artifacts_names.outputs.exchange_build_artifact }}
113115
additional_app_binaries_artifact_dir: ${{ needs.get_dir_names.outputs.main_app_dir }}
114116
lib_binaries_artifact: ${{ needs.get_artifacts_names.outputs.ethereum_build_artifact }}
117+
lib_binaries_artifact_dir: ${{ needs.get_dir_names.outputs.lib_app_dir }}
115118
test_dir: ${{ needs.get_dir_names.outputs.swap_test_dir }}
116119
regenerate_snapshots: ${{ inputs.regenerate_snapshots }}

0 commit comments

Comments
 (0)