Skip to content

Switch QEMU from NETDUINOPLUS2 to B-L475E-IOT01A #65

Switch QEMU from NETDUINOPLUS2 to B-L475E-IOT01A

Switch QEMU from NETDUINOPLUS2 to B-L475E-IOT01A #65

Workflow file for this run

name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-24.04
strategy:
matrix:
board: [discoveryf4, discoveryf429, b-l475e-iot01a]
steps:
- uses: actions/checkout@v6
- name: Install ARM toolchain
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: '15.2.Rel1'
- name: Configure for ${{ matrix.board }}
run: make ${{ matrix.board }}_defconfig
- name: Build kernel
run: make
- name: Show binary size
run: arm-none-eabi-size build/${{ matrix.board }}/f9.elf
- name: Upload artifacts
uses: actions/upload-artifact@v6
with:
name: f9-${{ matrix.board }}
path: |
build/${{ matrix.board }}/f9.elf
build/${{ matrix.board }}/f9.bin
test:
runs-on: ubuntu-24.04
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
app: [tests, posix]
include:
- app: tests
name: "Kernel Test Suite"
config: USER_APP_TESTS
- app: posix
name: "POSIX Compliance (PSE51+PSE52)"
config: USER_APP_POSIX
name: test (${{ matrix.app }})
steps:
- uses: actions/checkout@v6
- name: Install ARM toolchain
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: '15.2.Rel1'
- name: Install QEMU
env:
GH_TOKEN: ${{ github.token }}
QEMU_VERSION: '10.2.2'
run: |
# Download prebuilt QEMU from GitHub release (built by qemu-build.yml)
asset="qemu-${QEMU_VERSION}-arm-softmmu-linux-x86_64.tar.gz"
gh release download "qemu-v${QEMU_VERSION}" \
--pattern "$asset" \
--dir /tmp
sudo tar -xzf "/tmp/${asset}" -C /opt
echo "/opt/qemu/bin" >> "$GITHUB_PATH"
/opt/qemu/bin/qemu-system-arm --version
/opt/qemu/bin/qemu-system-arm -M help | awk '{print $1}' | grep -Fx b-l475e-iot01a
- name: Configure for b-l475e-iot01a with ${{ matrix.name }}
run: |
# Bootstrap Kconfig tools (cloned on demand by make, but we
# need them before the first make invocation here)
make tools/kconfig/kconfiglib.py
cp board/b-l475e-iot01a/defconfig .config
# Enable selected test suite on top of board defaults
python3 tools/kconfig/setconfig.py \
${{ matrix.config }}=y
python3 tools/kconfig/genconfig.py --header-path include/autoconf.h Kconfig
- name: Verify configuration
run: |
echo "=== Build Configuration ==="
grep -E "^CONFIG_(QEMU|USER_APP_|BOARD_)" .config | grep "=y"
- name: Build
run: make
- name: Run tests
run: make run-tests
- name: Run MPU fault test
if: matrix.app == 'tests'
run: make run-tests FAULT=mpu
continue-on-error: true # MPU fault test may behave differently under QEMU
- name: Run stack canary fault test
if: matrix.app == 'tests'
run: make run-tests FAULT=canary
compile-hw:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
app: [tests, posix]
include:
- app: tests
config: USER_APP_TESTS
- app: posix
config: USER_APP_POSIX
name: compile-hw (${{ matrix.app }})
steps:
- uses: actions/checkout@v6
- name: Install ARM toolchain
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: '15.2.Rel1'
- name: Configure for discoveryf4 (hardware target)
run: |
make discoveryf4_defconfig
python3 tools/kconfig/setconfig.py ${{ matrix.config }}=y
python3 tools/kconfig/genconfig.py --header-path include/autoconf.h Kconfig
- name: Build (compile-only, no QEMU)
run: make