-
-
Notifications
You must be signed in to change notification settings - Fork 178
75 lines (59 loc) · 2.5 KB
/
devcontainer-smoketest.yaml
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
name: Smoketest Dockerfile builds for selected targets
on:
pull_request:
paths:
- '.devcontainer/sources/*'
- '.github/workflows/*'
push:
paths:
- '.devcontainer/sources/*'
- '.github/workflows/*'
jobs:
build-target:
strategy:
fail-fast: false # Continues to build other targets in the matrix, even if one fails.
matrix: # Add the target and build type you wish to generate firmware for:
include: [
{ target: SL_STK3701A, build-type: Debug, rtos: AzureRTOS},
{ target: ST_STM32F769I_DISCOVERY, build-type: Debug, rtos: ChibiOS },
{ target: M5Core2, build-type: Debug, rtos: ESP32 },
{ target: NXP_MIMXRT1060_EVK, build-type: Debug, rtos: All },
{ target: TI_CC1352R1_LAUNCHXL, build-type: Debug, rtos: TI, radio-freq: 915 }
]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Update repo submodules
run: |
git submodule update --init
- name: Adjust config templates for a devcontainer
run: |
# Move into the config directory
pushd config
# Rename the templates
mv user-prefs.TEMPLATE.json user-prefs.json
mv user-tools-repos.TEMPLATE.json user-tools-repos.json
# Adjust the file content for a valid radio frequency (TI targets)
sed -i -- 's|"RADIO_FREQUENCY": "CHANGE_ME_TO_A_VALID_VALUE_868_OR_915"|"RADIO_FREQUENCY": "${{ matrix.radio-freq }}"|g' user-prefs.json
# Adjust the file content for a devcontainer
sed -i -- 's|"name": "user-tools-repos-container"|"name": "user-tools-repos"|g' user-tools-repos.json
# Move out of the config directory
popd
- name: Adjust devcontainer.json for ${{ matrix.rtos }} source
run: |
# Move into the .devcontainer directory
pushd .devcontainer
# Target the dockerfile source.
sed -i -- 's|"dockerFile": "Dockerfile.All"|"dockerFile": "sources/Dockerfile.${{ matrix.rtos }}"|g' devcontainer.json
# Move out of the .devcontainer directory
popd
- name: Build ${{ matrix.target }} ${{ matrix.build-type }} Firmware
uses: devcontainers/[email protected]
with:
push: never
runCmd: |
# Build target:
cmake --preset=${{ matrix.target }} -DCMAKE_BUILD_TYPE=${{ matrix.build-type }}
cmake --build build