Skip to content

add workflow to build all Rust apps for every PR #21

add workflow to build all Rust apps for every PR

add workflow to build all Rust apps for every PR #21

Workflow file for this run

name: Build all Rust apps
on:
workflow_dispatch:
inputs:
sdk_branch:
type: string
required: false
default: ''
pull_request:
jobs:
test-build:
name: Build for all targets
strategy:
fail-fast: false
matrix:
include:
- repo: 'LedgerHQ/app-mobilecoin'
branch: 'develop'
- repo: 'LedgerHQ/app-radix-babylon'
branch: 'develop'
- repo: 'LedgerHQ/app-boilerplate-rust'
branch: 'main'
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest
steps:
- name: Clone App
uses: actions/checkout@v4
with:
repository: ${{ matrix.repo }}
submodules: true
ref: ${{ matrix.branch }}
path: ${{ matrix.repo }}-${{ matrix.branch }}
- name: Build Path and Targets
run: |
cargo +$RUST_STABLE install toml-cli
cd ${{ matrix.repo }}-${{ matrix.branch }}
build_path=$(toml get ledger_app.toml app.build_directory)
echo "build_path=$build_path" >> $GITHUB_ENV
for device in nanos "nanos+" nanox; do
build_device=$(toml get ledger_app.toml app.devices | grep -o "\"$device\"" | sed 's/"/'/g | sed 's/+/plus/')
if [ -n "$build_device" ]; then
echo "build_${build_device}=true" >> $GITHUB_ENV
fi
done
- name: Build NanoS
if: ${{ env.build_nanos == 'true' }}
run: |
cd ${{ github.workspace }}/${{ matrix.repo }}-${{ matrix.branch }}
cd ${{ env.build_path }}
echo "Build for Nano S"
- name: Build NanoX
if: ${{ env.build_nanox == 'true' }}
run: |
cd ${{ github.workspace }}/${{ matrix.repo }}-${{ matrix.branch }}
cd ${{ env.build_path }}
echo "Build for Nano X"
- name: Build NanoS+
if: ${{ env.build_nanosplus == 'true' }}
run: |
cd ${{ github.workspace }}/${{ matrix.repo }}-${{ matrix.branch }}
cd ${{ env.build_path }}
echo "Build for Nano S+"