Skip to content

Commit 3937e3c

Browse files
Merge branch 'openfpga' into patch-1
2 parents 0f34455 + 6ce3706 commit 3937e3c

File tree

1,318 files changed

+475226
-37867
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,318 files changed

+475226
-37867
lines changed

.github/scripts/build.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ source $(dirname "$0")/common.sh
66

77
$SPACER
88

9+
if [[ -z "${NUM_PROC}" ]]; then
10+
NUM_PROC=1
11+
fi
12+
913
start_section "vtr.build" "${GREEN}Building..${NC}"
1014
export FAILURE=0
11-
make -k BUILD_TYPE=${BUILD_TYPE} CMAKE_PARAMS="-Werror=dev ${CMAKE_PARAMS} ${CMAKE_INSTALL_PREFIX_PARAMS}" -j2 || export FAILURE=1
15+
make -k BUILD_TYPE=${BUILD_TYPE} CMAKE_PARAMS="-Werror=dev ${CMAKE_PARAMS} ${CMAKE_INSTALL_PREFIX_PARAMS}" -j${NUM_PROC} || export FAILURE=1
1216
end_section "vtr.build"
1317

1418
# When the build fails, produce the failure output in a clear way

.github/scripts/unittest.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ $(dirname "$0")/build.sh
99
$SPACER
1010

1111
start_section "vtr.test.0" "${GREEN}Testing..${NC} ${CYAN}C++ unit tests${NC}"
12-
make test
12+
make test -j${NUM_PROC}
1313
end_section "vtr.test.0"
1414

1515
$SPACER

