Skip to content

Commit f6594f6

Browse files
committed
CI-tests: STM32L4 and STM32WB using CubeMX SDK
1 parent 5ea3de1 commit f6594f6

File tree

3 files changed

+119
-13
lines changed

3 files changed

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

.github/workflows/test-configs.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -375,12 +375,12 @@ jobs:
375375
arch: arm
376376
config-file: ./config/examples/stm32l0.config
377377

378-
# TODO: stm32l4-cube.config requires Cube HAL
379-
# stm32l4_cube_test:
380-
# uses: ./.github/workflows/test-build.yml
381-
# with:
382-
# arch: arm
383-
# config-file: ./config/examples/stm32l4-cube.config
378+
stm32l4_cube_test:
379+
uses: ./.github/workflows/test-build-stm32cube.yml
380+
with:
381+
arch: arm
382+
config-file: ./config/examples/stm32l4-cube.config
383+
cube-repo: STMicroelectronics/STM32CubeL4
384384

385385
stm32l5_nonsecure_dualbank_test:
386386
uses: ./.github/workflows/test-build.yml
@@ -436,12 +436,13 @@ jobs:
436436
arch: arm
437437
config-file: ./config/examples/stm32wb-delta.config
438438

439-
# TODO: stm32wb-pka-1mb.config requires STM32 HAL #include "stm32wbxx_hal.h
440-
# stm32wb_pka_1mb_test:
441-
# uses: ./.github/workflows/test-build.yml
442-
# with:
443-
# arch: arm
444-
# config-file: ./config/examples/stm32wb-pka-1mb.config
439+
stm32wb_pka_1mb_test:
440+
uses: ./.github/workflows/test-build-stm32cube.yml
441+
with:
442+
arch: arm
443+
config-file: ./config/examples/stm32wb-pka-1mb.config
444+
cube-repo: STMicroelectronics/STM32CubeWB
445+
make-args: PKA=1 NO_ARM_ASM=1
445446

446447
stm32wb_tpm_test:
447448
uses: ./.github/workflows/test-build.yml

lib/wolfssl

Submodule wolfssl updated 76 files

0 commit comments

Comments
 (0)