Skip to content

Commit f327cf2

Browse files
[CI] Added Odin Build
1 parent 17b0f24 commit f327cf2

File tree

1 file changed

+145
-31
lines changed

1 file changed

+145
-31
lines changed

.github/workflows/test.yml

Lines changed: 145 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,44 @@ jobs:
108108
ccache -s
109109
110110
111+
BuildVTRWithOdin:
112+
name: 'B: Building VTR Release With Odin'
113+
runs-on: ubuntu-24.04
114+
steps:
115+
- name: Get number of CPU cores
116+
uses: SimenB/github-actions-cpu-cores@v2
117+
id: cpu-cores
118+
119+
- name: Install dependencies
120+
run: ./.github/scripts/install_dependencies.sh
121+
122+
- uses: hendrikmuhs/[email protected]
123+
124+
- name: Build
125+
env:
126+
CMAKE_PARAMS: "-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DWITH_PARMYS=OFF -DWITH_ODIN=on"
127+
NUM_PROC: ${{ steps.cpu-cores.outputs.count }}
128+
run: |
129+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
130+
make -j${{ steps.cpu-cores.outputs.count}} release
131+
132+
- name: Pack Build
133+
shell: bash
134+
run: |
135+
tar -czvf build.tar.gz --exclude='CMakeFiles' --exclude='*.a' --exclude='*.cmake' build/
136+
137+
- name: Store Build Artifact
138+
uses: actions/upload-artifact@v4
139+
with:
140+
name: build-release-with-odin.tar.gz
141+
path: build.tar.gz
142+
retention-days: 1
143+
144+
- name: Print CCache Statistics
145+
run: |
146+
ccache -s
147+
148+
111149
Format:
112150
runs-on: ubuntu-24.04
113151
strategy:
@@ -272,9 +310,21 @@ jobs:
272310
make -j${{ steps.cpu-cores.outputs.count}}
273311
./run_reg_test.py vtr_reg_basic -show_failures -j${{ steps.cpu-cores.outputs.count}}
274312
313+
- name: 'Test with VTR_ENABLE_DEBUG_LOGGING enabled'
314+
if: success() || failure()
315+
env:
316+
CMAKE_PARAMS: "${{ env.COMMON_CMAKE_PARAMS }} -DVTR_ENABLE_DEBUG_LOGGING=on"
317+
NUM_PROC: ${{ steps.cpu-cores.outputs.count }}
318+
run: |
319+
rm -f build/CMakeCache.txt
320+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
321+
make -j${{ steps.cpu-cores.outputs.count}}
322+
./run_reg_test.py vtr_reg_basic -show_failures -j${{ steps.cpu-cores.outputs.count}}
323+
275324
276325
Regression:
277326
runs-on: ubuntu-24.04
327+
needs: [BuildVTR]
278328
strategy:
279329
fail-fast: false
280330
matrix:
@@ -285,29 +335,83 @@ jobs:
285335
suite: 'vtr_reg_basic',
286336
extra_pkgs: ""
287337
},
288-
{
289-
name: 'Basic_odin',
290-
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DWITH_PARMYS=OFF -DWITH_ODIN=on',
291-
suite: 'vtr_reg_basic_odin',
292-
extra_pkgs: ""
293-
},
294-
{
295-
name: 'Basic with VTR_ENABLE_DEBUG_LOGGING',
296-
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVTR_ENABLE_DEBUG_LOGGING=on',
297-
suite: 'vtr_reg_basic',
298-
extra_pkgs: ""
299-
},
300-
{
301-
name: 'Basic_odin with VTR_ENABLE_DEBUG_LOGGING',
302-
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVTR_ENABLE_DEBUG_LOGGING=on -DWITH_PARMYS=OFF -DWITH_ODIN=on',
303-
suite: 'vtr_reg_basic_odin',
304-
extra_pkgs: ""
305-
},
306338
{
307339
name: 'Strong',
308340
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on',
309341
suite: 'vtr_reg_strong',
310342
extra_pkgs: "libeigen3-dev"
343+
}
344+
]
345+
name: 'R: ${{ matrix.name }}'
346+
steps:
347+
348+
- uses: actions/setup-python@v5
349+
with:
350+
python-version: 3.12.3
351+
352+
- uses: actions/checkout@v4
353+
with:
354+
submodules: 'true'
355+
356+
- name: Get number of CPU cores
357+
uses: SimenB/github-actions-cpu-cores@v2
358+
id: cpu-cores
359+
360+
- name: Install dependencies
361+
run: ./.github/scripts/install_dependencies.sh
362+
363+
- name: Install external libraries
364+
run: sudo apt install -y ${{ matrix.extra_pkgs }}
365+
if: ${{ matrix.extra_pkgs }}
366+
367+
- name: Download Build Artifact
368+
uses: actions/download-artifact@v4
369+
with:
370+
name: build-release.tar.gz
371+
372+
- name: Unpack Build
373+
shell: bash
374+
run: |
375+
tar -xvzf build.tar.gz
376+
377+
- name: Test
378+
run: |
379+
./run_reg_test.py ${{ matrix.suite }} -show_failures -j${{ steps.cpu-cores.outputs.count}}
380+
381+
- name: Upload regression run files
382+
if: ${{ !cancelled() }}
383+
uses: actions/upload-artifact@v4
384+
with:
385+
name: ${{matrix.name}}_run_files
386+
path: |
387+
vtr_flow/**/*.out
388+
# vtr_flow/**/*.blif # Removed since it was taking too much space and was hardly used.
389+
vtr_flow/**/*.p
390+
vtr_flow/**/*.net
391+
vtr_flow/**/*.r
392+
393+
- name: Upload regression results
394+
if: ${{ !cancelled() }}
395+
uses: actions/upload-artifact@v4
396+
with:
397+
name: ${{matrix.name}}_results
398+
path: |
399+
vtr_flow/**/*.log
400+
vtr_flow/**/parse_results*.txt
401+
402+
403+
RegressionWithOdin:
404+
runs-on: ubuntu-24.04
405+
needs: [BuildVTRWithOdin]
406+
strategy:
407+
fail-fast: false
408+
matrix:
409+
include: [
410+
{
411+
name: 'Basic_odin',
412+
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DWITH_PARMYS=OFF -DWITH_ODIN=on',
413+
suite: 'vtr_reg_basic_odin',
414+
extra_pkgs: ""
311415
},
312416
{
313417
name: 'Strong_odin',
@@ -344,15 +448,18 @@ jobs:
344448
run: sudo apt install -y ${{ matrix.extra_pkgs }}
345449
if: ${{ matrix.extra_pkgs }}
346450

347-
- uses: hendrikmuhs/[email protected]
451+
- name: Download Build Artifact
452+
uses: actions/download-artifact@v4
453+
with:
454+
name: build-release-with-odin.tar.gz
455+
456+
- name: Unpack Build
457+
shell: bash
458+
run: |
459+
tar -xvzf build.tar.gz
348460
349461
- name: Test
350-
env:
351-
CMAKE_PARAMS: ${{ matrix.params }}
352-
NUM_PROC: ${{ steps.cpu-cores.outputs.count }}
353462
run: |
354-
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
355-
./.github/scripts/build.sh
356463
./run_reg_test.py ${{ matrix.suite }} -show_failures -j${{ steps.cpu-cores.outputs.count}}
357464
358465
- name: Upload regression run files
@@ -376,6 +483,7 @@ jobs:
376483
vtr_flow/**/*.log
377484
vtr_flow/**/parse_results*.txt
378485
486+
379487
Sanitized:
380488
runs-on: ubuntu-24.04
381489
strategy:
@@ -467,6 +575,7 @@ jobs:
467575
ODINII:
468576
name: 'ODIN-II Basic Test'
469577
runs-on: ubuntu-24.04
578+
needs: [BuildVTRWithOdin]
470579
steps:
471580

472581
- uses: actions/setup-python@v5
@@ -483,17 +592,19 @@ jobs:
483592
- name: Install dependencies
484593
run: ./.github/scripts/install_dependencies.sh
485594

486-
- uses: hendrikmuhs/[email protected]
595+
- name: Download Build Artifact
596+
uses: actions/download-artifact@v4
597+
with:
598+
name: build-release-with-odin.tar.gz
599+
600+
- name: Unpack Build
601+
shell: bash
602+
run: |
603+
tar -xvzf build.tar.gz
487604
488605
- name: Test
489-
env:
490-
CMAKE_PARAMS: '-DVTR_ASSERT_LEVEL=3 -DVTR_ENABLE_SANITIZE=on -DVTR_IPO_BUILD=off -DWITH_BLIFEXPLORER=on -DWITH_PARMYS=OFF -DWITH_ODIN=on'
491-
BUILD_TYPE: debug
492-
NUM_PROC: ${{ steps.cpu-cores.outputs.count }}
493606
run: |
494607
sudo sysctl -w vm.mmap_rnd_bits=28
495-
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
496-
./.github/scripts/build.sh
497608
./run_reg_test.py odin_reg_basic -show_failures -j${{ steps.cpu-cores.outputs.count }}
498609
499610
@@ -609,16 +720,19 @@ jobs:
609720
needs:
610721
- Build
611722
- BuildVTR
723+
- BuildVTRWithOdin
612724
- Format
613725
- VerifyTestSuites
614726
- UnitTests
615727
- BuildVariations
616728
- Regression
729+
- RegressionWithOdin
617730
- Sanitized
618731
- Parmys
619732
- ODINII
620733
- VQM2BLIF
621734
- Compatibility
735+
- JammyCompatibility
622736
runs-on: ubuntu-24.04
623737
steps:
624738

0 commit comments

Comments
 (0)