Skip to content

Commit f3d47d7

Browse files
committed
Simplify Compiler CI jobs
1 parent 4e97131 commit f3d47d7

File tree

1 file changed

+63
-255
lines changed

1 file changed

+63
-255
lines changed

.github/workflows/actions-ci.yml

Lines changed: 63 additions & 255 deletions
Original file line numberDiff line numberDiff line change
@@ -164,298 +164,106 @@ jobs:
164164
echo ${env:SDEROOT}
165165
.\tests\ci\run_windows_tests.bat "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 true
166166
167-
gcc-ubuntu-2004-sanity:
168-
if: github.repository_owner == 'aws'
169-
needs: [sanity-test-run]
170-
strategy:
171-
fail-fast: false
172-
matrix:
173-
gccversion:
174-
- "10"
175-
fips:
176-
- "0"
177-
- "1"
178-
runs-on: ubuntu-22.04
179-
container:
180-
image: ubuntu:20.04
181-
steps:
182-
- run: |
183-
env DEBIAN_FRONTEND=noninteractive apt-get update
184-
env DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential git curl cmake ninja-build \
185-
gcc-${{ matrix.gccversion }} g++-${{ matrix.gccversion }}
186-
- name: Install Newer Go Compiler
187-
run: |
188-
curl -L -o /tmp/go.tar.gz https://go.dev/dl/go1.24.2.linux-amd64.tar.gz
189-
cat <<EOF >/tmp/go.tar.gz.sha256
190-
68097bd680839cbc9d464a0edce4f7c333975e27a90246890e9f1078c7e702ad /tmp/go.tar.gz
191-
EOF
192-
sha256sum -c /tmp/go.tar.gz.sha256
193-
(cd /usr/local && tar xvf /tmp/go.tar.gz)
194-
- name: Checkout
195-
run: |
196-
git config --global --add safe.directory '*'
197-
git clone --recursive ${{ github.server_url }}/${{ github.repository }}.git .
198-
git fetch origin ${{ github.sha }}
199-
git checkout --recurse-submodules -b ci-job ${{ github.sha }}
200-
- name: Build Project
201-
run: |
202-
env PATH="/usr/local/go/bin:${PATH}" \
203-
CC=gcc-${{ matrix.gccversion }} CXX=g++-${{ matrix.gccversion }} \
204-
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DFIPS=${{ matrix.fips }} -GNinja
205-
cmake --build build --target all
206-
- name: Run Tests
207-
run: |
208-
cmake --build build --target run_tests
209-
210-
clang-ubuntu-2004-sanity:
211-
if: github.repository_owner == 'aws'
212-
needs: [sanity-test-run]
167+
compiler-tests:
168+
env:
169+
CC: gcc
170+
CXX: g++
213171
strategy:
214172
fail-fast: false
215173
matrix:
216-
clangversion:
217-
- "10"
218-
fips:
219-
- "0"
220-
- "1"
221-
runs-on: ubuntu-22.04
174+
fips: [0, 1]
175+
compiler:
176+
- ['gcc9', 1, 'gcc', 'g++']
177+
- ['gcc10', 1, 'gcc', 'g++']
178+
- ['gcc11', 1, 'gcc', 'g++']
179+
- ['gcc12', 1, 'gcc', 'g++']
180+
- ['gcc13', 1, 'gcc', 'g++']
181+
- ['gcc14', 0, 'gcc', 'g++']
182+
- ['gcc15', 0, 'gcc', 'g++']
183+
- ['gcc16', 0, 'gcc', 'g++']
184+
- ['clang14', 1, 'clang', 'clang++']
185+
- ['clang15', 1, 'clang', 'clang++']
186+
- ['clang16', 1, 'clang', 'clang++']
187+
- ['clang17', 1, 'clang', 'clang++']
188+
- ['clang18', 1, 'clang', 'clang++']
189+
- ['clang19', 1, 'clang', 'clang++']
190+
- ['clang20', 1, 'clang', 'clang++']
191+
- ['clang21', 1, 'clang', 'clang++']
192+
runs-on: ubuntu-latest
222193
container:
223-
image: ubuntu:20.04
224-
steps:
225-
- run: |
226-
env DEBIAN_FRONTEND=noninteractive apt-get update
227-
env DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential git curl cmake ninja-build \
228-
clang-${{ matrix.clangversion }} clang++-${{ matrix.clangversion }}
229-
- name: Install Newer Go Compiler
230-
run: |
231-
curl -L -o /tmp/go.tar.gz https://go.dev/dl/go1.24.2.linux-amd64.tar.gz
232-
cat <<EOF >/tmp/go.tar.gz.sha256
233-
68097bd680839cbc9d464a0edce4f7c333975e27a90246890e9f1078c7e702ad /tmp/go.tar.gz
234-
EOF
235-
sha256sum -c /tmp/go.tar.gz.sha256
236-
(cd /usr/local && tar xvf /tmp/go.tar.gz)
237-
- name: Checkout
238-
run: |
239-
git config --global --add safe.directory '*'
240-
git clone --recursive ${{ github.server_url }}/${{ github.repository }}.git .
241-
git fetch origin ${{ github.sha }}
242-
git checkout --recurse-submodules -b ci-job ${{ github.sha }}
243-
- name: Build Project
244-
run: |
245-
env PATH="/usr/local/go/bin:${PATH}" \
246-
CC=clang-${{ matrix.clangversion }} CXX=clang++-${{ matrix.clangversion }} \
247-
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DFIPS=${{ matrix.fips }} -GNinja
248-
cmake --build build --target all
249-
- name: Run Tests
250-
run: |
251-
cmake --build build --target run_tests
252-
253-
gcc-ubuntu-2204-sanity:
254-
if: github.repository_owner == 'aws'
255-
needs: [sanity-test-run]
256-
strategy:
257-
fail-fast: false
258-
matrix:
259-
gccversion:
260-
- "10"
261-
- "11"
262-
- "12"
263-
fips:
264-
- "0"
265-
- "1"
266-
runs-on: ubuntu-22.04
194+
image: ghcr.io/mattkretz/cplusplus-ci/${{ matrix.compiler[0] }}
267195
steps:
268-
- uses: actions/checkout@v3
269-
- uses: actions/setup-go@v4
270-
with:
271-
go-version: '>=1.18'
272-
- name: Setup CMake
273-
uses: threeal/[email protected]
274-
with:
275-
generator: Ninja
276-
c-compiler: gcc-${{ matrix.gccversion }}
277-
cxx-compiler: g++-${{ matrix.gccversion }}
278-
options: FIPS=${{ matrix.fips }} CMAKE_BUILD_TYPE=Release
279-
- name: Build Project
280-
run: cmake --build ./build --target all
281-
- name: Run tests
282-
run: cmake --build ./build --target run_tests
283-
284-
gcc-ubuntu-2404-sanity:
285-
if: github.repository_owner == 'aws'
286-
needs: [ sanity-test-run ]
287-
strategy:
288-
fail-fast: false
289-
matrix:
290-
gccversion:
291-
- "12"
292-
- "13"
293-
- "14"
294-
fips:
295-
- "0"
296-
- "1"
297-
runs-on: ubuntu-24.04
298-
steps:
299-
- uses: actions/checkout@v3
196+
- uses: actions/checkout@v4
197+
if: matrix.fips == 0 || matrix.compiler[1] == 1
300198
- uses: actions/setup-go@v4
199+
if: matrix.fips == 0 || matrix.compiler[1] == 1
301200
with:
302201
go-version: '>=1.18'
303-
- name: Setup CMake
202+
- name: Setup Build
203+
if: matrix.fips == 0
304204
uses: threeal/[email protected]
305205
with:
306206
generator: Ninja
307207
c-compiler: gcc-${{ matrix.gccversion }}
308208
cxx-compiler: g++-${{ matrix.gccversion }}
309-
options: FIPS=${{ matrix.fips }} CMAKE_BUILD_TYPE=Release
310-
- name: Build Project
311-
# TODO: Re-enable gcc-14/FIPS build once delocator updated
312-
if: ${{ !( matrix.gccversion == '14' && matrix.fips == '1' ) }}
313-
run: cmake --build ./build --target all
314-
- name: Run tests
315-
# TODO: Re-enable gcc-14/FIPS build once delocator updated
316-
if: ${{ !( matrix.gccversion == '14' && matrix.fips == '1' ) }}
317-
run: cmake --build ./build --target run_tests
318-
319-
gcc-13-pedantic:
320-
if: github.repository_owner == 'aws'
321-
needs: [ sanity-test-run ]
322-
runs-on: ubuntu-24.04
323-
steps:
324-
- uses: actions/checkout@v3
325-
- name: Setup CMake
326-
uses: threeal/[email protected]
327-
with:
328-
generator: Ninja
329-
c-compiler: gcc-13
330-
cxx-compiler: g++-13
331-
options: CMAKE_BUILD_TYPE=Release CMAKE_C_FLAGS=-pedantic CMAKE_CXX_FLAGS=-pedantic
332-
- name: Build Crypto
333-
run: cmake --build ./build --target crypto
334-
- name: Build SSL
335-
run: cmake --build ./build --target ssl
336-
337-
clang-19-pedantic:
338-
if: github.repository_owner == 'aws'
339-
needs: [ sanity-test-run ]
340-
runs-on: ubuntu-24.04
341-
steps:
342-
- uses: actions/checkout@v3
343-
- name: Install clang-19
344-
run: |
345-
wget https://apt.llvm.org/llvm.sh
346-
chmod u+x llvm.sh
347-
sudo ./llvm.sh 19
348-
- name: Setup CMake
349-
uses: threeal/[email protected]
350-
with:
351-
generator: Ninja
352-
c-compiler: clang-19
353-
cxx-compiler: clang++-19
354-
options: CMAKE_BUILD_TYPE=Release CMAKE_C_FLAGS=-pedantic CMAKE_CXX_FLAGS=-pedantic
355-
- name: Build Crypto
356-
run: cmake --build ./build --target crypto
357-
- name: Build SSL
358-
run: cmake --build ./build --target ssl
359-
360-
clang-ubuntu-2204-sanity:
361-
if: github.repository_owner == 'aws'
362-
needs: [sanity-test-run]
363-
strategy:
364-
fail-fast: false
365-
matrix:
366-
clangversion:
367-
- "11"
368-
- "12"
369-
- "13"
370-
- "14"
371-
- "15"
372-
fips:
373-
- "0"
374-
- "1"
375-
runs-on: ubuntu-22.04
376-
steps:
377-
- uses: actions/checkout@v3
378-
- uses: actions/setup-go@v4
379-
with:
380-
go-version: '>=1.18'
381-
- name: Install Clang ${{ matrix.clangversion }}
382-
if: ${{ matrix.clangversion == '11' || matrix.clangversion == '12' }}
383-
run: |
384-
env DEBIAN_FRONTEND=noninteractive sudo apt-get update
385-
env DEBIAN_FRONTEND=noninteractive sudo apt-get install -y clang-${{ matrix.clangversion }}
386-
- name: Setup CMake
209+
options: CMAKE_BUILD_TYPE=Release
210+
- name: Setup FIPS Build
211+
if: matrix.fips == 1 && matrix.compiler[1] == 1
387212
uses: threeal/[email protected]
388213
with:
389214
generator: Ninja
390-
c-compiler: clang-${{ matrix.clangversion }}
391-
cxx-compiler: clang++-${{ matrix.clangversion }}
392-
options: FIPS=${{ matrix.fips }} CMAKE_BUILD_TYPE=Release
215+
c-compiler: ${{ matrix.compiler[2] }}
216+
cxx-compiler: ${{ matrix.compiler[3] }}
217+
options: FIPS=1 CMAKE_BUILD_TYPE=Release
393218
- name: Build Project
219+
if: matrix.fips == 0 || matrix.compiler[1] == 1
394220
run: cmake --build ./build --target all
395221
- name: Run tests
222+
if: matrix.fips == 0 || matrix.compiler[1] == 1
396223
run: cmake --build ./build --target run_tests
397224

