Skip to content

Commit 4cd8852

Browse files
Improve build
1 parent bde9f1f commit 4cd8852

File tree

4 files changed

+64
-67
lines changed

4 files changed

+64
-67
lines changed

.github/workflows/actions.yml

Lines changed: 17 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ on:
1010
- '**.md'
1111
- '.github/ISSUE_TEMPLATE/**'
1212
- '.github/workflows/nightly.yml'
13-
- '.github/workflows/linux_cpn.yml'
14-
- '.github/workflows/macosx_cpn.yml'
15-
- '.github/workflows/win-cpn-32.yml'
16-
- '.github/workflows/win_cpn-64.yml'
13+
- '.github/workflows/companion.yml'
1714
- '.github/workflows/validate_fw_json.yml'
1815
- 'companion/**'
1916
- '.gitpod.yml'
@@ -26,10 +23,7 @@ on:
2623
- '**.md'
2724
- '.github/ISSUE_TEMPLATE/**'
2825
- '.github/workflows/nightly.yml'
29-
- '.github/workflows/linux_cpn.yml'
30-
- '.github/workflows/macosx_cpn.yml'
31-
- '.github/workflows/win-cpn-32.yml'
32-
- '.github/workflows/win_cpn-64.yml'
26+
- '.github/workflows/companion.yml'
3327
- '.github/workflows/validate_fw_json.yml'
3428
- 'companion/**'
3529
- '.gitpod.yml'
@@ -44,27 +38,21 @@ jobs:
4438
strategy:
4539
matrix:
4640
target:
47-
- x9dp2019
41+
- x9dp2019;x9e
4842
- tx15
4943
- tx16s
5044
- nv14
5145
- el18
5246
- pl18
5347
- pl18ev
54-
- t12max
48+
- t12max;t14
5549
- t15
5650
- t16
5751
- t18
58-
- tlite #STM32F2
59-
- t20
60-
- t14
61-
- t20v2
62-
- tx12 #STM32F2
52+
- t20;t20v2
6353
- x10
6454
- x12s
65-
- x9e
66-
- mt12
67-
- gx12
55+
- mt12;gx12
6856
- nb4p
6957
- st16
7058
container:
@@ -76,7 +64,6 @@ jobs:
7664
uses: actions/checkout@v4
7765
with:
7866
submodules: recursive
79-
# fetch-depth: 0 # https://github.com/actions/checkout#Fetch-all-history-for-all-tags-and-branches
8067

8168
- name: Test ${{ matrix.target }}
8269
env:
@@ -85,7 +72,6 @@ jobs:
8572
echo "Running commit tests"
8673
./tools/commit-tests.sh
8774
88-
8975
build:
9076
name: Run builds
9177
needs: test
@@ -94,26 +80,20 @@ jobs:
9480
matrix:
9581
target:
9682
- nv14;el18
97-
- pl18;pl18ev;pl18u
98-
- pa01
99-
- t12max
100-
- t15;t16;t18
101-
- zorro;pocket;mt12;commando8
83+
- pl18;pl18ev
84+
- pl18u;pa01
85+
- t15;t16
86+
- t14;t18;mt12
87+
- zorro;pocket;commando8
10288
- tprov2;tpros;bumblebee
103-
- t20;t20v2;t14
104-
- tx12mk2;boxer;gx12
105-
- tx15
106-
- tx16s
107-
- f16
89+
- mt12;gx12;t20;t20v2
90+
- t12max;tx12mk2;boxer
91+
- tx15;tx16s
92+
- x12s;f16
10893
- v12;v14;v16
10994
- x10;x10express
110-
- x12s
111-
- x7access
112-
- x9dp2019
113-
- x9e;x9e-hall
114-
- mt12;gx12
115-
- nb4p
116-
- st16
95+
- x7access;x9dp2019;x9e;x9e-hall
96+
- nb4p;st16
11797
container:
11898
image: ghcr.io/edgetx/edgetx-dev:latest
11999
volumes:
@@ -149,7 +129,6 @@ jobs:
149129
runs-on: ubuntu-latest
150130
steps:
151131
- name: Compose release filename
152-
# https://stackoverflow.com/questions/58033366/how-to-get-current-branch-within-github-actions
153132
run: echo "artifact_name=edgetx-firmware-${GITHUB_REF##*/}" >> $GITHUB_ENV
154133

155134
- name: Merge firmware artifact packages

.github/workflows/companion.yml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,26 @@ on:
2222
workflow_dispatch:
2323

2424
jobs:
25-
build-modules:
25+
modules:
2626
name: WASM Modules
2727
runs-on: macos-14
28+
strategy:
29+
matrix:
30+
target:
31+
- nv14;el18;pl18;pl18ev
32+
- pl18u;t15;t16;t18
33+
- zorro;pocket;mt12;commando8;tprov2;tpros;bumblebee;t14
34+
- mt12;gx12;t20;t20v2;t12max;tx12mk2;boxer
35+
- tx15;tx16s;x12s;f16
36+
- v12;v14;v16;x10;x10express
37+
- x7access;x9dp2019;x9e;x9e-hall
38+
- nb4p;st16;pa01
2839

