Skip to content

Commit

Permalink
update workflow 8
Browse files Browse the repository at this point in the history
  • Loading branch information
yogh333 committed Feb 5, 2024
1 parent d6c5175 commit 6640afc
Showing 1 changed file with 31 additions and 4 deletions.
35 changes: 31 additions & 4 deletions .github/workflows/build_all_apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:
pull_request:



jobs:
test-build:
name: Build for all targets
Expand All @@ -35,19 +34,47 @@ jobs:
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest
steps:
- name: Clone SDK
uses: actions/checkout@v4
with:
path: sdk

- name: Clone App
uses: actions/checkout@v4
with:
repository: LedgerHQ/${{ matrix.repo }}
submodules: true
ref: ${{ matrix.branch }}
path: ${{ matrix.repo }}-${{ matrix.branch }}

- name: Patch Cargo.toml
run: |
cd ${{ matrix.repo }}-${{ matrix.branch }}/${{ matrix.build_path }}
if grep -Fxq "[patch.crates-io.ledger_device_sdk]" Cargo.toml; then
echo "The patch already exists in the file."
else
echo "" >> Cargo.toml
echo "[patch.crates-io.ledger_device_sdk]" >> Cargo.toml
path=\"$GITHUB_WORKSPACE/sdk/ledger_device_sdk\"
echo "path=$path" >> Cargo.toml
echo "Patch added to Cargo.toml"
fi
if grep -Fxq "[patch.crates-io.ledger_secure_sdk_sys]" Cargo.toml; then
echo "The patch already exists in the file."
else
echo "" >> Cargo.toml
echo "[patch.crates-io.ledger_secure_sdk_sys]" >> Cargo.toml
path=\"$GITHUB_WORKSPACE/sdk/ledger_secure_sdk_sys\"
echo "path=$path" >> Cargo.toml
echo "Patch added to Cargo.toml"
fi
- name: Build Path and Targets
- name: Build
run: |
cd ${{ matrix.repo }}-${{ matrix.branch }}
cd ${{ matrix.repo }}-${{ matrix.branch }}/${{ matrix.build_path }}
for device in ${{ matrix.device }}; do
cd ${{ matrix.build_path }}
echo "Build for"
echo $device
cat Cargo.toml
done

0 comments on commit 6640afc

Please sign in to comment.