.github/workflows/nightly_test.yml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: NightlyTest
2+
3+
on:
4+
# We want to run the CI when anything is pushed to master.
5+
# Since master is a protected branch this only happens when a PR is merged.
6+
# This is a double check in case the PR was stale and had some issues.
7+
push:
8+
branches:
9+
- master
10+
paths-ignore: # Prevents from running if only docs are updated
11+
- 'doc/**'
12+
- '**/*README*'
13+
- '**.md'
14+
- '**.rst'
15+
pull_request:
16+
paths-ignore: # Prevents from running if only docs are updated
17+
- 'doc/**'
18+
- '**/*README*'
19+
- '**.md'
20+
- '**.rst'
21+
workflow_dispatch:
22+
schedule:
23+
- cron: '0 0 * * *' # daily
24+
25+
# We want to cancel previous runs for a given PR or branch / ref if another CI
26+
# run is requested.
27+
# See: https://docs.github.com/en/actions/using-jobs/using-concurrency
28+
concurrency:
29+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
30+
cancel-in-progress: true
31+
32+
env:
33+
# default compiler for all non-compatibility tests
34+
MATRIX_EVAL: "CC=gcc-11 && CXX=g++-11"
35+
36+
jobs:
37+
Run-tests:
38+
# Prevents from running on forks where no custom runners are available
39+
if: ${{ github.repository_owner == 'verilog-to-routing' }}
40+
41+
timeout-minutes: 420
42+
43+
container: ubuntu:jammy
44+
45+
runs-on: [self-hosted, Linux, X64]
46+
47+
strategy:
48+
fail-fast: false
49+
matrix:
50+
include:
51+
- {test: "vtr_reg_nightly_test1", cores: "16", options: "", cmake: "", extra_pkgs: ""}
52+
- {test: "vtr_reg_nightly_test1_odin", cores: "16", options: "", cmake: "-DWITH_ODIN=ON", extra_pkgs: ""}
53+
- {test: "vtr_reg_nightly_test2", cores: "16", options: "", cmake: "", extra_pkgs: ""}
54+
- {test: "vtr_reg_nightly_test2_odin", cores: "16", options: "", cmake: "-DWITH_ODIN=ON", extra_pkgs: ""}
55+
- {test: "vtr_reg_nightly_test3", cores: "16", options: "", cmake: "", extra_pkgs: ""}
56+
- {test: "vtr_reg_nightly_test3_odin", cores: "16", options: "", cmake: "-DWITH_ODIN=ON", extra_pkgs: ""}
57+
- {test: "vtr_reg_nightly_test4", cores: "16", options: "", cmake: "", extra_pkgs: ""}
58+
- {test: "vtr_reg_nightly_test4_odin", cores: "16", options: "", cmake: "-DWITH_ODIN=ON", extra_pkgs: ""}
59+
- {test: "vtr_reg_nightly_test5", cores: "16", options: "", cmake: "", extra_pkgs: ""}
60+
- {test: "vtr_reg_nightly_test6", cores: "16", options: "", cmake: "", extra_pkgs: ""}
61+
- {test: "vtr_reg_nightly_test7", cores: "16", options: "", cmake: "", extra_pkgs: ""}
62+
- {test: "vtr_reg_strong", cores: "16", options: "", cmake: "-DVTR_ASSERT_LEVEL=3", extra_pkgs: "libeigen3-dev"}
63+
- {test: "vtr_reg_strong_odin", cores: "16", options: "", cmake: "-DVTR_ASSERT_LEVEL=3 -DWITH_ODIN=ON", extra_pkgs: "libeigen3-dev"}
64+
- {test: "vtr_reg_strong_odin", cores: "16", options: "-skip_qor", cmake: "-DVTR_ASSERT_LEVEL=3 -DVTR_ENABLE_SANITIZE=ON -DWITH_ODIN=ON", extra_pkgs: "libeigen3-dev"}
65+
# - {test: "vtr_reg_system_verilog", cores: "16", options: "", cmake: "-DYOSYS_F4PGA_PLUGINS=ON", extra_pkgs: ""} # Test turned off -> F4PGA conflicts with Yosys (version 42)
66+
- {test: "odin_reg_strong", cores: "16", options: "", cmake: "-DWITH_ODIN=ON", extra_pkgs: ""}
67+
- {test: "parmys_reg_strong", cores: "16", options: "", cmake: "-DYOSYS_F4PGA_PLUGINS=OFF", extra_pkgs: ""}
68+
69+
env:
70+
DEBIAN_FRONTEND: "noninteractive"
71+
72+
steps:
73+
74+
# TODO: This runnner is running on a self-hosted CPU. In order to upgrade
75+
# to v4, need to upgrade the machine to support node20.
76+
- uses: actions/checkout@v3
77+
with:
78+
submodules: 'true'
79+
80+
- name: Setup
81+
run: stdbuf -i0 -i0 -e0 ./.github/scripts/hostsetup.sh
82+
83+
- name: Install external libraries
84+
run: apt install -y ${{ matrix.extra_pkgs }}
85+
if: ${{ matrix.extra_pkgs }}
86+
87+
- name: Execute test script
88+
run: stdbuf -i0 -o0 -e0 ./.github/scripts/run-vtr.sh
89+
env:
90+
VPR_NUM_WORKERS: 4
91+
VTR_TEST: ${{ matrix.test }}
92+
VTR_TEST_OPTIONS: ${{ matrix.options }}
93+
VTR_CMAKE_PARAMS: ${{ matrix.cmake }}
94+
NUM_CORES: ${{ matrix.cores }}
95+
96+
- name: Upload test results
97+
# If the job was not cancelled, we want to save the result (this includes
98+
# when the job fails). See warning here:
99+
# https://docs.github.com/en/actions/learn-github-actions/expressions#always
100+
if: ${{ !cancelled() }}
101+
# TODO: This runnner is running on a self-hosted CPU. In order to upgrade
102+
# to v4, need to upgrade the machine to support node20.
103+
uses: actions/upload-artifact@v3
104+
with:
105+
name: ${{matrix.test}}_test_results
106+
path: |
107+
**/results*.gz
108+
**/plot_*.svg
109+
**/qor_results*.tar.gz
110+

0 commit comments

Comments
 (0)