-
Notifications
You must be signed in to change notification settings - Fork 13
116 lines (94 loc) · 3.08 KB
/
linux.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
name: linux
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
skip_duplicate:
name: 'Skip job?'
continue-on-error: true
runs-on: ubuntu-latest
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
paths: '["src/adiar/**", "test/**"]'
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
build_test:
name: 'Build + Test (Linux, ${{matrix.cc.cc}}-${{matrix.cc.v}})'
runs-on: ${{ matrix.os }}
needs: skip_duplicate
if: ${{ needs.skip_duplicate.outputs.should_skip != 'true' }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
cc:
# GNU Compiler
- { cc: gcc, v: 10, cxx: g++ } # oldest possible
- { cc: gcc, v: 11, cxx: g++ } # default
- { cc: gcc, v: 12, cxx: g++ } # newest
# Clang Compiler
# - { cc: clang, v: 11, cxx: clang++ } # oldest possible
- { cc: clang, v: 12, cxx: clang++ } # oldest supported
- { cc: clang, v: 14, cxx: clang++ } # default
- { cc: clang, v: 15, cxx: clang++ } # newst possible
env:
cc: ${{matrix.cc.cc}}-${{matrix.cc.v}}
cxx: ${{matrix.cc.cxx}}-${{matrix.cc.v}}
steps:
- name: Checkout commit
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Install dependencies
run: |
sudo apt update
echo "================================"
echo "Compiler"
sudo apt install build-essential
sudo apt install ${{matrix.cc.cc}}-${{matrix.cc.v}}
echo "================================"
echo "Boost"
sudo apt install libboost-all-dev
echo "================================"
echo "Graphviz"
sudo apt install graphviz
- name: Build tests
working-directory: ${{runner.workspace}}
run: |
export CC=${{ env.cc }}
export CXX=${{ env.cxx }}
cmake -E make_directory ${{github.workspace}}/build
cd ${{github.workspace}}/build
cmake -D CMAKE_BUILD_TYPE=DEBUG -D ADIAR_STATS=ON ..
cmake --build . --target test-adiar
- name: Run tests
working-directory: ${{github.workspace}}/build
run: ./test/test-adiar --reporter=info --colorizer=light
skip_build:
name: 'Build + Test (Linux, ${{matrix.cc.cc}}-${{matrix.cc.v}})'
runs-on: ubuntu-latest
needs: skip_duplicate
if: ${{ needs.skip_duplicate.outputs.should_skip == 'true' }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
cc:
# GNU Compiler
- { cc: gcc, v: 10, cxx: g++ } # oldest possible
- { cc: gcc, v: 11, cxx: g++ } # default
- { cc: gcc, v: 12, cxx: g++ } # newest
# Clang Compiler
- { cc: clang, v: 12, cxx: clang++ } # oldest possible
- { cc: clang, v: 14, cxx: clang++ } # default
- { cc: clang, v: 15, cxx: clang++ } # newst possible
steps:
- name: Echo skip
run: |
echo "Running unit tests is skipped"