-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (27 loc) · 1 KB
/
cmake.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
name: CMake
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# env:
# BUILD_TYPE: Debug
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure CMake for host
run: cmake -B ${{github.workspace}}/cmake-host-build-debug -DHOST=True -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build for host
run: cmake --build ${{github.workspace}}/cmake-host-build-debug -- -j 4
- name: Test on host
run: ctest --test-dir ${{github.workspace}}/cmake-host-build-debug
- name: Install gcc-arm-none-eabi
run: sudo apt install gcc-arm-none-eabi
- name: Configure CMake for target
run: cmake -B ${{github.workspace}}/cmake-target-build-debug -DCMAKE_TOOLCHAIN_FILE=../cmake/arm-none-eabi-gcc.cmake -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build for target
run: cmake --build ${{github.workspace}}/cmake-target-build-debug -- -j 4