Skip to content

Commit 420e318

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

File tree

1 file changed

+155
-33
lines changed

1 file changed

+155
-33
lines changed

.github/workflows/test.yml

Lines changed: 155 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ jobs:
7474
name: 'B: Building VTR Release'
7575
runs-on: ubuntu-24.04
7676
steps:
77+
- uses: actions/checkout@v4
78+
with:
79+
submodules: 'true'
80+
7781
- name: Get number of CPU cores
7882
uses: SimenB/github-actions-cpu-cores@v2
7983
id: cpu-cores
@@ -86,10 +90,11 @@ jobs:
8690
- name: Build
8791
env:
8892
CMAKE_PARAMS: "-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=3"
93+
BUILD_TYPE: release
8994
NUM_PROC: ${{ steps.cpu-cores.outputs.count }}
9095
run: |
9196
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
92-
make -j${{ steps.cpu-cores.outputs.count}} release
97+
make -j${{ steps.cpu-cores.outputs.count}}
9398
9499
- name: Pack Build
95100
shell: bash
@@ -108,6 +113,49 @@ jobs:
108113
ccache -s
109114
110115
116+
BuildVTRWithOdin:
117+
name: 'B: Building VTR Release With Odin'
118+
runs-on: ubuntu-24.04
119+
steps:
120+
- uses: actions/checkout@v4
121+
with:
122+
submodules: 'true'
123+
124+
- name: Get number of CPU cores
125+
uses: SimenB/github-actions-cpu-cores@v2
126+
id: cpu-cores
127+
128+
- name: Install dependencies
129+
run: ./.github/scripts/install_dependencies.sh
130+
131+
- uses: hendrikmuhs/[email protected]
132+
133+
- name: Build
134+
env:
135+
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"
136+
BUILD_TYPE: release
137+
NUM_PROC: ${{ steps.cpu-cores.outputs.count }}
138+
run: |
139+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
140+
make -j${{ steps.cpu-cores.outputs.count}}
141+
142+
- name: Pack Build
143+
shell: bash
144+
run: |
145+
tar -czvf build.tar.gz --exclude='CMakeFiles' --exclude='*.a' --exclude='*.cmake' build/
146+
147+
- name: Store Build Artifact
148+
uses: actions/upload-artifact@v4
149+
with:
150+
name: build-release-with-odin.tar.gz
151+
path: build.tar.gz
152+
retention-days: 1
153+
154+
- name: Print CCache Statistics
155+
run: |
156+
ccache -s
157+
158+
111159
Format:
112160
runs-on: ubuntu-24.04
113161
strategy:
@@ -272,9 +320,21 @@ jobs:
272320
make -j${{ steps.cpu-cores.outputs.count}}
273321
./run_reg_test.py vtr_reg_basic -show_failures -j${{ steps.cpu-cores.outputs.count}}
274322
323+
- name: 'Test with VTR_ENABLE_DEBUG_LOGGING enabled'
324+
if: success() || failure()
325+
env:
326+
CMAKE_PARAMS: "${{ env.COMMON_CMAKE_PARAMS }} -DVTR_ENABLE_DEBUG_LOGGING=on"
327+
NUM_PROC: ${{ steps.cpu-cores.outputs.count }}
328+
run: |
329+
rm -f build/CMakeCache.txt
330+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
331+
make -j${{ steps.cpu-cores.outputs.count}}
332+
./run_reg_test.py vtr_reg_basic -show_failures -j${{ steps.cpu-cores.outputs.count}}
333+
275334
276335
Regression:
277336
runs-on: ubuntu-24.04
337+
needs: [BuildVTR]
278338
strategy:
279339
fail-fast: false
280340
matrix:
@@ -285,29 +345,83 @@ jobs:
285345
suite: 'vtr_reg_basic',
286346
extra_pkgs: ""
287347
},
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-
},
306348
{
307349
name: 'Strong',
308350
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on',
309351
suite: 'vtr_reg_strong',
310352
extra_pkgs: "libeigen3-dev"
353+
}
354+
]
355+
name: 'R: ${{ matrix.name }}'
356+
steps:
357+
358+
- uses: actions/setup-python@v5
359+
with:
360+
python-version: 3.12.3
361+
362+
- uses: actions/checkout@v4
363+
with:
364+
submodules: 'true'
365+
366+
- name: Get number of CPU cores
367+
uses: SimenB/github-actions-cpu-cores@v2
368+
id: cpu-cores
369+
370+
- name: Install dependencies
371+
run: ./.github/scripts/install_dependencies.sh
372+
373+
- name: Install external libraries
374+
run: sudo apt install -y ${{ matrix.extra_pkgs }}
375+
if: ${{ matrix.extra_pkgs }}
376+
377+
- name: Download Build Artifact
378+
uses: actions/download-artifact@v4
379+
with:
380+
name: build-release.tar.gz
381+
382+
- name: Unpack Build
383+
shell: bash
384+
run: |
385+
tar -xvzf build.tar.gz
386+
387+
- name: Test
388+
run: |
389+
./run_reg_test.py ${{ matrix.suite }} -show_failures -j${{ steps.cpu-cores.outputs.count}}
390+
391+
- name: Upload regression run files
392+
if: ${{ !cancelled() }}
393+
uses: actions/upload-artifact@v4
394+
with:
395+
name: ${{matrix.name}}_run_files
396+
path: |
397+
vtr_flow/**/*.out
398+
# vtr_flow/**/*.blif # Removed since it was taking too much space and was hardly used.
399+
vtr_flow/**/*.p
400+
vtr_flow/**/*.net
401+
vtr_flow/**/*.r
402+
403+
- name: Upload regression results
404+
if: ${{ !cancelled() }}
405+
uses: actions/upload-artifact@v4
406+
with:
407+
name: ${{matrix.name}}_results
408+
path: |
409+
vtr_flow/**/*.log
410+
vtr_flow/**/parse_results*.txt
411+
412+
413+
RegressionWithOdin:
414+
runs-on: ubuntu-24.04
415+
needs: [BuildVTRWithOdin]
416+
strategy:
417+
fail-fast: false
418+
matrix:
419+
include: [
420+
{
421+
name: 'Basic_odin',
422+
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DWITH_PARMYS=OFF -DWITH_ODIN=on',
423+
suite: 'vtr_reg_basic_odin',
424+
extra_pkgs: ""
311425
},
312426
{
313427
name: 'Strong_odin',
@@ -344,15 +458,18 @@ jobs:
344458
run: sudo apt install -y ${{ matrix.extra_pkgs }}
345459
if: ${{ matrix.extra_pkgs }}
346460

347-
- uses: hendrikmuhs/[email protected]
461+
- name: Download Build Artifact
462+
uses: actions/download-artifact@v4
463+
with:
464+
name: build-release-with-odin.tar.gz
465+
466+
- name: Unpack Build
467+
shell: bash
468+
run: |
469+
tar -xvzf build.tar.gz
348470
349471
- name: Test
350-
env:
351-
CMAKE_PARAMS: ${{ matrix.params }}
352-
NUM_PROC: ${{ steps.cpu-cores.outputs.count }}
353472
run: |
354-
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
355-
./.github/scripts/build.sh
356473
./run_reg_test.py ${{ matrix.suite }} -show_failures -j${{ steps.cpu-cores.outputs.count}}
357474
358475
- name: Upload regression run files
@@ -376,6 +493,7 @@ jobs:
376493
vtr_flow/**/*.log
377494
vtr_flow/**/parse_results*.txt
378495
496+
379497
Sanitized:
380498
runs-on: ubuntu-24.04
381499
strategy:
@@ -467,6 +585,7 @@ jobs:
467585
ODINII:
468586
name: 'ODIN-II Basic Test'
469587
runs-on: ubuntu-24.04
588+
needs: [BuildVTRWithOdin]
470589
steps:
471590

472591
- uses: actions/setup-python@v5
@@ -483,17 +602,19 @@ jobs:
483602
- name: Install dependencies
484603
run: ./.github/scripts/install_dependencies.sh
485604

486-
- uses: hendrikmuhs/[email protected]
605+
- name: Download Build Artifact
606+
uses: actions/download-artifact@v4
607+
with:
608+
name: build-release-with-odin.tar.gz
609+
610+
- name: Unpack Build
611+
shell: bash
612+
run: |
613+
tar -xvzf build.tar.gz
487614
488615
- 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 }}
493616
run: |
494617
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
497618
./run_reg_test.py odin_reg_basic -show_failures -j${{ steps.cpu-cores.outputs.count }}
498619
499620
@@ -608,17 +729,18 @@ jobs:
608729
name: 'Coverity Scan'
609730
needs:
610731
- Build
611-
- BuildVTR
612732
- Format
613733
- VerifyTestSuites
614734
- UnitTests
615735
- BuildVariations
616736
- Regression
737+
- RegressionWithOdin
617738
- Sanitized
618739
- Parmys
619740
- ODINII
620741
- VQM2BLIF
621742
- Compatibility
743+
- JammyCompatibility
622744
runs-on: ubuntu-24.04
623745
steps:
624746

0 commit comments

Comments
 (0)