Skip to content

Commit a5e1a1d

Browse files
committed
fix workflows
1 parent 96c4cff commit a5e1a1d

File tree

2 files changed

+21
-19
lines changed

2 files changed

+21
-19
lines changed

.github/workflows/nightly_build_and_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,5 @@ jobs:
5353
include: ${{ fromJSON(needs.retrieve-rust-apps.outputs.rust_apps) }}
5454
uses: ./.github/workflows/reusable_build_and_test_with_last_nightly.yml
5555
with:
56-
app_repository: LedgerHQ/${{ matrix.app-name }}
57-
app_branch_name: ${{ matrix.app-branch }}
56+
app_name: ${{ matrix.app-name }}
57+
app_branch: ${{ matrix.app-branch }}

.github/workflows/reusable_build_and_test_with_last_nightly.yml

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ permissions:
55
on:
66
workflow_call:
77
inputs:
8-
app_repository:
9-
description: 'The repository of the application to build and test'
8+
app_name:
9+
description: 'The name of the application to build and test'
1010
required: true
1111
type: string
12-
app_branch_name:
12+
app_branch:
1313
description: 'The branch of the application to build and test'
1414
required: true
1515
type: string
1616
workflow_dispatch:
1717
inputs:
18-
app_repository:
19-
description: 'The repository of the application to build and test'
18+
app_name:
19+
description: 'The name of the application to build and test'
2020
required: true
21-
app_branch_name:
21+
app_branch:
2222
description: 'The branch of the application to build and test'
2323
required: true
2424
# schedule:
@@ -33,8 +33,8 @@ jobs:
3333
name: Retrieve application metadata
3434
uses: LedgerHQ/ledger-app-workflows/.github/workflows/_get_app_metadata.yml@v1
3535
with:
36-
app_repository: ${{ inputs.app_repository }}
37-
app_branch_name: ${{ inputs.app_branch_name }}
36+
app_repository: LedgerHQ/${{ inputs.app_name }}
37+
app_branch_name: ${{ inputs.app_branch }}
3838

3939
build_with_last_nightly:
4040
needs: call_get_app_metadata
@@ -55,19 +55,21 @@ jobs:
5555
- name: Checkout Code
5656
uses: actions/checkout@v4
5757
with:
58-
repository: ${{ inputs.app_repository }}
59-
ref: ${{ inputs.app_branch_name }}
58+
repository: LedgerHQ/${{ inputs.app_name }}
59+
ref: ${{ inputs.app_branch }}
60+
path: ${{ inputs.app_name }}
6061

6162
- name: Patch Cargo.toml to use y333/nightly_support for ledger_device_sdk and include_gif crate
6263
run: |
63-
cd ${{ needs.call_get_app_metadata.outputs.build_directory }}
64+
cd ${{ inputs.app_name }}/${{ needs.call_get_app_metadata.outputs.build_directory }}
6465
sed -i 's|ledger_device_sdk = ".*"|ledger_device_sdk = { git = "https://github.com/LedgerHQ/ledger-device-rust-sdk.git", branch = "y333/nightly_support" }|' Cargo.toml
6566
sed -i 's|include_gif = ".*"|include_gif = { git = "https://github.com/LedgerHQ/ledger-device-rust-sdk.git", branch = "y333/nightly_support" }|' Cargo.toml
6667
echo "Display patched Cargo.toml:"
6768
cat Cargo.toml
6869
6970
- name: Build
7071
run: |
72+
cd ${{ inputs.app_name }}/${{ needs.call_get_app_metadata.outputs.build_directory }}
7173
cargo update include_gif
7274
cargo update ledger_secure_sdk_sys
7375
cargo update ledger_device_sdk
@@ -91,7 +93,7 @@ jobs:
9193
- name: Upload binary artifacts
9294
uses: actions/upload-artifact@v4
9395
with:
94-
name: "app_binaries-${{ matrix.device }}"
96+
name: "${{ inputs.app_name }}_binaries-${{ matrix.device }}"
9597
path: ${{env.BINARY_PATH}}
9698
if-no-files-found: error
9799

@@ -103,15 +105,15 @@ jobs:
103105
- name: Merge artifacts
104106
uses: actions/upload-artifact/merge@v4
105107
with:
106-
name: "app_binaries"
107-
pattern: "app_binaries-*"
108+
name: "${{ inputs.app_name }}_binaries"
109+
pattern: "${{ inputs.app_name }}_binaries-*"
108110
delete-merged: true
109111

110112
ragger_tests:
111113
name: Run ragger tests using the reusable workflow
112114
needs: merge_artifacts
113115
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_ragger_tests.yml@v1
114116
with:
115-
app_repository: ${{ inputs.app_repository }}
116-
app_branch_name: ${{ inputs.app_branch_name }}
117-
download_app_binaries_artifact: "app_binaries"
117+
app_repository: LedgerHQ/${{ inputs.app_name }}
118+
app_branch_name: ${{ inputs.app_branch }}
119+
download_app_binaries_artifact: "${{ inputs.app_name }}_binaries"

0 commit comments

Comments
 (0)