-
Notifications
You must be signed in to change notification settings - Fork 2
203 lines (167 loc) · 5.49 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
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright © 2022–2024 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
# Matthias Kretz <[email protected]>
name: CI
on:
push:
branches: [ master, main ]
pull_request:
jobs:
gcc:
strategy:
fail-fast: false
matrix:
version: [9, 10, 11, 12, 13]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
path: vir-simd
- name: Cache test data
id: cache-testdata
uses: actions/cache@v4
with:
path: vc-testdata
key: testdata-1
enableCrossOsArchive: true
- name: Download test data
if: steps.cache-testdata.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: VcDevel/vc-testdata
path: vc-testdata
- name: Install GCC ${{ matrix.version }}
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -y gcc-${{ matrix.version }} g++-${{ matrix.version }}
- name: Test installation
env:
CXX: g++-${{ matrix.version }}
run: |
cmake -S vir-simd -B cmake-build -DCMAKE_INSTALL_PREFIX:STRING=$HOME/vir-simd-cmake
cmake --build cmake-build --target install
cd vir-simd && make prefix=$HOME/vir-simd-make install
diff -r $HOME/vir-simd-cmake/include $HOME/vir-simd-make/include && echo "cmake and make installations match ✅"
- name: Run test suite
env:
CXX: g++-${{ matrix.version }}
run: cd vir-simd && make check DRIVEROPTS=-vvf
clang:
strategy:
fail-fast: false
matrix:
version: [16, 17]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
path: vir-simd
- name: Cache test data
id: cache-testdata
uses: actions/cache@v4
with:
path: vc-testdata
key: testdata-1
enableCrossOsArchive: true
- name: Download test data
if: steps.cache-testdata.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: VcDevel/vc-testdata
path: vc-testdata
- name: Install Clang ${{ matrix.version }}
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-${{ matrix.version }} main'
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -y g++-13 clang-${{ matrix.version }}
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 110 --slave /usr/bin/g++ g++ /usr/bin/g++-13
- name: Run test suite
env:
CXX: clang++-${{ matrix.version }}
run: cd vir-simd && make check DRIVEROPTS=-vvf
clang-libcxx:
strategy:
fail-fast: false
matrix:
version: [15, 17]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
path: vir-simd
- name: Cache test data
id: cache-testdata
uses: actions/cache@v4
with:
path: vc-testdata
key: testdata-1
enableCrossOsArchive: true
- name: Download test data
if: steps.cache-testdata.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: VcDevel/vc-testdata
path: vc-testdata
- name: Install Clang ${{ matrix.version }}
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-${{ matrix.version }} main'
sudo apt-get update
sudo apt-get install -y clang-${{ matrix.version }} libc++-${{ matrix.version }}-dev libc++abi-${{ matrix.version }}-dev
- name: Run test suite
env:
CXX: clang++-${{ matrix.version }}
CXXFLAGS: -stdlib=libc++
run: cd vir-simd && make check DRIVEROPTS=-vvf
emscripten:
strategy:
fail-fast: true
matrix:
version: [ latest ]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install emscripten ${{ matrix.version }}
run: |
cd
git clone --depth=1 https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install ${{ matrix.version }}
./emsdk activate ${{ matrix.version }}
- name: Run test suite
shell: bash
env:
CXX: em++
run: |
source ~/emsdk/emsdk_env.sh
make check DRIVEROPTS=-vvf
msvc:
strategy:
fail-fast: false
matrix:
os: [windows-2022]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
path: vir-simd
- name: Cache test data
id: cache-testdata
uses: actions/cache@v4
with:
path: vc-testdata
key: testdata-1
enableCrossOsArchive: true
- name: Download test data
if: steps.cache-testdata.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: VcDevel/vc-testdata
path: vc-testdata
- name: Configure test
run: cmake -S vir-simd -B build -DCMAKE_BUILD_TYPE:STRING=Release
- name: Compile test
run: cmake --build build --config Release --target check