-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (68 loc) · 2.34 KB
/
ctest.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
75
76
77
78
79
# This is a basic workflow to help you get started with Actions
name: Build and Test
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
workflow_call:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains build matrix
CTest:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
build: [Release, Debug]
target: [x64, win32]
compiler: [gcc, clang, msvc]
exclude:
- {os: ubuntu-latest, compiler: msvc}
- {os: ubuntu-latest, target: win32}
- {os: windows-latest, compiler: gcc}
- {os: windows-latest, compiler: clang}
# Test on specified OS
runs-on: ${{ matrix.os }}
# Configure - Build - Test
steps:
# Checks-out repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4.1.7
with:
submodules: true
# Configuration for GCC
- name: Configuration and build for gcc
if: matrix.compiler == 'gcc'
uses: threeal/cmake-action@v2.0.0
with:
c-compiler: gcc
cxx-compiler: g++
build-args: --config ${{ matrix.build }}
# Configuration for Clang
- name: Configuration for and build clang
if: matrix.compiler == 'clang'
uses: threeal/cmake-action@v2.0.0
with:
c-compiler: clang
cxx-compiler: clang++
build-args: --config ${{ matrix.build }}
# Configuration for MSVC
- name: Configuration for and build msvc
if: matrix.compiler == 'msvc'
uses: threeal/cmake-action@v2.0.0
with:
c-compiler: cl
cxx-compiler: cl
args : -A ${{ matrix.target }}
build-args: --config ${{ matrix.build }}
- name: Test
uses: threeal/ctest-action@v1.1.0
- name: Check Test Coverage
if: matrix.compiler == 'gcc' && matrix.build == 'Debug'
uses: threeal/gcovr-action@v1.1.0
with:
coveralls-send: true
excludes: build/* test/* mocksdkwrapper.hpp pico_sdk_apistub.cpp