Skip to content

Commit 236b71d

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 eb58578 commit 236b71d

File tree

1 file changed

+87
-30
lines changed

1 file changed

+87
-30
lines changed

.github/workflows/test.yml

Lines changed: 87 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,92 @@ jobs:
157157
./.github/scripts/build.sh
158158
159159
160+
# This test builds different variations of VTR (with different CMake Params)
161+
# and ensures that they can run the basic regression tests. This also ensures
162+
# that these build variations are warning clean.
163+
BuildVariations:
164+
runs-on: ubuntu-24.04
165+
name: 'B: Build Variations'
166+
env:
167+
# For the CI, we want all build variations to be warning clean.
168+
# NOTE: Need to turn IPO off due to false warnings being produced.
169+
COMMON_CMAKE_PARAMS: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off'
170+
steps:
171+
172+
- uses: actions/setup-python@v5
173+
with:
174+
python-version: 3.12.3
175+
176+
- uses: actions/checkout@v4
177+
with:
178+
submodules: 'true'
179+
180+
- name: 'Get number of CPU cores'
181+
uses: SimenB/github-actions-cpu-cores@v2
182+
id: cpu-cores
183+
184+
- name: 'Install dependencies'
185+
run: ./.github/scripts/install_dependencies.sh
186+
187+
- name: 'ccache'
188+
uses: hendrikmuhs/[email protected]
189+
190+
- name: 'Test with VTR_ASSERT_LEVEL 4'
191+
if: success() || failure()
192+
env:
193+
CMAKE_PARAMS: "${{ env.COMMON_CMAKE_PARAMS }} -DVTR_ASSERT_LEVEL=4"
194+
NUM_PROC: ${{ steps.cpu-cores.outputs.count }}
195+
run: |
196+
rm -f build/CMakeCache.txt
197+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
198+
make -j${{ steps.cpu-cores.outputs.count}}
199+
./run_reg_test.py vtr_reg_basic -show_failures -j${{ steps.cpu-cores.outputs.count}}
200+
201+
- name: 'Test with NO_GRAPHICS'
202+
if: success() || failure()
203+
env:
204+
CMAKE_PARAMS: "${{ env.COMMON_CMAKE_PARAMS }} -DVPR_USE_EZGL=off"
205+
NUM_PROC: ${{ steps.cpu-cores.outputs.count }}
206+
run: |
207+
rm -f build/CMakeCache.txt
208+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
209+
make -j${{ steps.cpu-cores.outputs.count}}
210+
./run_reg_test.py vtr_reg_basic -show_failures -j${{ steps.cpu-cores.outputs.count}}
211+
212+
- name: 'Test with NO_SERVER'
213+
if: success() || failure()
214+
env:
215+
CMAKE_PARAMS: "${{ env.COMMON_CMAKE_PARAMS }} -DVPR_USE_SERVER=off"
216+
NUM_PROC: ${{ steps.cpu-cores.outputs.count }}
217+
run: |
218+
rm -f build/CMakeCache.txt
219+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
220+
make -j${{ steps.cpu-cores.outputs.count}}
221+
./run_reg_test.py vtr_reg_basic -show_failures -j${{ steps.cpu-cores.outputs.count}}
222+
223+
- name: 'Test with CAPNPROTO disabled'
224+
if: success() || failure()
225+
env:
226+
CMAKE_PARAMS: "${{ env.COMMON_CMAKE_PARAMS }} -DVTR_ENABLE_CAPNPROTO=off"
227+
NUM_PROC: ${{ steps.cpu-cores.outputs.count }}
228+
run: |
229+
rm -f build/CMakeCache.txt
230+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
231+
make -j${{ steps.cpu-cores.outputs.count}}
232+
./run_reg_test.py vtr_reg_basic -show_failures -j${{ steps.cpu-cores.outputs.count}}
233+
234+
- name: 'Test with serial VPR_EXECUTION_ENGINE'
235+
if: success() || failure()
236+
env:
237+
CMAKE_PARAMS: "${{ env.COMMON_CMAKE_PARAMS }} -DVPR_EXECUTION_ENGINE=serial -DTATUM_EXECUTION_ENGINE=serial"
238+
NUM_PROC: ${{ steps.cpu-cores.outputs.count }}
239+
run: |
240+
rm -f build/CMakeCache.txt
241+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
242+
make -j${{ steps.cpu-cores.outputs.count}}
243+
./run_reg_test.py vtr_reg_basic -show_failures -j${{ steps.cpu-cores.outputs.count}}
244+
245+
160246
Regression:
161247
runs-on: ubuntu-24.04
162248
strategy:
@@ -169,42 +255,12 @@ jobs:
169255
suite: 'vtr_reg_basic',
170256
extra_pkgs: ""
171257
},
172-
{
173-
name: 'Basic with highest assertion level',
174-
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=4 -DWITH_BLIFEXPLORER=on',
175-
suite: 'vtr_reg_basic',
176-
extra_pkgs: ""
177-
},
178258
{
179259
name: 'Basic_odin',
180260
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DWITH_PARMYS=OFF -DWITH_ODIN=on',
181261
suite: 'vtr_reg_basic_odin',
182262
extra_pkgs: ""
183263
},
184-
{
185-
name: 'Basic with NO_GRAPHICS',
186-
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVPR_USE_EZGL=off',
187-
suite: 'vtr_reg_basic',
188-
extra_pkgs: ""
189-
},
190-
{
191-
name: 'Basic with NO_SERVER',
192-
params: '-DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVPR_USE_EZGL=on -DVPR_USE_SERVER=off',
193-
suite: 'vtr_reg_basic',
194-
extra_pkgs: ""
195-
},
196-
{
197-
name: 'Basic with CAPNPROTO disabled',
198-
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVTR_ENABLE_CAPNPROTO=off',
199-
suite: 'vtr_reg_basic',
200-
extra_pkgs: ""
201-
},
202-
{
203-
name: 'Basic with serial VPR_EXECUTION_ENGINE',
204-
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',
205-
suite: 'vtr_reg_basic',
206-
extra_pkgs: ""
207-
},
208264
{
209265
name: 'Basic with VTR_ENABLE_DEBUG_LOGGING',
210266
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVTR_ENABLE_DEBUG_LOGGING=on',
@@ -518,6 +574,7 @@ jobs:
518574
- Format
519575
- UniTests
520576
- Warnings
577+
- BuildVariations
521578
- Regression
522579
- Sanitized
523580
- Parmys

0 commit comments

Comments
 (0)