398-
clang-ubuntu-2404-sanity:
399-
if: github.repository_owner == 'aws'
400-
needs: [sanity-test-run]
225+
pedantic-tests:
226+
env:
227+
CC: gcc
228+
CXX: g++
401229
strategy:
402230
fail-fast: false
403231
matrix:
404-
clangversion:
405-
- "16"
406-
- "17"
407-
- "18"
408-
fips:
409-
- "0"
410-
- "1"
411-
runs-on: ubuntu-24.04
232+
fips: [ 0, 1 ]
233+
compiler:
234+
- [ 'gcc15', 0, 'gcc', 'g++' ]
235+
- [ 'clang20', 1, 'clang', 'clang++' ]
236+
runs-on: ubuntu-latest
237+
container:
238+
image: ghcr.io/mattkretz/cplusplus-ci/${{ matrix.compiler[0] }}
412239
steps:
413-
- uses: actions/checkout@v3
240+
- uses: actions/checkout@v4
241+
if: matrix.fips == 0 || matrix.compiler[1] == 1
414242
- uses: actions/setup-go@v4
243+
if: matrix.fips == 0 || matrix.compiler[1] == 1
415244
with:
416245
go-version: '>=1.18'
417-
- name: Setup CMake
246+
- name: Setup Build
247+
if: matrix.fips == 0
418248
uses: threeal/[email protected]
419249
with:
420250
generator: Ninja
421-
c-compiler: clang-${{ matrix.clangversion }}
422-
cxx-compiler: clang++-${{ matrix.clangversion }}
423-
options: FIPS=${{ matrix.fips }} CMAKE_BUILD_TYPE=Release
424-
- name: Build Project
425-
run: cmake --build ./build --target all
426-
- name: Run tests
427-
run: cmake --build ./build --target run_tests
428-
429-
clang-19-sanity:
430-
if: github.repository_owner == 'aws'
431-
needs: [ sanity-test-run ]
432-
strategy:
433-
fail-fast: false
434-
matrix:
435-
fips:
436-
- "0"
437-
- "1"
438-
runs-on: ubuntu-22.04
439-
steps:
440-
- uses: actions/checkout@v3
441-
- uses: actions/setup-go@v4
442-
with:
443-
go-version: '>=1.18'
444-
- name: Install clang-19
445-
run: |
446-
wget https://apt.llvm.org/llvm.sh
447-
chmod u+x llvm.sh
448-
sudo ./llvm.sh 19
449-
- name: Setup CMake
251+
c-compiler: gcc-${{ matrix.gccversion }}
252+
cxx-compiler: g++-${{ matrix.gccversion }}
253+
options: CMAKE_BUILD_TYPE=Release CMAKE_C_FLAGS=-pedantic CMAKE_CXX_FLAGS=-pedantic
254+
- name: Setup FIPS Build
255+
if: matrix.fips == 1 && matrix.compiler[1] == 1
450256
uses: threeal/[email protected]
451257
with:
452258
generator: Ninja
453-
c-compiler: clang-19
454-
cxx-compiler: clang++-19
455-
options: FIPS=${{ matrix.fips }} CMAKE_BUILD_TYPE=Release
259+
c-compiler: ${{ matrix.compiler[2] }}
260+
cxx-compiler: ${{ matrix.compiler[3] }}
261+
options: FIPS=1 CMAKE_BUILD_TYPE=Release CMAKE_C_FLAGS=-pedantic CMAKE_CXX_FLAGS=-pedantic
456262
- name: Build Project
263+
if: matrix.fips == 0 || matrix.compiler[1] == 1
457264
run: cmake --build ./build --target all
458265
- name: Run tests
266+
if: matrix.fips == 0 || matrix.compiler[1] == 1
459267
run: cmake --build ./build --target run_tests
460268

461269
OpenBSD:

0 commit comments

Comments
 (0)