-
Notifications
You must be signed in to change notification settings - Fork 249
141 lines (131 loc) · 4.39 KB
/
regression-tests.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
name: Regression tests
on:
pull_request:
paths-ignore:
- 'docs/**'
push:
paths-ignore:
- 'docs/**'
workflow_dispatch:
jobs:
regression-tests:
name: ${{ matrix.shortosname }} | ${{ matrix.compiler }} | ${{ matrix.cxx_std }} | ${{ matrix.stdlib }} | ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
CXX: ${{ matrix.compiler }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04]
shortosname: [ubu-24]
compiler: [g++-14, g++-13]
cxx_std: [c++2b]
stdlib: [libstdc++]
include:
- os: ubuntu-20.04
shortosname: ubu-20
compiler: g++-10
cxx_std: c++20
stdlib: libstdc++
- os: ubuntu-24.04
shortosname: ubu-24
compiler: clang++-18
cxx_std: c++20
stdlib: libstdc++
- os: ubuntu-24.04
shortosname: ubu-24
compiler: clang++-18
cxx_std: c++23
stdlib: libc++-18-dev
- os: ubuntu-22.04
shortosname: ubu-22
compiler: clang++-15
cxx_std: c++20
stdlib: libstdc++
- os: ubuntu-22.04
shortosname: ubu-22
compiler: clang++-15
cxx_std: c++20
stdlib: libc++-15-dev
- os: ubuntu-20.04
shortosname: ubu-20
compiler: clang++-12
cxx_std: c++20
stdlib: libstdc++
- os: macos-14
shortosname: mac-14
compiler: clang++
cxx_std: c++2b
stdlib: default
- os: macos-13
shortosname: mac-13
compiler: clang++
cxx_std: c++2b
stdlib: default
- os: macos-13
shortosname: mac-13
compiler: clang++-15
cxx_std: c++2b
stdlib: default
- os: windows-2022
shortosname: win-22
compiler: cl.exe
cxx_std: c++latest
stdlib: default
- os: windows-2022
shortosname: win-22
compiler: cl.exe
cxx_std: c++20
stdlib: default
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Prepare compilers
if: matrix.os == 'macos-13'
run: |
sudo xcode-select --switch /Applications/Xcode_14.3.1.app
sudo ln -s "$(brew --prefix llvm@15)/bin/clang" /usr/local/bin/clang++-15
- name: Run regression tests - Linux and macOS version
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
run: |
cd regression-tests
bash run-tests.sh -c ${{ matrix.compiler }} -s ${{ matrix.cxx_std }} -d ${{ matrix.stdlib }} -l ${{ matrix.os }}
- name: Run regression tests - Windows version
if: startsWith(matrix.os, 'windows')
run: |
"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" && ^
git config --local core.autocrlf false && ^
cd regression-tests && ^
bash run-tests.sh -c ${{ matrix.compiler }} -s ${{ matrix.cxx_std }} -d ${{ matrix.stdlib }} -l ${{ matrix.os }}
shell: cmd
- name: Upload patch
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.cxx_std }}-${{ matrix.stdlib }}.patch
path: regression-tests/${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.cxx_std }}-${{ matrix.stdlib }}.patch
if-no-files-found: ignore
aggregate-results:
needs: regression-tests
if: success() || failure()
runs-on: ubuntu-latest
steps:
- name: Download all patches
uses: actions/download-artifact@v4
with:
path: downloaded-results
- name: Prepare result files
id: prepare_files
run: |
mkdir aggregated-results
echo "Flattening file hierarchy"
find . -type f -wholename "./downloaded-results*" -exec mv {} aggregated-results \;
patch_count=$(ls aggregated-results 2>/dev/null | wc -l)
echo "patch_count=${patch_count}" >> $GITHUB_OUTPUT
- name: Upload aggregated results
if: steps.prepare_files.outputs.patch_count != '0'
uses: actions/upload-artifact@v4
with:
name: aggregated-results
path: aggregated-results
if-no-files-found: ignore