-
Notifications
You must be signed in to change notification settings - Fork 147
139 lines (118 loc) · 4.06 KB
/
test-build-cmake-windows.yml
File metadata and controls
139 lines (118 loc) · 4.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: WolfBoot CMake Build (Windows)
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ "*" ]
permissions:
contents: read
jobs:
windows-cmake:
name: Build on Windows
runs-on: windows-latest
# Reminder default is PowerShell runner, not DOS, unless otherwise specified.
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
target:
# - imx-rt # Disabled, requires NXP SDK
- stm32c0
- stm32f1
- stm32f4
- stm32f7
- stm32g0
- stm32h5
- stm32h7
- stm32l0
- stm32l4
- stm32l5
- stm32u5
- stm32wb
include:
# Optional per-target cache variables you might want to pass later.
# Keep empty for now to avoid guessing addresses.
- target: stm32l4
extra_cache: ""
- target: stm32h7
extra_cache: ""
- target: stm32g0
extra_cache: ""
steps:
- name: Checkout (with submodules)
uses: actions/checkout@v4
with:
submodules: true
# Lock down network/runner
# See https://github.com/step-security/harden-runner/releases
# Currently only supported on Ubuntu
# ARM GCC toolchain (adds the bin dir to PATH)
- name: Set up ARM none-eabi GCC 14.x
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: "14.2.Rel1" # <-- use 'release', not 'version'
path-env-var: ARM_NONE_EABI_GCC_PATH
# CMake + Ninja are preinstalled on windows-latest, but verify & print versions
- name: Tool versions
shell: cmd
run: |
:: Show some key toolchain versions
echo "Compiler versions:"
arm-none-eabi-gcc --version
echo ""
echo "CMake:"
cmake --version
echo
echo "Ninja:"
ninja --version
echo
::echo "MSVC (via vswhere):"
::"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.Component.MSBuild -property installationVersion
echo
echo "VS2022 Properties"
"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products *
echo
- name: List all environment variables
run: |
# Show environment settings
echo "All environment settings"
# set
# Get-ChildItem Env: | Sort-Object Name
$env:path -split ";"
# Get-ChildItem -Path 'C:\' -Filter stdint.h -Recurse -ErrorAction SilentlyContinue
- name: List Presets
shell: cmd
run: |
# Check available presets in CMakePresets.json
cmake -S . -B build-list --list-presets=configure
- name: Configure Preset "${{ matrix.target }}"
shell: cmd
run: |
# cmake runs in git bash
cmake --preset "${{ matrix.target }}"
echo "Configured: ${{ matrix.target }}"
- name: Build "${{ matrix.target }}"
shell: cmd
run: |
# cmake runs in git bash
# BUILD_DIR="build-${{ matrix.target }}"
cmake --build "build-${{ matrix.target }}" --parallel
# Optional: show interesting artifacts
- name: List build outputs
if: always()
shell: bash
run: |
BUILD_DIR="build-${{ matrix.target }}"
echo "=== Artifacts in $BUILD_DIR ==="
find "$BUILD_DIR" -maxdepth 3 -type f \( -name "*.elf" -o -name "*.bin" -o -name "*.hex" -o -name "bin-assemble" -o -name "keystore" \) -print || true
# Upload binaries if present (non-fatal if none)
- name: Upload firmware/artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: wolfboot-${{ matrix.target }}
path: |
build-${{ matrix.target }}/**/*.elf
build-${{ matrix.target }}/**/*.bin
build-${{ matrix.target }}/**/*.hex
if-no-files-found: warn