-
Notifications
You must be signed in to change notification settings - Fork 8
107 lines (104 loc) · 4.21 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
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
---
name: Continuous Integration
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
jobs:
host_build_test_ubuntu:
name: Host Build & Test (ubuntu-latest)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.0.0
with:
persist-credentials: false
- uses: hendrikmuhs/ccache-action@faf867a11c028c0b483fb2ae72b6fc8f7d842714 # v1.2.12
with:
key: ${{ github.job }}-ubuntu-latest
variant: sccache
- uses: seanmiddleditch/gha-setup-ninja@8b297075da4cd2a5f1fd21fe011b499edf06e9d2 # v4
- uses: lukka/run-cmake@2ce8982be71b8e9a3c4d5e432135035afd1e76a7 # v10.7
with:
configurePreset: "host"
buildPreset: "host-Debug-WithPackage"
#testPreset: "host"
configurePresetAdditionalArgs: "['-DCMAKE_C_COMPILER_LAUNCHER=sccache', '-DCMAKE_CXX_COMPILER_LAUNCHER=sccache']"
- uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2
with:
name: hal_st
path: build/host/hal_st-*-Linux.tar.gz
if-no-files-found: error
#- name: Upload test logs
# if: ${{ failure() }}
# uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2
# with:
# name: test-logs
# path: build/host/Testing/Temporary/
host_build_test:
name: Host Build & Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, windows-2019, macos-latest]
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.0.0
with:
persist-credentials: false
- uses: hendrikmuhs/ccache-action@faf867a11c028c0b483fb2ae72b6fc8f7d842714 # v1.2.12
with:
key: ${{ github.job }}-${{ matrix.os }}
variant: sccache
- uses: lukka/run-cmake@2ce8982be71b8e9a3c4d5e432135035afd1e76a7 # v10.7
with:
configurePreset: "host-single-Debug"
buildPreset: "host-single-Debug"
#testPreset: "host-single-Debug"
configurePresetAdditionalArgs: "['-DCMAKE_C_COMPILER_LAUNCHER=sccache', '-DCMAKE_CXX_COMPILER_LAUNCHER=sccache']"
#- name: Upload test logs
# if: ${{ failure() }}
# uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2
# with:
# name: test-logs
# path: build/host/Testing/Temporary/
embedded_build:
name: Embedded Build
runs-on: ubuntu-latest
needs: [host_build_test_ubuntu]
strategy:
matrix:
configuration: ["RelWithDebInfo"]
gcc: [ "10.3-2021.10" ]
target: ["stm32wb55", "stm32g070", "stm32g431", "stm32f407", "stm32f429", "stm32f746", "stm32f767"]
include:
- gcc: "7-2018-q2"
configuration: "RelWithDebInfo"
target: "stm32f767"
- gcc: "8-2019-q3"
configuration: "RelWithDebInfo"
target: "stm32f767"
- gcc: "9-2020-q2"
configuration: "RelWithDebInfo"
target: "stm32f767"
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Install GNU Arm Embedded Toolchain ${{ matrix.gcc }}
uses: carlosperate/arm-none-eabi-gcc-action@3bd7199be896455c00fffba8a216770a3003a538 # v1.8.1
with:
release: ${{ matrix.gcc }}
- run: sudo apt-get update && sudo apt-get install ninja-build xsltproc
- uses: hendrikmuhs/ccache-action@faf867a11c028c0b483fb2ae72b6fc8f7d842714 # v1.2.12
with:
key: ${{ matrix.gcc }}-${{ matrix.configuration }}-${{ matrix.target }}
- uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
with:
name: hal_st
- run: tar -zxvf hal_st-*.tar.gz
- run: mkdir install && mv hal_st-*/* install/
- uses: lukka/run-cmake@2ce8982be71b8e9a3c4d5e432135035afd1e76a7 # v10.7
with:
configurePreset: ${{ matrix.target }}
buildPreset: ${{ matrix.target }}-${{ matrix.configuration }}
configurePresetAdditionalArgs: "['-DCMAKE_C_COMPILER_LAUNCHER=ccache', '-DCMAKE_CXX_COMPILER_LAUNCHER=ccache']"