-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (57 loc) · 1.55 KB
/
Copy pathci_linux.yml
File metadata and controls
72 lines (57 loc) · 1.55 KB
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
name: CI linux
defaults:
run:
shell: sh
on:
workflow_dispatch:
push:
paths-ignore:
- '.*'
- 'scripts/**'
- 'README.md'
pull_request:
paths-ignore:
- '.*'
- 'scripts/**'
- 'README.md'
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
env:
BUILD_TYPE: Debug
jobs:
build-and-tests:
runs-on: ubuntu-latest
continue-on-error: false
strategy:
fail-fast: true
matrix:
toolchain:
- clang
- gcc
# NOTE: hardcoded -> env.BUILD_TYPE variable cannot be used here! => Sucks!
include:
- toolchain: clang
cc : clang
cxx : clang++
bdir: build/lnx-Debug-clang
- toolchain: gcc
cc : gcc
cxx : g++
bdir: build/lnx-Debug-gcc
name: ${{matrix.toolchain}}
# TODO: cache deps
steps:
# will not work without checkout.
- uses: actions/checkout@v3
- name: ENV List All
run : env
- name: CMake Configure
run : >
cmake -S . -B ${{matrix.bdir}} -D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-D CMAKE_C_COMPILER=${{matrix.cc}} -D CMAKE_CXX_COMPILER=${{matrix.cxx}}
- name: Build
run : cmake --build ${{matrix.bdir}} --config ${{env.BUILD_TYPE}} -j $(getconf _NPROCESSORS_ONLN)
- name: Tests
run : ctest --test-dir ${{matrix.bdir}} -C ${{env.BUILD_TYPE}}
- name: Runner info lines
run : |
ls -la "${{matrix.bdir}}/_deps"