-
Notifications
You must be signed in to change notification settings - Fork 147
106 lines (90 loc) · 2.78 KB
/
test-build-cmake-presets.yml
File metadata and controls
106 lines (90 loc) · 2.78 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
name: WolfBoot CMake Presets Build
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ "*" ]
permissions:
contents: read
packages: read
jobs:
ubuntu-cmake:
name: Build on Ubuntu
runs-on: ubuntu-latest
container:
image: ghcr.io/wolfssl/wolfboot-ci-arm:v1.0
timeout-minutes: 20
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
target:
# - sim
# - 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
- name: Trust workspace
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: List all environment variables
run: |
# Show environment settings
echo "All environment settings"
env | sort
- name: List Presets
run: |
# Check available presets in CMakePresets.json
cmake -S . -B build-list --list-presets=configure
- name: Configure Preset "${{ matrix.target }}"
run: |
# cmake runs in git bash
cmake --preset "${{ matrix.target }}"
echo "Configured: ${{ matrix.target }}"
- name: Build "${{ matrix.target }}"
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()
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