Repository navigation
executable file
·67 lines (60 loc) · 2.13 KB
/
Copy path02-Build-Firmware.yaml
File metadata and controls
executable file
·67 lines (60 loc) · 2.13 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
name: 02-Build-Firmware
on:
pull_request:
branches:
- main
- master
- "release/**"
workflow_dispatch:
inputs:
branch:
description: 'Branches to run the workflow on'
required: true
default: 'main'
permissions:
contents: read
jobs:
FW_build:
name: FW_build (${{ matrix.profile }} / ${{ matrix.board }})
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
profile:
- ssdk_2026_6
- gecko_4_5
board:
- EFR32BG21A010F1024IM32
- EFR32BG24A010F1024IM40
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.branch || github.ref }}
# Gecko SDK is not installed by SLT. Cache the 1.2 GB zip only; bootstrap
# extracts it into the same directory, which is mounted into the container.
- name: Restore Gecko SDK archive
if: matrix.profile == 'gecko_4_5'
uses: actions/cache@v4
with:
path: ~/.cache/iec60730/downloads/gecko-sdk-4.5.0.zip
key: gecko-sdk-4.5.0-${{ hashFiles('sdk_profiles/gecko_4_5/source_gsdk.path') }}
- name: Build Docker Image
run: |
IMAGE="$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')-build-env:latest"
docker build -t "$IMAGE" .
echo "IMAGE=$IMAGE" >> "$GITHUB_ENV"
- name: Build firmware in Docker
run: |
mkdir -p "${HOME}/.cache/iec60730"
docker run --rm \
-v "${{ github.workspace }}:/workspace" \
-v "${HOME}/.cache/iec60730:/root/.cache/iec60730" \
-e IEC60730_CACHE_DIR=/root/.cache/iec60730 \
-w /workspace \
"$IMAGE" /bin/bash -c \
"make apply-sdk-profile PROFILE=${{ matrix.profile }} && make RUNNER=native bootstrap && make RUNNER=native BOARD_NAME=${{ matrix.board }} build-unit && make RUNNER=native BOARD_NAME=${{ matrix.board }} build-integration"
- name: Clean up workspace
if: always()
run: sudo git clean -ffdx