-
Notifications
You must be signed in to change notification settings - Fork 32
87 lines (77 loc) · 2.59 KB
/
build_all_apps.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Build all Rust apps on latest SDK
on:
workflow_dispatch:
inputs:
sdk_branch:
type: string
required: false
default: ''
pull_request:
env:
repo_list: '
{\"repo_name\":[
\"app-mobilecoin\",
]}
'
jobs:
prepare-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- id: set-matrix
run: echo "matrix=${{ env.repo_list }}" >> $GITHUB_OUTPUT
test-build:
name: Build for all targets
needs: [prepare-matrix]
strategy:
fail-fast: false
matrix:
${{ fromJSON(needs.prepare-matrix.outputs.matrix) }}
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: LedgerHQ/${{ matrix.repo_name }}
submodules: true
ref: 'feat/update_nightly'
path: ${{ matrix.repo_name }}
- name: Build Path and Targets
run: |
cargo +$RUST_STABLE install toml-cli
cd ${{ matrix.repo_name }}
build_path=$(toml get ledger_app.toml app.build_directory)
echo "build_path=$build_path" >> $GITHUB_ENV
build_nanos=$(toml get ledger_app.toml app.devices | grep -o "\"nanos\"" | awk -F '"' '{print $2}')
echo "Build Nano S => $build_nanos"
build_nanosplus=$(toml get ledger_app.toml app.devices | grep -o "\"nanos+\"" | awk -F '"' '{print $2}' | sed 's/+/plus/')
echo "Build Nano S+ => $build_nanosplus"
build_nanox=$(toml get ledger_app.toml app.devices | grep -o "\"nanox\"" | awk -F '"' '{print $2}')
echo "Build Nano X => $build_nanox"
echo "build_nanos=$build_nanos" >> $GITHUB_ENV
echo "build_nanosplus=$build_nanosplus" >> $GITHUB_ENV
echo "build_nanox=$build_nanox" >> $GITHUB_ENV
- name: Build NanoS
if: ${{ env.build_nanos == 'nanos' }}
run: |
echo "Build for Nano S"
cd ${{ matrix.repo_name }}
cd ${{ env.build_path }}
cargo ledger build nanos
- name: Build NanoX
if: ${{ env.build_nanox == 'nanox' }}
run: |
echo "Build for Nano X"
cd ${{ matrix.repo_name }}
cd ${{ env.build_path }}
cargo ledger build nanox
- name: Build NanoX
if: ${{ env.build_nanosplus == 'nanosplus' }}
run: |
echo "Build for Nano S+"
cd ${{ matrix.repo_name }}
cd ${{ env.build_path }}
cargo ledger build nanosplus