Skip to content

Commit 2a14f40

Browse files
[CI] Consolidated Build Variation Tests
Different build variations of VTR were being run on different CI runners which was wasteful. Consolidated these build variations into a single job which will run on a single runner.
1 parent ea896e2 commit 2a14f40

File tree

1 file changed

+89
-32
lines changed

1 file changed

+89
-32
lines changed

.github/workflows/test.yml

Lines changed: 89 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
run: ./dev/${{ matrix.script }}
100100

101101

102-
UniTests:
102+
UnitTests:
103103
name: 'U: C++ Unit Tests'
104104
runs-on: ubuntu-24.04
105105
steps:
@@ -125,6 +125,92 @@ jobs:
125125
run: ./.github/scripts/unittest.sh
126126

127127

128+
# This test builds different variations of VTR (with different CMake Params)
129+
# and ensures that they can run the basic regression tests. This also ensures
130+
# that these build variations are warning clean.
131+
BuildVariations:
132+
runs-on: ubuntu-24.04
133+
name: 'B: Build Variations'
134+
env:
135+
# For the CI, we want all build variations to be warning clean.
136+
# NOTE: Need to turn IPO off due to false warnings being produced.
137+
COMMON_CMAKE_PARAMS: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off'
138+
steps:
139+
140+
- uses: actions/setup-python@v5
141+
with:
142+
python-version: 3.12.3
143+
144+
- uses: actions/checkout@v4
145+
with:
146+
submodules: 'true'
147+
148+
- name: 'Get number of CPU cores'
149+
uses: SimenB/github-actions-cpu-cores@v2
150+
id: cpu-cores
151+
152+
- name: 'Install dependencies'
153+
run: ./.github/scripts/install_dependencies.sh
154+
155+
- name: 'ccache'
156+
uses: hendrikmuhs/[email protected]
157+
158+
- name: 'Test with VTR_ASSERT_LEVEL 4'
159+
if: success() || failure()
160+
env:
161+
CMAKE_PARAMS: "${{ env.COMMON_CMAKE_PARAMS }} -DVTR_ASSERT_LEVEL=4"
162+
NUM_PROC: ${{ steps.cpu-cores.outputs.count }}
163+
run: |
164+
rm -f build/CMakeCache.txt
165+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
166+
make -j${{ steps.cpu-cores.outputs.count}}
167+
./run_reg_test.py vtr_reg_basic -show_failures -j${{ steps.cpu-cores.outputs.count}}
168+
169+
- name: 'Test with NO_GRAPHICS'
170+
if: success() || failure()
171+
env:
172+
CMAKE_PARAMS: "${{ env.COMMON_CMAKE_PARAMS }} -DVPR_USE_EZGL=off"
173+
NUM_PROC: ${{ steps.cpu-cores.outputs.count }}
174+
run: |
175+
rm -f build/CMakeCache.txt
176+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
177+
make -j${{ steps.cpu-cores.outputs.count}}
178+
./run_reg_test.py vtr_reg_basic -show_failures -j${{ steps.cpu-cores.outputs.count}}
179+
180+
- name: 'Test with NO_SERVER'
181+
if: success() || failure()
182+
env:
183+
CMAKE_PARAMS: "${{ env.COMMON_CMAKE_PARAMS }} -DVPR_USE_SERVER=off"
184+
NUM_PROC: ${{ steps.cpu-cores.outputs.count }}
185+
run: |
186+
rm -f build/CMakeCache.txt
187+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
188+
make -j${{ steps.cpu-cores.outputs.count}}
189+
./run_reg_test.py vtr_reg_basic -show_failures -j${{ steps.cpu-cores.outputs.count}}
190+
191+
- name: 'Test with CAPNPROTO disabled'
192+
if: success() || failure()
193+
env:
194+
CMAKE_PARAMS: "${{ env.COMMON_CMAKE_PARAMS }} -DVTR_ENABLE_CAPNPROTO=off"
195+
NUM_PROC: ${{ steps.cpu-cores.outputs.count }}
196+
run: |
197+
rm -f build/CMakeCache.txt
198+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
199+
make -j${{ steps.cpu-cores.outputs.count}}
200+
./run_reg_test.py vtr_reg_basic -show_failures -j${{ steps.cpu-cores.outputs.count}}
201+
202+
- name: 'Test with serial VPR_EXECUTION_ENGINE'
203+
if: success() || failure()
204+
env:
205+
CMAKE_PARAMS: "${{ env.COMMON_CMAKE_PARAMS }} -DVPR_EXECUTION_ENGINE=serial -DTATUM_EXECUTION_ENGINE=serial"
206+
NUM_PROC: ${{ steps.cpu-cores.outputs.count }}
207+
run: |
208+
rm -f build/CMakeCache.txt
209+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
210+
make -j${{ steps.cpu-cores.outputs.count}}
211+
./run_reg_test.py vtr_reg_basic -show_failures -j${{ steps.cpu-cores.outputs.count}}
212+
213+
128214
Regression:
129215
runs-on: ubuntu-24.04
130216
strategy:
@@ -137,42 +223,12 @@ jobs:
137223
suite: 'vtr_reg_basic',
138224
extra_pkgs: ""
139225
},
140-
{
141-
name: 'Basic with highest assertion level',
142-
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=4 -DWITH_BLIFEXPLORER=on',
143-
suite: 'vtr_reg_basic',
144-
extra_pkgs: ""
145-
},
146226
{
147227
name: 'Basic_odin',
148228
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DWITH_PARMYS=OFF -DWITH_ODIN=on',
149229
suite: 'vtr_reg_basic_odin',
150230
extra_pkgs: ""
151231
},
152-
{
153-
name: 'Basic with NO_GRAPHICS',
154-
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVPR_USE_EZGL=off',
155-
suite: 'vtr_reg_basic',
156-
extra_pkgs: ""
157-
},
158-
{
159-
name: 'Basic with NO_SERVER',
160-
params: '-DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVPR_USE_EZGL=on -DVPR_USE_SERVER=off',
161-
suite: 'vtr_reg_basic',
162-
extra_pkgs: ""
163-
},
164-
{
165-
name: 'Basic with CAPNPROTO disabled',
166-
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVTR_ENABLE_CAPNPROTO=off',
167-
suite: 'vtr_reg_basic',
168-
extra_pkgs: ""
169-
},
170-
{
171-
name: 'Basic with serial VPR_EXECUTION_ENGINE',
172-
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVPR_EXECUTION_ENGINE=serial -DTATUM_EXECUTION_ENGINE=serial',
173-
suite: 'vtr_reg_basic',
174-
extra_pkgs: ""
175-
},
176232
{
177233
name: 'Basic with VTR_ENABLE_DEBUG_LOGGING',
178234
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVTR_ENABLE_DEBUG_LOGGING=on',
@@ -484,7 +540,8 @@ jobs:
484540
needs:
485541
- Build
486542
- Format
487-
- UniTests
543+
- UnitTests
544+
- BuildVariations
488545
- Regression
489546
- Sanitized
490547
- Parmys

0 commit comments

Comments
 (0)