Skip to content

Commit bd5bd93

Browse files
committed
Make build all rust apps workflow callable
1 parent c0abe38 commit bd5bd93

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

.github/workflows/build_all_apps.yml renamed to .github/workflows/reusable_build_all_apps.yml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
name: Build all Rust apps
22

33
on:
4+
workflow_call:
5+
inputs:
6+
c_sdk_branch:
7+
required: false
8+
default: ''
9+
type: string
410
workflow_dispatch:
5-
inputs:
6-
sdk_branch:
7-
type: string
8-
required: false
9-
default: ''
11+
inputs:
12+
c_sdk_branch:
13+
type: string
14+
required: false
15+
default: ''
1016
pull_request:
1117

18+
env:
19+
C_SDK_URL: 'https://github.com/LedgerHQ/ledger-secure-sdk.git'
20+
1221
jobs:
1322
retrieve-rust-apps:
1423
name: Retrieve Rust Apps
@@ -106,6 +115,14 @@ jobs:
106115
107116
- name: Build
108117
run: |
118+
# Clone C SDK if provided
119+
if [ -n "${{ github.event.inputs.c_sdk_branch }}" ]; then
120+
git clone $C_SDK_URL --branch ${{ github.event.inputs.c_sdk_branch }} --single-branch c_sdk
121+
echo "setting LEDGER_SDK_PATH to $(realpath c_sdk)"
122+
LEDGER_SDK_PATH=$(realpath c_sdk)
123+
else
124+
echo "using C SDK from ledger-app-builder"
125+
fi
109126
cd ${{ matrix.app-name }}
110127
build_directory=$(ledger-manifest --output-build-directory ledger_app.toml)
111128
cd $build_directory

0 commit comments

Comments
 (0)