-
Notifications
You must be signed in to change notification settings - Fork 8
67 lines (65 loc) · 2.27 KB
/
runtests.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
name: CI
on: [pull_request, workflow_dispatch]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
name: "ubuntu-22.04"
timeout-minutes: 60
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
sys:
- { compiler: 'gcc', version: '9'}
- { compiler: 'gcc', version: '10'}
- { compiler: 'gcc', version: '11'}
- { compiler: 'gcc', version: '12'}
- { compiler: 'clang', version: '11'}
- { compiler: 'clang', version: '12'}
- { compiler: 'clang', version: '13'}
- { compiler: 'clang', version: '14'}
- { compiler: 'clang', version: '15'}
steps:
- name: "Checkout HPCombi repo . . ."
uses: actions/checkout@v3
- name: "Setup compiler . . ."
if: ${{ matrix.sys.compiler == 'gcc' }}
run: |
GCC_VERSION=${{ matrix.sys.version }}
sudo apt-get --yes update
sudo apt-get install gcc-$GCC_VERSION
CC=gcc-$GCC_VERSION
echo "CC=$CC" >> $GITHUB_ENV
CXX=g++-$GCC_VERSION
echo "CXX=$CXX" >> $GITHUB_ENV
- name: "Setup compiler . . ."
if: ${{ matrix.sys.compiler == 'clang' }}
run: |
LLVM_VERSION=${{ matrix.sys.version }}
sudo apt-get --yes update
sudo apt-get install --yes clang++-$LLVM_VERSION
CC=clang-$LLVM_VERSION
echo "CC=$CC" >> $GITHUB_ENV
CXX=clang++-$LLVM_VERSION
echo "CXX=$CXX" >> $GITHUB_ENV
- name: "Install dependencies . . ."
run: |
sudo apt-get install --yes ccache
- name: "Configure the HPCombi build . . ."
env:
CC: ${{ env.CC }}
CXX: ${{ env.CXX }}
run: |
mkdir build
cd build
cmake -DBUILD_TESTING=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX ..
- name: "Build HPCombi . . ."
run: |
cd build/tests
make -j4
- name: "Run HPCombi tests . . ."
run: |
cd build/tests
./test_all