-
Notifications
You must be signed in to change notification settings - Fork 10
132 lines (110 loc) · 4.02 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
name: Build and run tests
on:
push:
branches: [ "master" ]
pull_request:
jobs:
ci_linux:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
variant:
- gcc-12
- gcc-13
- gcc-14
- clang-15
- clang-16
- gcc-arm32
- gcc-arm32-thumb
- gcc-aarch64
- msvc-wine
include:
- variant: gcc-12
deps: g++-12
cc: gcc-12
cxx: g++-12
- variant: gcc-13
deps: g++-13
cc: gcc-13
cxx: g++-13
- variant: gcc-14
deps: g++-14
cc: gcc-14
cxx: g++-14
- variant: clang-15
deps: clang-15 g++-13 libstdc++-14-dev- libgcc-14-dev-
cc: clang-15
cxx: clang++-15
- variant: clang-16
deps: clang-16
cc: clang-16
cxx: clang++-16
- variant: gcc-arm32
deps: g++-12-arm-linux-gnueabihf qemu-user-static
cc: arm-linux-gnueabihf-gcc-12
cxx: arm-linux-gnueabihf-g++-12
cxxflags: -static -marm -Wno-psabi
test_runner: qemu-arm-static
- variant: gcc-arm32-thumb
deps: g++-12-arm-linux-gnueabihf qemu-user-static
cc: arm-linux-gnueabihf-gcc-12
cxx: arm-linux-gnueabihf-g++-12
cxxflags: -static -mthumb -Wno-psabi
test_runner: qemu-arm-static
- variant: gcc-aarch64
deps: g++-12-aarch64-linux-gnu qemu-user-static
cc: aarch64-linux-gnu-gcc-12
cxx: aarch64-linux-gnu-g++-12
cxxflags: -static
test_runner: qemu-aarch64-static
- variant: msvc-wine
# Note: windows workers are in short supply on github,
# so run this on linux with wine.
# (TODO: switch this to Docker to speed things up)
deps: >
wine64 wine64-preloader wine64-tools python3 msitools
python3-simplejson python3-six ca-certificates winbind
init: |
cd /usr/bin
sudo ln -sf ../lib/wine/wine64 .
wine64 wineboot --init
while pgrep wineserver > /dev/null; do sleep 1; done
sudo mkdir -p /opt
sudo git clone https://github.com/mstorsjo/msvc-wine /opt/msvc-wine
cd /opt/msvc-wine
sudo env PYTHONUNBUFFERED=1 ./vsdownload.py --accept-license --dest /opt/msvc
sudo ./install.sh /opt/msvc
cmake_flags: -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_LINKER=link -DCMAKE_CXX_FLAGS_DEBUG="/MT /Zi /Ob0 /Od /RTC1" -DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded
env: PATH=/opt/msvc/bin/x64:$PATH
cc: cl
cxx: cl
cxxflags: /Iz:/opt/include /std:c++20 /bigobj /EHsc
test_runner: wine64
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get -q -q update
sudo apt-get install -q -q -y make cmake git libboost1.83-dev ${{ matrix.deps }}
sudo mkdir -p /opt/include
sudo cp -r /usr/include/boost /opt/include
- name: Variant-specific init
run: ${{ matrix.init }}
- name: Configure
run: >
mkdir -p ${{ github.workspace }}/build
&& cd ${{ github.workspace }}/build
&& env ${{ matrix.env }} cmake
-DCMAKE_C_COMPILER=${{ matrix.cc }}
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }}
-DCMAKE_CXX_FLAGS="${{ matrix.cxxflags }}"
-DCORRAL_BOOST=/opt/include
-DCORRAL_CATCH2=https://github.com/catchorg/catch2
-DCORRAL_TEST_RUNNER=${{ matrix.test_runner }}
${{ matrix.cmake_flags }}
${{ github.workspace }}
- name: Build
run: cd ${{ github.workspace }}/build && env ${{ matrix.env }} make
- name: Test
run: cd ${{ github.workspace }}/build && env ${{ matrix.env }} ctest --output-on-failure