-
Notifications
You must be signed in to change notification settings - Fork 0
125 lines (102 loc) · 3.37 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: CI
on:
push:
pull_request:
release:
types: [published]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ci:
name: ${{ matrix.os }}-${{ matrix.configurePreset}}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
name:
[ubuntu-gcc, ubuntu-clang, macos-appleclang, windows-msvc-22, windows-clang]
include:
- name: ubuntu-gcc
os: ubuntu-22.04
compiler: g++
configurePreset: ci-ninja-debug
- name: ubuntu-clang
os: ubuntu-22.04
compiler: clang++
configurePreset: ci-ninja-debug
- name: macos-appleclang
os: macos-14
configurePreset: ci-ninja-debug
- name: windows-msvc-22
os: windows-2022
configurePreset: ci-msvc-22
buildPreset: ci-msvc-debug
testPreset: ci-unit-tests-debug
- name: windows-clang
os: windows-2022
configurePreset: ci-ninja-windows-debug
steps:
- uses: actions/checkout@v4
- name: install-python-3
uses: actions/setup-python@v5
with:
python-version: 3.12.1
- name: install-python-deps
run: |
python3 -m pip install --upgrade pip
pip3 install pytest pytest-depends conan cpplint
- name: set-compiler-env
run: |
if [ "${{ matrix.compiler }}" != "" ]; then
echo "CXX=${{ matrix.compiler }}" >> $GITHUB_ENV
fi
cmake --version
shell: bash
- name: dependecies (macos)
if: runner.os == 'macOS'
run: |
brew update
brew install plantuml ninja clang-format llvm
brew install --cask doxygen
ln -s "/usr/local/opt/llvm/bin/clang-tidy" "/usr/local/bin/clang-tidy"
- name: dependencies (windows)
if: runner.os == 'Windows'
run: |
choco install -y --limit-output plantuml ninja opencppcoverage
choco install -y --limit-output doxygen.install --version="1.9.2"
choco install openssl --version 3.1.1 -y
echo "OPENSSL_ROOT_DIR=C:/Program Files/OpenSSL/" >> $GITHUB_ENV
shell: bash
- name: dependencies (debian-like)
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'debian')
run: |
sudo apt -y update
sudo apt -y install doxygen plantuml gcovr ninja-build cppcheck clang-tidy iwyu ccache
- name: correct-tmp-dir (win)
if: runner.os == 'Windows'
run: |
echo "TEMP=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV
echo "TMP=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV
shell: pwsh
- name: cmake-configure
run: |
cmake --preset=${{ matrix.configurePreset }}
- name: build
run: |
if [ "${{ matrix.buildPreset }}" == "" ]; then
cmake --build ./build
else
cmake --build --preset=${{ matrix.buildPreset }}
fi
shell: bash
- name: ctest
run: |
if [ "${{ matrix.testPreset }}" == "" ]; then
ctest --test-dir build
else
ctest --preset=${{ matrix.testPreset }}
fi
shell: bash
- name: pytest
run: python3 -m pytest -x -v