2940
steps:
3041
- name: Check out the repo
3142
uses: actions/checkout@v4
3243
with:
33-
submodules: recursive
44+
submodules: true
3445

3546
- name: Setup Python Dependencies
3647
uses: ./.github/actions/python_dependencies
@@ -41,26 +52,24 @@ jobs:
4152
- name: Build modules
4253
shell: bash
4354
env:
55+
FLAVOR: ${{ matrix.target }}
4456
CMAKE_BUILD_TYPE: 'Release'
4557
run: |
4658
mkdir output && \
4759
tools/build-wasm-modules.sh "$(pwd)" "$(pwd)/output/"
4860
49-
- name: Compose artifact name
50-
run: echo "artifact_name=edgetx-modules-${GITHUB_REF##*/}" >> $GITHUB_ENV
51-
shell: bash
52-
5361
- name: Archive production artifacts
5462
uses: actions/upload-artifact@v4
5563
with:
56-
name: "${{ env.artifact_name }}"
64+
name: wasm-modules-${{ matrix.target }}
5765
path: ${{github.workspace}}/output
66+
if-no-files-found: error
5867
retention-days: 15
5968

6069
build-linux:
6170
name: Linux Companion
6271
runs-on: ubuntu-latest
63-
if: false
72+
needs: modules
6473

6574
container:
6675
image: ghcr.io/edgetx/edgetx-dev:latest
@@ -81,7 +90,7 @@ jobs:
8190
build-macos:
8291
name: macOS Companion
8392
runs-on: macos-14
84-
if: false
93+
needs: modules
8594

8695
env:
8796
CMAKE_OSX_ARCHITECTURES: 'x86_64'
@@ -102,7 +111,7 @@ jobs:
102111
build-win64:
103112
name: Windows Companion
104113
runs-on: windows-2022
105-
if: false
114+
needs: modules
106115

107116
env:
108117
CMAKE_GENERATOR: 'Ninja'

tools/build-wasm-modules.sh

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -163,24 +163,37 @@ build_plugin() {
163163
return 0
164164
}
165165

166-
declare -a simulator_plugins=(
167-
x7access x9dp2019 x9e
168-
t12max tx12mk2 t15 t16 t18 t20 t20v2
169-
x10 x10express x12s
170-
zorro tx16s tx15
171-
commando8 boxer pocket mt12 gx12
172-
tprov2 tpros bumblebee t14
173-
nv14 el18 pl18 pl18ev pl18u st16 pa01
174-
f16 v14 v16
175-
)
176-
177-
TOTAL=${#simulator_plugins[@]}
166+
if [[ -n "$FLAVOR" ]]; then
167+
# Convert semicolon-separated string to array
168+
IFS=';' read -ra temp_array <<< "$FLAVOR"
169+
plugins=()
170+
for item in "${temp_array[@]}"; do
171+
plugins+=($(echo "$item" | tr '[:upper:]' '[:lower:]'))
172+
done
173+
else
174+
declare -a plugins=(
175+
# monochrom
176+
boxer bumblebee commando8
177+
gx12 mt12 pocket t12max
178+
t14 t20 t20v2 tpros tprov2
179+
tx12mk2 zorro v14
180+
x7access x9dp2019 x9e
181+
# colour
182+
el18 nv14 st16 pa01
183+
pl18 pl18ev pl18u
184+
t15 t16 t18
185+
tx15 tx16s f16 v16
186+
x10 x10express x12s
187+
)
188+
fi
189+
190+
TOTAL=${#plugins[@]}
178191
FAILED_PLUGINS=()
179192

180193
echo "🔨 Building $TOTAL Plugins"
181194

182-
for i in "${!simulator_plugins[@]}"; do
183-
plugin="${simulator_plugins[$i]}"
195+
for i in "${!plugins[@]}"; do
196+
plugin="${plugins[$i]}"
184197
current=$((i + 1))
185198
percent=$((current * 100 / TOTAL))
186199

tools/commit-tests.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,8 @@ do
7878
fi
7979

8080
cmake ${BUILD_OPTIONS} "${SRCDIR}"
81-
82-
cmake --build . --target arm-none-eabi-configure
83-
cmake --build arm-none-eabi -j"${CORES}" --target ${FIRMARE_TARGET}
84-
8581
cmake --build . --target native-configure
8682
cmake --build native -j"${CORES}" --target tests-radio
8783

88-
rm -f CMakeCache.txt native/CMakeCache.txt arm-none-eabi/CMakeCache.txt
84+
rm -f CMakeCache.txt native/CMakeCache.txt
8985
done

0 commit comments

Comments
 (0)