-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (45 loc) · 1.73 KB
/
ci.yml
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
---
name: Continuous Integration
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
build:
name: Build
strategy:
matrix:
target: ["host", "stm32f407", "windows"]
configuration: ["RelWithDebInfo"]
include:
- target: "stm32f407"
configuration: "MinSizeRel"
runs-on: [ubuntu-latest]
container: ghcr.io/philips-software/amp-devcontainer-cpp:v5.6.1@sha256:04cda0c73cd01f0d97879aba7871c5118147ea0478616c49e8c0643653fbbc8b # 5.6.1
steps:
- uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
if: ${{ matrix.target == 'windows' }}
id: cache-winsdk
with:
path: /winsdk
key: cache-winsdk
- if: ${{ matrix.target == 'windows' && steps.cache-winsdk.outputs.cache-hit != 'true' }}
run: xwin --accept-license splat --preserve-ms-arch-notation --include-debug-libs && mv .xwin-cache/splat/ /winsdk
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
submodules: true
- uses: hendrikmuhs/ccache-action@a1209f81afb8c005c13b4296c32e363431bffea5 # v1.2.17
with:
key: ${{ matrix.target}}-${{ matrix.configuration }}
- uses: lukka/run-cmake@af1be47fd7c933593f687731bc6fdbee024d3ff4 # v10.8
with:
configurePreset: "${{ matrix.target }}"
buildPreset: "${{ matrix.target }}-${{ matrix.configuration }}"
configurePresetAdditionalArgs: "['-DCMAKE_C_COMPILER_LAUNCHER=ccache', '-DCMAKE_CXX_COMPILER_LAUNCHER=ccache']"