Repository navigation
268 lines (253 loc) · 9.93 KB
/
Copy pathc-cpp.yml
File metadata and controls
268 lines (253 loc) · 9.93 KB
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
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
name: C/C++ CI
on:
push:
branches: [ "master" ]
# pull_request:
# branches: [ "master" ]
jobs:
build-gcc:
name: Build GCC
runs-on: ubuntu-latest
# only one compiler build at same time, so no weird cache behaviour happens
concurrency:
group: build-gcc
cancel-in-progress: false
steps:
- uses: actions/checkout@v6
# TODO: skip if cache hit
- name: install apt packages
run: sudo apt update && sudo apt install g++-14 bzip2 flex build-essential
- uses: webfactory/ssh-agent@v0.10.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: get gcc commit
id: get-gcc-commit
run: |
echo "commit=$(git rev-parse HEAD:submodules/gcc)" >> $GITHUB_OUTPUT
shell: bash
- name: cache gcc install
id: cache-gcc
uses: actions/cache@v5
with:
path: /opt/GCC
key: ${{ runner.os }}-gcc-${{ steps.get-gcc-commit.outputs.commit }}
- name: install gcc
run: |
git submodule update --init --depth=1 -- submodules/gcc
submodules/build-gcc.sh --install --dont-extend-paths-with-checking
if: steps.cache-gcc.outputs.cache-hit != 'true'
test-gcc-ivl:
name: Test my GCC extensions
needs: build-gcc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: install apt packages
run: sudo apt update && sudo apt install g++-14 bzip2 flex build-essential python3 python3-pytest tcl dejagnu expect
- uses: webfactory/ssh-agent@v0.10.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: restore gcc install
uses: actions/cache/restore@v5
id: cache-gcc
with:
path: /opt/GCC
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
fail-on-cache-miss: true
- name: fetch gcc submodule
run: git submodule update --init --depth=1 -- submodules/gcc
- name: run tests
run: |
mkdir -p /tmp/gcc-scratch
SRCDIR="$(realpath submodules/gcc)"
cd /tmp/gcc-scratch
"$SRCDIR/contrib/test_installed" --prefix=/opt/GCC --without-{gfortran,objc,gcc} --with-auto-host-h="$(find /opt/GCC -name auto-host.h)" -- --all dg.exp='ivl/*'
- name: dump log on failure
if: ${{ failure() }}
run: cat /tmp/gcc-scratch/g++.log && exit 1
- name: dump log on success
run: cat /tmp/gcc-scratch/g++.log
test-libstdcxx-ivl:
name: Test my libstdc++ extensions
needs: build-gcc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: install apt packages
run: sudo apt update && sudo apt install g++-14 bzip2 flex build-essential python3 python3-pytest tcl dejagnu expect
- uses: webfactory/ssh-agent@v0.10.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: restore gcc install
uses: actions/cache/restore@v5
id: cache-gcc
with:
path: /opt/GCC
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
fail-on-cache-miss: true
- name: fetch gcc submodule
run: git submodule update --init --depth=1 -- submodules/gcc
- name: run tests
run: |
mkdir -p /tmp/gcc-scratch
SRCDIR="$(realpath submodules/gcc)"
cd /tmp/gcc-scratch
"$SRCDIR/contrib/test_installed" --prefix=/opt/GCC --without-{gfortran,objc,gcc,g++} --with-auto-host-h="$(find /opt/GCC -name auto-host.h)"
PATH="/opt/GCC/bin:$PATH" runtest --all --tool libstdc++ --srcdir "$SRCDIR/libstdc++-v3/testsuite" conformance.exp='ivl/*'
- name: dump log on failure
if: ${{ failure() }}
run: cat /tmp/gcc-scratch/libstdc++.log && exit 1
- name: dump log on success
run: cat /tmp/gcc-scratch/libstdc++.log
build:
name: Build & Test
needs: build-gcc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: install apt packages
run: sudo apt update && sudo apt install --fix-missing libboost-all-dev libgit2-dev libfuse3-dev libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgl-dev libopengl-dev libglu1-mesa-dev libfftw3-dev libbenchmark-dev libglx-dev libopengl0 libgl1-mesa-dev mesa-common-dev libglu1-mesa-dev python3-multiprocess libncurses-dev
- uses: webfactory/ssh-agent@v0.10.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: fetch submodules
run: |
git submodule update --init --depth=1 -- submodules/{nlohmann-json,fmt,pugixml,raylib,boost}
git -C submodules/boost submodule update --init --depth=1 -- libs/json
- name: get gcc commit
id: get-gcc-commit
run: |
echo "commit=$(git rev-parse HEAD:submodules/gcc)" >> $GITHUB_OUTPUT
shell: bash
- name: restore gcc install
uses: actions/cache/restore@v5
id: cache-gcc
with:
path: /opt/GCC
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
fail-on-cache-miss: true
- name: activate gcc
run: |
echo "/opt/GCC/bin" >> $GITHUB_PATH
echo "LD_RUN_PATH=/opt/GCC/lib64" >> $GITHUB_ENV
- name: validate gcc
run: echo | g++ -xc++ -E --verbose -
- name: build
run: ./ci-build.sh
- name: test
run: ./run_built_tests.py
build-with-edg:
name: Build (with EDG)
needs: build-gcc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: install apt packages
run: sudo apt update && sudo apt install --fix-missing libboost-all-dev libgit2-dev libfuse3-dev libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgl-dev libopengl-dev libglu1-mesa-dev libfftw3-dev libbenchmark-dev libglx-dev libopengl0 libgl1-mesa-dev mesa-common-dev libglu1-mesa-dev python3-multiprocess libncurses-dev
- uses: webfactory/ssh-agent@v0.10.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: fetch submodules
run: |
git submodule update --init --depth=1 -- submodules/{nlohmann-json,fmt,pugixml,raylib,boost}
git -C submodules/boost submodule update --init --depth=1 -- libs/json
- name: get gcc commit
id: get-gcc-commit
run: |
echo "commit=$(git rev-parse HEAD:submodules/gcc)" >> $GITHUB_OUTPUT
shell: bash
- name: restore gcc install
uses: actions/cache/restore@v5
id: cache-gcc
with:
path: /opt/GCC
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
fail-on-cache-miss: true
- name: activate gcc
run: |
echo "/opt/GCC/bin" >> $GITHUB_PATH
echo "LD_RUN_PATH=/opt/GCC/lib64" >> $GITHUB_ENV
- name: validate gcc
run: echo | g++ -xc++ -E --verbose -
- name: build
run: ./build.py --report-durations --keep-going --verbose --jobs $(nproc) # nothing for now, just EDG itself
- name: test
run: ./run_built_tests.py
build2:
if: ${{ false }} # too broken, and dont care atm, TODO: fix
needs: build-gcc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: install apt packages
run: sudo apt update && sudo apt install --fix-missing libboost-all-dev libgit2-dev libfuse3-dev libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgl-dev libopengl-dev libglu1-mesa-dev libfftw3-dev libbenchmark-dev libglx-dev libopengl0 libgl1-mesa-dev mesa-common-dev libglu1-mesa-dev
- uses: webfactory/ssh-agent@v0.10.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: fetch submodules
run: |
git submodule update --init --depth=1 -- submodules/{nlohmann-json,fmt,pugixml,raylib}
- name: get gcc commit
id: get-gcc-commit
run: |
echo "commit=$(git rev-parse HEAD:submodules/gcc)" >> $GITHUB_OUTPUT
shell: bash
- name: restore gcc install
uses: actions/cache/restore@v5
id: cache-gcc
with:
path: /opt/GCC
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
fail-on-cache-miss: true
- name: activate gcc
run: |
echo "/opt/GCC/bin" >> $GITHUB_PATH
echo "LD_RUN_PATH=/opt/GCC/lib64" >> $GITHUB_ENV
- name: validate gcc
run: echo | g++ -xc++ -E --verbose -
- name: build2
run: ./bootstrap.sh /ivl/build_system /ivl/linux /ivl/process /ivl/algos /ivl/meta /ivl/utility /ivl/stl /ivl/reflection /ivl/parsing /ivl/frankl /ivl/context /ivl/isolated_execution /ivl/command_line_argument_parsing
check_ivl_headers_for_pragma_once:
name: Check headers for pragma once
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: install apt packages
run: sudo apt update && sudo apt install python3-more-itertools
- name: test
run: ./check_headers_for_pragma_once.py
fsyntax_only_global_test:
name: -fsyntax-only test
needs: build-gcc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: install apt packages
run: sudo apt update && sudo apt install libboost-all-dev libgit2-dev libfuse3-dev python3-multiprocess libfftw3-dev libbenchmark-dev
- uses: webfactory/ssh-agent@v0.10.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: fetch submodules
run: |
git submodule update --init --depth=1 -- submodules/{nlohmann-json,fmt,pugixml,raylib,boost}
git -C submodules/boost submodule update --init --depth=1 -- libs/json
- name: get gcc commit
id: get-gcc-commit
run: |
echo "commit=$(git rev-parse HEAD:submodules/gcc)" >> $GITHUB_OUTPUT
shell: bash
- name: restore gcc install
uses: actions/cache/restore@v5
id: cache-gcc
with:
path: /opt/GCC
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
fail-on-cache-miss: true
- name: activate gcc
run: |
echo "/opt/GCC/bin" >> $GITHUB_PATH
echo "LD_RUN_PATH=/opt/GCC/lib64" >> $GITHUB_ENV
- name: validate gcc
run: echo | g++ -xc++ -E --verbose -
- name: fsyntax-only-global-test
run: ./build.py --report-durations --keep-going --jobs $(nproc) --syntax-only /