66 pull_request :
77 branches : [ "*" ]
88
9+ permissions :
10+ contents : read
11+
912jobs :
1013 windows-cmake :
11- name : Build on Windows (CMake + Ninja)
14+ name : Build on Windows
1215 runs-on : windows-latest
1316 timeout-minutes : 20
1417
@@ -18,31 +21,46 @@ jobs:
1821 target :
1922 - stm32l4
2023 - stm32h7
24+ - stm32g0
2125 include :
2226 # Optional per-target cache variables you might want to pass later.
2327 # Keep empty for now to avoid guessing addresses.
2428 - target : stm32l4
2529 extra_cache : " "
2630 - target : stm32h7
2731 extra_cache : " "
32+ - target : stm32g0
33+ extra_cache : " "
2834
2935 steps :
3036 - name : Checkout (with submodules)
3137 uses : actions/checkout@v4
3238 with :
3339 submodules : true
3440
41+ # Lock down network/runner
42+ # See https://github.com/step-security/harden-runner/releases
43+ - uses : step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a
44+ with :
45+ egress-policy : block
46+ allowed-endpoints : >
47+ developer.arm.com,
48+ armkeil.blob.core.windows.net,
49+ github.com, objects.githubusercontent.com, api.github.com
50+
3551 # ARM GCC toolchain (adds the bin dir to PATH)
3652 - name : Set up ARM none-eabi GCC 14.x
3753 uses : carlosperate/arm-none-eabi-gcc-action@v1
3854 with :
39- version : " 14.2.Rel1" # <-- use 'release', not 'version'
55+ release : " 14.2.Rel1" # <-- use 'release', not 'version'
4056 path-env-var : ARM_NONE_EABI_GCC_PATH
4157
4258 # CMake + Ninja are preinstalled on windows-latest, but verify & print versions
4359 - name : Tool versions
4460 shell : bash
4561 run : |
62+ # Show some key toolchain versions
63+
4664 echo "Compiler versions:"
4765 arm-none-eabi-gcc --version
4866 echo
@@ -55,45 +73,27 @@ jobs:
5573 echo "MSVC (via vswhere):"
5674 cmd.exe /c "\"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe\" -latest -products * -requires Microsoft.Component.MSBuild -property installationVersion"
5775
58- - name : Build via cmd inline
59- shell : cmd
60- run : |
61- if exist build-windows-stm32l4 rmdir /s /q build-windows-stm32l4
62- cmake --preset windows-stm32l4
63- cmake --build --preset windows-stm32l4 --parallel %NUMBER_OF_PROCESSORS%
64-
65- - name : Build via batch (cmd)
66- shell : cmd
76+ - name : List Presets
77+ shell : bash
6778 run : |
68- :: # Call my_test.bat
79+ # Check available presets in CMakePresets.json
6980
70- call my_test.bat
81+ cmake -S . -B build-list --list-presets=configure
7182
72- - name : Configure (CMake + Ninja)
83+ - name : Configure Preset "${{ matrix.target }}"
7384 shell : bash
7485 run : |
7586 # cmake runs in git bash
7687
77- BUILD_DIR="build-${{ matrix.target }}"
78- cmake -S . -B "$BUILD_DIR" -G Ninja \
79- -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain_arm-none-eabi.cmake \
80- -DWOLFBOOT_CONFIG_MODE=preset \
81- -DWOLFBOOT_TARGET=${{ matrix.target }} \
82- -DBUILD_TEST_APPS=ON \
83- -DWOLFBOOT_PARTITION_BOOT_ADDRESS=0x8020000 \
84- -DWOLFBOOT_SECTOR_SIZE=0x20000 \
85- -DWOLFBOOT_PARTITION_SIZE=0xD0000 \
86- -DWOLFBOOT_PARTITION_UPDATE_ADDRESS=0x80F0000 \
87- -DWOLFBOOT_PARTITION_SWAP_ADDRESS=0x81C0000 \
88- ${{ matrix.extra_cache }}
89- echo "Configured: $BUILD_DIR"
90-
91- - name : Build
88+ cmake --preset "${{ matrix.target }}"
89+ echo "Configured: ${{ matrix.target }}"
90+
91+ - name : Build "${{ matrix.target }}"
9292 shell : bash
9393 run : |
9494 # cmake runs in git bash
9595 BUILD_DIR="build-${{ matrix.target }}"
96- cmake --build "$BUILD_DIR " --parallel
96+ cmake --build "build-${{ matrix.target }} " --parallel
9797
9898 # Optional: show interesting artifacts
9999 - name : List build outputs
0 commit comments