Skip to content

Commit 8c00a73

Browse files
committed
Add GitHub workflows
1 parent 4cf18d4 commit 8c00a73

File tree

2 files changed

+120
-0
lines changed

2 files changed

+120
-0
lines changed
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: Wolfboot Reusable Build Workflow for MCUXpresso SDK
2+
3+
on:
4+
5+
workflow_call:
6+
inputs:
7+
arch:
8+
required: true
9+
type: string
10+
config-file:
11+
required: true
12+
type: string
13+
board-name:
14+
required: true
15+
type: string
16+
make-args:
17+
required: false
18+
type: string
19+
20+
jobs:
21+
22+
build:
23+
runs-on: ubuntu-latest
24+
timeout-minutes: 30
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
with:
29+
submodules: true
30+
31+
- uses: actions/checkout@main
32+
with:
33+
repository: nxp-mcuxpresso/CMSIS_5
34+
path: CMSIS_5
35+
36+
- name: Workaround for sources.list
37+
run: |
38+
# Replace sources
39+
40+
set -euxo pipefail
41+
42+
# Peek (what repos are active now)
43+
apt-cache policy
44+
grep -RInE '^(deb|Types|URIs)' /etc/apt || true
45+
46+
# Enable nullglob so *.list/*.sources that don't exist don't break sed
47+
shopt -s nullglob
48+
49+
echo "Replace sources.list (legacy)"
50+
sudo sed -i \
51+
-e "s|https\?://azure\.archive\.ubuntu\.com/ubuntu/?|http://mirror.arizona.edu/ubuntu/|g" \
52+
/etc/apt/sources.list || true
53+
54+
echo "Replace sources.list.d/*.list (legacy)"
55+
for f in /etc/apt/sources.list.d/*.list; do
56+
sudo sed -i \
57+
-e "s|https\?://azure\.archive\.ubuntu\.com/ubuntu/?|http://mirror.arizona.edu/ubuntu/|g" \
58+
"$f"
59+
done
60+
61+
echo "Replace sources.list.d/*.sources (deb822)"
62+
for f in /etc/apt/sources.list.d/*.sources; do
63+
sudo sed -i \
64+
-e "s|https\?://azure\.archive\.ubuntu\.com/ubuntu/?|http://mirror.arizona.edu/ubuntu/|g" \
65+
-e "s|https\?://azure\.archive\.ubuntu\.com|http://mirror.arizona.edu|g" \
66+
"$f"
67+
done
68+
69+
echo "Fix /etc/apt/apt-mirrors.txt (used by URIs: mirror+file:...)"
70+
if grep -qE '^[[:space:]]*https?://azure\.archive\.ubuntu\.com/ubuntu/?' /etc/apt/apt-mirrors.txt; then
71+
# Replace azure with our mirror (idempotent)
72+
sudo sed -i 's|https\?://azure\.archive\.ubuntu\.com/ubuntu/|http://mirror.arizona.edu/ubuntu/|g' /etc/apt/apt-mirrors.txt
73+
fi
74+
75+
# Peek (verify changes)
76+
grep -RIn "azure.archive.ubuntu.com" /etc/apt || true
77+
grep -RInE '^(deb|Types|URIs)' /etc/apt || true
78+
echo "--- apt-mirrors.txt ---"
79+
cat /etc/apt/apt-mirrors.txt || true
80+
81+
- name: Update repository
82+
run: sudo apt-get update
83+
84+
- name: Install software
85+
run: |
86+
sudo apt-get install -y gcc-arm-none-eabi west
87+
88+
- name: Setup MCUXpresso SDK
89+
run: |
90+
west init -m https://github.com/nxp-mcuxpresso/mcuxsdk-manifests.git mcuxpresso-sdk
91+
cd mcuxpresso-sdk
92+
west update_board --set board ${{inputs.board-name}}
93+
94+
- name: make distclean
95+
run: |
96+
make distclean
97+
98+
- name: Select config
99+
run: |
100+
cp ${{inputs.config-file}} .config && make include/target.h
101+
102+
- name: Build tools
103+
run: |
104+
make -C tools/keytools && make -C tools/bin-assemble
105+
106+
- name: Build wolfboot
107+
run: |
108+
make MCUXSDK=1 MCUXPRESSO="$GITHUB_WORKSPACE/mcuxpresso-sdk/mcuxsdk" MCUXPRESSO_CMSIS="$GITHUB_WORKSPACE/CMSIS_5/CMSIS" ${{inputs.make-args}} V=1

.github/workflows/test-configs.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,18 @@ jobs:
216216
arch: arm
217217
config-file: ./config/examples/mcxw-tz.config
218218

219+
nxp_mcxn_test:
220+
uses: ./.github/workflows/test-build-mcux-sdk-manifests.yml
221+
with:
222+
arch: arm
223+
config-file: ./config/examples/mcxn.config
224+
225+
nxp_mcxn_tz_test:
226+
uses: ./.github/workflows/test-build-mcux-sdk-manifests.yml
227+
with:
228+
arch: arm
229+
config-file: ./config/examples/mcxn-tz.config
230+
219231
nxp_s32k142_test:
220232
uses: ./.github/workflows/test-build.yml
221233
with:

0 commit comments

Comments
 (0)