Skip to content

Commit 6f18380

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

File tree

1 file changed

+61
-269
lines changed

1 file changed

+61
-269
lines changed

.github/workflows/actions-ci.yml

Lines changed: 61 additions & 269 deletions
Original file line numberDiff line numberDiff line change
@@ -164,298 +164,90 @@ 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
300-
- uses: actions/setup-go@v4
301-
with:
302-
go-version: '>=1.18'
303-
- name: Setup CMake
304-
uses: threeal/[email protected]
305-
with:
306-
generator: Ninja
307-
c-compiler: gcc-${{ matrix.gccversion }}
308-
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
387-
uses: threeal/[email protected]
388-
with:
389-
generator: Ninja
390-
c-compiler: clang-${{ matrix.clangversion }}
391-
cxx-compiler: clang++-${{ matrix.clangversion }}
392-
options: FIPS=${{ matrix.fips }} CMAKE_BUILD_TYPE=Release
393-
- name: Build Project
394-
run: cmake --build ./build --target all
395-
- name: Run tests
396-
run: cmake --build ./build --target run_tests
397-
398-
clang-ubuntu-2404-sanity:
399-
if: github.repository_owner == 'aws'
400-
needs: [sanity-test-run]
401-
strategy:
402-
fail-fast: false
403-
matrix:
404-
clangversion:
405-
- "16"
406-
- "17"
407-
- "18"
408-
fips:
409-
- "0"
410-
- "1"
411-
runs-on: ubuntu-24.04
412-
steps:
413-
- uses: actions/checkout@v3
196+
- uses: actions/checkout@v4
197+
if: matrix.fips == 0 || matrix.compiler[1] == 1
414198
- uses: actions/setup-go@v4
199+
if: matrix.fips == 0 || matrix.compiler[1] == 1
415200
with:
416201
go-version: '>=1.18'
417-
- name: Setup CMake
418-
uses: threeal/[email protected]
419-
with:
420-
generator: Ninja
421-
c-compiler: clang-${{ matrix.clangversion }}
422-
cxx-compiler: clang++-${{ matrix.clangversion }}
423-
options: FIPS=${{ matrix.fips }} CMAKE_BUILD_TYPE=Release
202+
- name: Setup Build
203+
if: matrix.fips == 0
204+
run:
205+
cmake -G Ninja -B ./build -DCMAKE_C_COMPILER=${{ matrix.compiler[2] }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler[3] }} -DCMAKE_BUILD_TYPE=Release
206+
- name: Setup FIPS Build
207+
if: matrix.fips == 1 && matrix.compiler[1] == 1
208+
run:
209+
cmake -G Ninja -B ./build -DCMAKE_C_COMPILER=${{ matrix.compiler[2] }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler[3] }} -DCMAKE_BUILD_TYPE=Release -DFIPS=1
424210
- name: Build Project
211+
if: matrix.fips == 0 || matrix.compiler[1] == 1
425212
run: cmake --build ./build --target all
426213
- name: Run tests
214+
if: matrix.fips == 0 || matrix.compiler[1] == 1
427215
run: cmake --build ./build --target run_tests
428216

429-
clang-19-sanity:
430-
if: github.repository_owner == 'aws'
431-
needs: [ sanity-test-run ]
217+
pedantic-tests:
218+
env:
219+
CC: gcc
220+
CXX: g++
432221
strategy:
433222
fail-fast: false
434223
matrix:
435-
fips:
436-
- "0"
437-
- "1"
438-
runs-on: ubuntu-22.04
224+
fips: [ 0, 1 ]
225+
compiler:
226+
- [ 'gcc15', 0, 'gcc', 'g++' ]
227+
- [ 'clang20', 1, 'clang', 'clang++' ]
228+
runs-on: ubuntu-latest
229+
container:
230+
image: ghcr.io/mattkretz/cplusplus-ci/${{ matrix.compiler[0] }}
439231
steps:
440-
- uses: actions/checkout@v3
232+
- uses: actions/checkout@v4
233+
if: matrix.fips == 0 || matrix.compiler[1] == 1
441234
- uses: actions/setup-go@v4
235+
if: matrix.fips == 0 || matrix.compiler[1] == 1
442236
with:
443237
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
450-
uses: threeal/[email protected]
451-
with:
452-
generator: Ninja
453-
c-compiler: clang-19
454-
cxx-compiler: clang++-19
455-
options: FIPS=${{ matrix.fips }} CMAKE_BUILD_TYPE=Release
238+
- name: Setup Build
239+
if: matrix.fips == 0
240+
run:
241+
cmake -G Ninja -B ./build -DCMAKE_C_COMPILER=${{ matrix.compiler[2] }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler[3] }} -DCMAKE_BUILD_TYPE=Release CMAKE_C_FLAGS=-pedantic CMAKE_CXX_FLAGS=-pedantic
242+
- name: Setup FIPS Build
243+
if: matrix.fips == 1 && matrix.compiler[1] == 1
244+
run:
245+
cmake -G Ninja -B ./build -DCMAKE_C_COMPILER=${{ matrix.compiler[2] }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler[3] }} -DCMAKE_BUILD_TYPE=Release CMAKE_C_FLAGS=-pedantic CMAKE_CXX_FLAGS=-pedantic -DFIPS=1
456246
- name: Build Project
247+
if: matrix.fips == 0 || matrix.compiler[1] == 1
457248
run: cmake --build ./build --target all
458249
- name: Run tests
250+
if: matrix.fips == 0 || matrix.compiler[1] == 1
459251
run: cmake --build ./build --target run_tests
460252

461253
OpenBSD:

0 commit comments

Comments
 (0)