4141 fail-fast : false
4242 matrix :
4343 include :
44- - { build_type: 'release', verbose: '0' }
4544 - { build_type: 'debug', verbose: '0' }
4645 - { build_type: 'debug', verbose: '1' }
4746 steps :
7170 ./.github/scripts/build.sh VERBOSE=${{ matrix.verbose }}
7271
7372
73+ BuildVTR :
74+ name : ' B: Building VTR Release'
75+ runs-on : ubuntu-24.04
76+ steps :
77+ - name : Get number of CPU cores
78+ uses : SimenB/github-actions-cpu-cores@v2
79+ id : cpu-cores
80+
81+ - name : Install dependencies
82+ run : ./.github/scripts/install_dependencies.sh
83+
84+ -
uses :
hendrikmuhs/[email protected] 85+
86+ - name : Build
87+ env :
88+ CMAKE_PARAMS : " -DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=3"
89+ NUM_PROC : ${{ steps.cpu-cores.outputs.count }}
90+ run : |
91+ export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
92+ make -j${{ steps.cpu-cores.outputs.count}} release
93+
94+ - name : Pack Build
95+ shell : bash
96+ run : |
97+ tar -czvf build.tar.gz --exclude='CMakeFiles' --exclude='*.a' --exclude='*.cmake' build/
98+
99+ - name : Store Build Artifact
100+ uses : actions/upload-artifact@v4
101+ with :
102+ name : build-release.tar.gz
103+ path : build.tar.gz
104+ retention-days : 1
105+
106+ - name : Print CCache Statistics
107+ run : |
108+ ccache -s
109+
110+
74111 Format :
75112 runs-on : ubuntu-24.04
76113 strategy :
@@ -121,11 +158,9 @@ jobs:
121158 UnitTests :
122159 name : ' U: C++ Unit Tests'
123160 runs-on : ubuntu-24.04
161+ needs : [BuildVTR]
124162 steps :
125163
126- - uses : actions/setup-python@v5
127- with :
128- python-version : 3.12.3
129164 - uses : actions/checkout@v4
130165 with :
131166 submodules : ' true'
@@ -136,12 +171,20 @@ jobs:
136171
137172 - name : Install dependencies
138173 run : ./.github/scripts/install_dependencies.sh
174+
175+ - name : Download Build Artifact
176+ uses : actions/download-artifact@v4
177+ with :
178+ name : build-release.tar.gz
179+
180+ - name : Unpack Build
181+ shell : bash
182+ run : |
183+ tar -xvzf build.tar.gz
139184
140185 - name : Test
141- env :
142- CMAKE_PARAMS : " -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on"
143- NUM_PROC : ${{ steps.cpu-cores.outputs.count }}
144- run : ./.github/scripts/unittest.sh
186+ run : |
187+ make test -j${{ steps.cpu-cores.outputs.count }}
145188
146189
147190 # This test builds different variations of VTR (with different CMake Params)
@@ -389,6 +432,7 @@ jobs:
389432 Parmys :
390433 name : ' Parmys Basic Test'
391434 runs-on : ubuntu-24.04
435+ needs : [BuildVTR]
392436 steps :
393437
394438 - uses : actions/setup-python@v5
@@ -405,16 +449,18 @@ jobs:
405449 - name : Install dependencies
406450 run : ./.github/scripts/install_dependencies.sh
407451
408- -
uses :
hendrikmuhs/[email protected] 452+ - name : Download Build Artifact
453+ uses : actions/download-artifact@v4
454+ with :
455+ name : build-release.tar.gz
456+
457+ - name : Unpack Build
458+ shell : bash
459+ run : |
460+ tar -xvzf build.tar.gz
409461
410462 - name : Test
411- env :
412- CMAKE_PARAMS : ' -DVTR_IPO_BUILD=off'
413- BUILD_TYPE : debug
414- NUM_PROC : ${{ steps.cpu-cores.outputs.count }}
415463 run : |
416- export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
417- ./.github/scripts/build.sh
418464 ./run_reg_test.py parmys_reg_basic -show_failures -j${{ steps.cpu-cores.outputs.count }}
419465
420466
@@ -454,6 +500,7 @@ jobs:
454500 VQM2BLIF :
455501 name : ' VQM2BLIF Basic Tests'
456502 runs-on : ubuntu-24.04
503+ needs : [BuildVTR]
457504 steps :
458505
459506 - uses : actions/setup-python@v5
@@ -470,15 +517,18 @@ jobs:
470517 - name : Install dependencies
471518 run : ./.github/scripts/install_dependencies.sh
472519
473- -
uses :
hendrikmuhs/[email protected] 520+ - name : Download Build Artifact
521+ uses : actions/download-artifact@v4
522+ with :
523+ name : build-release.tar.gz
524+
525+ - name : Unpack Build
526+ shell : bash
527+ run : |
528+ tar -xvzf build.tar.gz
474529
475530 - name : Test
476- env :
477- BUILD_TYPE : release
478- NUM_PROC : ${{ steps.cpu-cores.outputs.count }}
479531 run : |
480- export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
481- ./.github/scripts/build.sh
482532 ./utils/vqm2blif/test/scripts/test_vqm2blif.sh
483533
484534 Compatibility :
@@ -558,6 +608,7 @@ jobs:
558608 name : ' Coverity Scan'
559609 needs :
560610 - Build
611+ - BuildVTR
561612 - Format
562613 - VerifyTestSuites
563614 - UnitTests
0 commit comments