forked from eliaskosunen/scnlib
-
Notifications
You must be signed in to change notification settings - Fork 0
150 lines (127 loc) · 3.63 KB
/
lite.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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
name: Light builds
on:
push:
branches-ignore:
- master
- dev
paths:
- '.github/**'
- 'benchmark/**'
- 'cmake/**'
- 'examples/**'
- 'include/**'
- 'src/**'
- 'test/**'
- '**/CMakeLists.txt'
- '**/.gitmodules'
pull_request:
branches-ignore:
- master
- dev
paths:
- '.github/**'
- 'benchmark/**'
- 'cmake/**'
- 'examples/**'
- 'include/**'
- 'src/**'
- 'test/**'
- '**/CMakeLists.txt'
- '**/.gitmodules'
workflow_dispatch:
jobs:
lite-linux:
runs-on: ubuntu-${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ 22.04, 20.04 ]
std: [ 11, 20 ]
# FIXME: using clang-15 explicitly because of https://github.com/actions/runner-images/issues/8659
cxx: [ g++, clang++-15 ]
steps:
- name: Setup CMake and Ninja
uses: lukka/get-cmake@latest
- name: Create Build Environment
run: |
mkdir ${{ runner.workspace }}/build
sudo locale-gen en_US.UTF-8
sudo locale-gen fi_FI.UTF-8
sudo update-locale
sudo locale -a
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
if [[ "${{ matrix.cxx }}" == "clang++-15" ]]; then
sudo ./llvm.sh 15
fi
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Run CMake
working-directory: ${{ runner.workspace }}/build
env:
CXX: ${{ matrix.cxx }}
run: |
cmake -G Ninja -DSCN_WERROR=ON -DSCN_TESTS_LOCALIZED=ON \
-DCMAKE_CXX_STANDARD=${{ matrix.std }} \
$GITHUB_WORKSPACE
- name: Build
working-directory: ${{ runner.workspace }}/build
run: cmake --build . -- -k 0
- name: Test
working-directory: ${{ runner.workspace }}/build
run: ctest --output-on-failure
lite-windows:
runs-on: windows-${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ 2019, 2022 ]
platform: [ x64 ]
type: [ Debug ]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Create Build Environment
run: cmake -E make_directory ${{ runner.workspace }}/build
- name: Run CMake
working-directory: ${{ runner.workspace }}/build
shell: bash
run: |
cmake -A ${{ matrix.platform }} $GITHUB_WORKSPACE
- name: Build
working-directory: ${{ runner.workspace }}/build
run: cmake --build . --config ${{ matrix.type }} --parallel
- name: Test
working-directory: ${{ runner.workspace }}/build
run: ctest -C ${{ matrix.type }} --output-on-failure
lite-macos:
runs-on: macos-12
strategy:
fail-fast: false
matrix:
cxx: [ g++, clang++ ]
std: [ 11, 20 ]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Create Build Environment
run: |
mkdir ${{ runner.workspace }}/build
- name: Run CMake
working-directory: ${{ runner.workspace }}/build
env:
CXX: ${{ matrix.cxx }}
run: |
cmake -DSCN_WERROR=ON -DCMAKE_CXX_STANDARD=${{ matrix.std }} $GITHUB_WORKSPACE
- name: Build
working-directory: ${{ runner.workspace }}/build
run: cmake --build . --parallel -- -k
- name: Test
working-directory: ${{ runner.workspace }}/build
run: ctest --output-on-failure