-
Notifications
You must be signed in to change notification settings - Fork 1
244 lines (230 loc) · 10 KB
/
c-cpp.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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
name: C/C++ CI
on:
push:
branches: [ tests, function_feature, move_feature, future_feature ]
pull_request:
branches: [ tests, function_feature, move_feature, future_feature ]
jobs:
unix:
#if: ${{ false }} # disable for now
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: macos-latest
name: MacOS clang++
TARGET: x86_64-apple-darwin
COMPILER: clang
LINKER: clang
LIBRARY_PATH: $LIBRARY_PATH
CPP_COMPILER: clang++
BUILD_SCRIPT: build_tests.sh
RUN_SCRIPT: run_tests.sh
SETUP_SCRIPT: |
chmod a+rwx ./build_tests.sh
chmod a+rwx ./run_tests.sh
- os: ubuntu-latest
name: Ubuntu g++5
TARGET: armv7-unknown-linux-musleabihf
COMPILER: arm-linux-gnueabihf-gcc-5
LINKER: gcc-5-arm-linux-gnueabihf
LIBRARY_PATH: $LIBRARY_PATH
CPP_COMPILER: g++
BUILD_SCRIPT: build_tests.sh
RUN_SCRIPT: run_tests.sh
SETUP_SCRIPT: |
chmod a+rwx ./build_tests.sh
chmod a+rwx ./run_tests.sh
- os: ubuntu-latest
name: Ubuntu g++ latest
TARGET: x86_64-unknown-linux-musl
COMPILER: gcc
LINKER: gcc
LIBRARY_PATH: $LIBRARY_PATH
CPP_COMPILER: g++
BUILD_SCRIPT: build_tests.sh
RUN_SCRIPT: run_tests.sh
SETUP_SCRIPT: |
chmod a+rwx ./build_tests.sh
chmod a+rwx ./run_tests.sh
- os: ubuntu-20.04
name: Ubuntu 20.04 g++3.4
COMPILER: gcc
LINKER: gcc
CPP_COMPILER: g++-3.4
LIBRARY_PATH: /usr/lib/x86_64-linux-gnu:$LIBRARY_PATH
BUILD_SCRIPT: build_tests.sh
RUN_SCRIPT: run_tests.sh
SETUP_SCRIPT: |
echo "deb [trusted=yes] http://old-releases.ubuntu.com/ubuntu/ hardy universe" | sudo tee -a /etc/apt/sources.list
echo "deb-src [trusted=yes] http://old-releases.ubuntu.com/ubuntu/ hardy universe" | sudo tee -a /etc/apt/sources.list
#echo "deb http://snapshot.debian.org/archive/debian/20070730T000000Z/ lenny main" | sudo tee -a /etc/apt/sources.list
#echo "deb-src http://snapshot.debian.org/archive/debian/20070730T000000Z/ lenny main" | sudo tee -a /etc/apt/sources.list
#echo "deb http://snapshot.debian.org/archive/debian-security/20070730T000000Z/ lenny/updates main" | sudo tee -a /etc/apt/sources.list
#echo "deb-src http://snapshot.debian.org/archive/debian-security/20070730T000000Z/ lenny/updates main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install gcc-3.4 g++-3.4 gcc-multilib g++-multilib
dpkg --list | grep compiler
sudo /sbin/ldconfig -p | grep libgcc
sudo ln -s /lib/x86_64-linux-gnu/libgcc_s.so.1 /lib/libgcc_s.so.1
chmod a+rwx ./build_tests.sh
chmod a+rwx ./run_tests.sh
- os: ubuntu-20.04
name: Ubuntu 20.04 g++4.4
COMPILER: gcc
LINKER: gcc
CPP_COMPILER: g++-4.4
LIBRARY_PATH: $LIBRARY_PATH
BUILD_SCRIPT: build_tests.sh
RUN_SCRIPT: run_tests.sh
SETUP_SCRIPT: |
echo "deb [trusted=yes] http://old-releases.ubuntu.com/ubuntu/ hardy universe" | sudo tee -a /etc/apt/sources.list
echo "deb-src [trusted=yes] http://old-releases.ubuntu.com/ubuntu/ hardy universe" | sudo tee -a /etc/apt/sources.list
echo "deb [trusted=yes] http://snapshot.debian.org/archive/debian/20070730T000000Z/ lenny main" | sudo tee -a /etc/apt/sources.list
echo "deb-src [trusted=yes] http://snapshot.debian.org/archive/debian/20070730T000000Z/ lenny main" | sudo tee -a /etc/apt/sources.list
echo "deb [trusted=yes] http://snapshot.debian.org/archive/debian-security/20070730T000000Z/ lenny/updates main" | sudo tee -a /etc/apt/sources.list
echo "deb-src [trusted=yes] http://snapshot.debian.org/archive/debian-security/20070730T000000Z/ lenny/updates main" | sudo tee -a /etc/apt/sources.list
sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu/ trusty main'
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu/ trusty universe'
sudo apt-get update
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install g++-4.4
dpkg --list | grep compiler
#sudo /sbin/ldconfig -p | grep libgcc
#sudo ln -s /lib/x86_64-linux-gnu/libgcc_s.so.1 /lib/libgcc_s.so.1
chmod a+rwx ./build_tests.sh
chmod a+rwx ./run_tests.sh
steps:
- uses: actions/checkout@v2
- name: setup enviroment
run: ${{matrix.SETUP_SCRIPT}}
- name: build tests
env:
COMPILER: ${{ matrix.CPP_COMPILER }}
LIBRARY_PATH: ${{ matrix.LIBRARY_PATH }}
run: |
./${{ matrix.BUILD_SCRIPT }}
- name: run tests
run: |
./${{ matrix.RUN_SCRIPT }}
windows:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-latest
name: Windows cl x32
COMPILER: cl
LINKER: ilink
CPP_COMPILER: cl
LIBRARY_PATH: ""
BUILD_SCRIPT: ~build_tests.bat
RUN_SCRIPT: run_tests.bat
SETUP_SCRIPT: |
set MSVS_VSVARS_PATH="C:\PROGRA~2\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
if exist %MSVS_VSVARS_PATH% (
echo %MSVS_VSVARS_PATH%
) else (
vswhere -latest
set MSVS_VSVARS_PATH="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
)
echo %MSVS_VSVARS_PATH%
if exist %MSVS_VSVARS_PATH% (
echo call %MSVS_VSVARS_PATH% > ~build_tests.bat
cat build_tests.bat >> ~build_tests.bat
) else (
echo "cannot find %MSVS_VSVARS_PATH%"
exit /B 1
)
- os: windows-latest
name: Windows cl x32 cpp98 ts
COMPILER: cl
LINKER: ilink
CPP_COMPILER: cl
LIBRARY_PATH: ""
BUILD_SCRIPT: ~build_tests.bat
RUN_SCRIPT: run_tests.bat
SETUP_SCRIPT: |
set MSVS_VSVARS_PATH="C:\PROGRA~2\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
if exist %MSVS_VSVARS_PATH% (
echo %MSVS_VSVARS_PATH%
) else (
vswhere -latest
set MSVS_VSVARS_PATH="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
)
echo %MSVS_VSVARS_PATH%
if exist %MSVS_VSVARS_PATH% (
echo call %MSVS_VSVARS_PATH% > ~build_tests.bat
echo set CL_GLOBAL_DEFINES=-D TESTSUIT_USING_CPP98 >> ~build_tests.bat
cat build_tests.bat >> ~build_tests.bat
) else (
echo "cannot find %MSVS_VSVARS_PATH%"
exit /B 1
)
- os: windows-latest
name: Windows cl x64
COMPILER: cl
LINKER: ilink
CPP_COMPILER: cl
LIBRARY_PATH: ""
BUILD_SCRIPT: ~build_tests.bat
RUN_SCRIPT: run_tests.bat
SETUP_SCRIPT: |
set MSVS_VSVARS_PATH="C:\PROGRA~2\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
if exist %MSVS_VSVARS_PATH% (
echo %MSVS_VSVARS_PATH%
) else (
vswhere -latest
set MSVS_VSVARS_PATH="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
)
echo %MSVS_VSVARS_PATH%
if exist %MSVS_VSVARS_PATH% (
echo call %MSVS_VSVARS_PATH% > ~build_tests.bat
cat build_tests.bat >> ~build_tests.bat
) else (
echo "cannot find %MSVS_VSVARS_PATH%"
exit /B 1
)
- os: windows-latest
name: Windows cl x64 cpp98 ts
COMPILER: cl
LINKER: ilink
CPP_COMPILER: cl
LIBRARY_PATH: ""
BUILD_SCRIPT: ~build_tests.bat
RUN_SCRIPT: run_tests.bat
SETUP_SCRIPT: |
set MSVS_VSVARS_PATH="C:\PROGRA~2\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
if exist %MSVS_VSVARS_PATH% (
echo %MSVS_VSVARS_PATH%
) else (
vswhere -latest
set MSVS_VSVARS_PATH="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
)
echo %MSVS_VSVARS_PATH%
if exist %MSVS_VSVARS_PATH% (
echo call %MSVS_VSVARS_PATH% > ~build_tests.bat
echo set CL_GLOBAL_DEFINES=-D TESTSUIT_USING_CPP98 >> ~build_tests.bat
cat build_tests.bat >> ~build_tests.bat
) else (
echo "cannot find %MSVS_VSVARS_PATH%"
exit /B 1
)
steps:
- uses: actions/checkout@v2
- name: setup enviroment
run: |
git submodule update --init --recursive
${{matrix.SETUP_SCRIPT}}
shell: cmd
- name: build tests
env:
COMPILER: ${{ matrix.CPP_COMPILER }}
LIBRARY_PATH: ${{ matrix.LIBRARY_PATH }}
run: |
${{ matrix.BUILD_SCRIPT }}
shell: cmd
- name: run tests
run: |
${{ matrix.RUN_SCRIPT }}
shell: cmd