Skip to content

Commit a8e0002

Browse files
authored
Merge pull request #3192 from AlexandreSinger/feature-ci-shrink-compat-builds
[CI] Speeding Up Compatibility Builds
2 parents 08acb67 + 99c2324 commit a8e0002

File tree

1 file changed

+21
-26
lines changed

1 file changed

+21
-26
lines changed

.github/workflows/test.yml

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -611,19 +611,19 @@ jobs:
611611
fail-fast: false
612612
matrix:
613613
include:
614-
- { name: 'GCC 11 (Ubuntu Noble - 24.04)', eval: 'CC=gcc-11 && CXX=g++-11', key: 'gcc-11', }
615-
- { name: 'GCC 12 (Ubuntu Noble - 24.04)', eval: 'CC=gcc-12 && CXX=g++-12', key: 'gcc-12', }
616-
- { name: 'GCC 14 (Ubuntu Noble - 24.04)', eval: 'CC=gcc-14 && CXX=g++-14', key: 'gcc-14', }
617-
- { name: 'Clang 16 (Ubuntu Noble - 24.04)', eval: 'CC=clang-16 && CXX=clang++-16', key: 'clang-16', }
618-
- { name: 'Clang 17 (Ubuntu Noble - 24.04)', eval: 'CC=clang-17 && CXX=clang++-17', key: 'clang-17', }
619-
- { name: 'Clang 18 (Ubuntu Noble - 24.04)', eval: 'CC=clang-18 && CXX=clang++-18', key: 'clang-18', }
614+
- { name: 'GCC 12 (Ubuntu Noble - 24.04)', CC: 'gcc-12', CXX: 'g++-12', }
615+
- { name: 'GCC 14 (Ubuntu Noble - 24.04)', CC: 'gcc-14', CXX: 'g++-14', }
616+
- { name: 'Clang 16 (Ubuntu Noble - 24.04)', CC: 'clang-16', CXX: 'clang++-16', }
617+
- { name: 'Clang 17 (Ubuntu Noble - 24.04)', CC: 'clang-17', CXX: 'clang++-17', }
618+
- { name: 'Clang 18 (Ubuntu Noble - 24.04)', CC: 'clang-18', CXX: 'clang++-18', }
620619
# Note: We do not include GCC-13 since it is the default and is already tested.
620+
# We also do not include GCC-11 since it is tested in the JammyCompatibility test.
621621
name: 'B: ${{ matrix.name }}'
622+
env:
623+
CC: ${{ matrix.CC }}
624+
CXX: ${{ matrix.CXX }}
622625
steps:
623626

624-
- uses: actions/setup-python@v5
625-
with:
626-
python-version: 3.12.3
627627
- uses: actions/checkout@v4
628628
with:
629629
submodules: 'true'
@@ -637,27 +637,24 @@ jobs:
637637

638638
- uses: hendrikmuhs/[email protected]
639639
with:
640-
key: ${{ github.job }}-${{ matrix.key }}
640+
key: ${{ github.job }}-${{ matrix.CC }}
641641

642-
- name: Test
642+
- name: Build
643643
env:
644-
CMAKE_PARAMS: "-DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DWITH_ODIN=on -DVTR_IPO_BUILD=off"
645-
MATRIX_EVAL: ${{ matrix.eval }}
646-
BUILD_TYPE: debug # Note: We use the debug build here to make the build time faster since we do not care about run time.
647-
NUM_PROC: ${{ steps.cpu-cores.outputs.count }}
644+
CMAKE_PARAMS: "-DVTR_ASSERT_LEVEL=3 -DVTR_IPO_BUILD=off"
645+
BUILD_TYPE: release # Note: Found that release build caches way better than debug build for this test.
648646
run: |
649647
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
650-
./.github/scripts/build.sh
648+
make -j${{ steps.cpu-cores.outputs.count}}
651649
652650
JammyCompatibility:
653651
name: 'Ubuntu Jammy - 22.04 Compatibility Test'
654652
runs-on: ubuntu-22.04
655653
needs: [BuildVTR]
654+
env:
655+
CC: gcc-11
656+
CXX: g++-11
656657
steps:
657-
- uses: actions/setup-python@v5
658-
with:
659-
python-version: 3.10.10
660-
661658
- uses: actions/checkout@v4
662659
with:
663660
submodules: 'true'
@@ -671,15 +668,13 @@ jobs:
671668

672669
- uses: hendrikmuhs/[email protected]
673670
with:
674-
key: ${{ github.job }}
671+
key: ${{ github.job }}-gcc-11
675672

676-
- name: Test
673+
- name: Build
677674
env:
678675
CMAKE_PARAMS: "-DVTR_ASSERT_LEVEL=3 -DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off"
679-
MATRIX_EVAL: 'CC=gcc-11 && CXX=g++-11'
680-
BUILD_TYPE: debug # Note: We use the debug build here to make the build time faster since we do not care about run time.
681-
NUM_PROC: ${{ steps.cpu-cores.outputs.count }}
676+
BUILD_TYPE: release # Note: Found that release build caches way better than debug build for this test.
682677
run: |
683678
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
684-
./.github/scripts/build.sh
679+
make -j${{ steps.cpu-cores.outputs.count}}
685680

0 commit comments

Comments
 (0)