Skip to content

Merge pull request #184 from f9micro/posix #61

Merge pull request #184 from f9micro/posix

Merge pull request #184 from f9micro/posix #61

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, netduinoplus2]
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
run: sudo apt-get update && sudo apt-get install -y qemu-system-arm
- name: Configure for netduinoplus2 with ${{ matrix.name }}
run: |
make netduinoplus2_defconfig
# Enable QEMU mode and selected test suite
python3 tools/kconfig/setconfig.py \
QEMU=y \
${{ 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 not fully emulated in 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