16
16
push :
17
17
18
18
jobs :
19
+
20
+ define-matrix :
21
+ runs-on : ubuntu-latest
22
+
23
+ outputs :
24
+ cores : ${{ steps.cores.outputs.cores }}
25
+ ses : ${{ steps.se_names.outputs.se_names }}
26
+
27
+ steps :
28
+ - name : Define MCU cores
29
+ id : cores
30
+ run : |
31
+ echo 'cores=["cortex-m3", "cortex-m35p+nodsp"]' >> "$GITHUB_OUTPUT"
32
+
33
+ - name : Define SE names
34
+ id : se_names
35
+ run : |
36
+ echo 'se_names=["st33", "st33k1"]' >> "$GITHUB_OUTPUT"
37
+
19
38
build :
39
+ needs : define-matrix
20
40
runs-on : ubuntu-latest
21
41
container :
22
42
image : ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-lite:latest
23
43
strategy :
24
44
fail-fast : false
25
45
matrix :
26
- target :
27
- - core : cortex-m3
28
- se : st33
29
- - core : cortex-m35p+nodsp
30
- se : st33k1
46
+ cores : ${{ fromJSON(needs.define-matrix.outputs.cores) }}
47
+ se_names : ${{ fromJSON(needs.define-matrix.outputs.se_names) }}
31
48
32
49
steps :
33
50
- uses : actions/checkout@v4
38
55
tools/build_clangrt_builtins.sh
39
56
sparse-checkout-cone-mode : false
40
57
41
- - run : ./tools/build_clangrt_builtins.sh -t ${{ matrix.target.core }} -o artifact/arch/${{ matrix.target.se }}/lib
58
+ - run : ./tools/build_clangrt_builtins.sh -t ${{ matrix.target.cores }} -o artifact/arch/${{ matrix.target.se_names }}/lib
42
59
43
60
- uses : actions/upload-artifact@v4
44
61
with :
@@ -56,11 +73,14 @@ jobs:
56
73
delete-merged : true
57
74
58
75
pr_create :
59
- needs : merge
76
+ needs : merge, define-matrix
60
77
runs-on : ubuntu-latest
61
- name : " Pull Request Create"
62
78
if : ${{ success() && inputs.create_pr }}
63
79
continue-on-error : true
80
+ strategy :
81
+ fail-fast : false
82
+ matrix :
83
+ se_names : ${{ fromJSON(needs.define-matrix.outputs.se_names) }}
64
84
steps :
65
85
- name : Clone repository
66
86
uses : actions/checkout@v4
@@ -75,13 +95,13 @@ jobs:
75
95
with :
76
96
name : arch
77
97
78
- - name : Print matrix
98
+ - name : PR creation
79
99
env :
80
100
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
81
101
run : |
82
102
ls -l
83
103
git status
84
104
git switch --create sdk_libs_update
85
- git add arch/${{ matrix.target.se }}/lib
105
+ git add arch/${{ matrix.target.se_names }}/lib
86
106
git status
87
107
gh pr create -B ${{ inputs.target_sdk_branch }} --title '[SDK_LIBS_UPDATE] Updating static SDK libraries' --body 'Created by Github action'
0 commit comments