Skip to content

Commit 8e1e8a4

Browse files
authored
Merge branch 'master' into grid-branch
Signed-off-by: Brayden Louie <[email protected]>
2 parents 598cfc9 + ac85c77 commit 8e1e8a4

File tree

5,690 files changed

+4060932
-1786351
lines changed

Some content is hidden

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

5,690 files changed

+4060932
-1786351
lines changed

.bazelignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
build/
2+
debug/
3+
src/sta/build/
4+
src/sta/debug/

.bazelrc

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
common --enable_bzlmod
2+
common --enable_workspace # explicitly currently still needing this
3+
4+
# suppress distracting warning about newer module
5+
# versions found in dependency graph.
6+
common --check_direct_dependencies=off
7+
8+
# Test timeouts for various levels.
9+
test --test_timeout=300,1800,1800,9600
10+
11+
# bazel 7 is somewhat forgiving for glob patterns that don't
12+
# match, but bazel 8 will be strict. So start now.
13+
common --incompatible_disallow_empty_glob
14+
15+
build --cxxopt "-std=c++17" --host_cxxopt "-std=c++17"
16+
build --cxxopt "-xc++" --host_cxxopt "-xc++"
17+
18+
# Needed for floating point stability in FFT (fft_test will check this).
19+
# See also https://kristerw.github.io/2021/11/09/fp-contract/
20+
build --cxxopt "-ffp-contract=off" --host_cxxopt "-ffp-contract=off"
21+
22+
# allow exceptions.
23+
build --cxxopt=-fexceptions --host_cxxopt=-fexceptions
24+
25+
# Turn warnings on...
26+
build --copt "-Wall" --host_copt "-Wall"
27+
build --copt "-Wextra" --host_copt "-Wextra"
28+
29+
# ... and disable the warnings we're not interested in.
30+
build --copt "-Wno-sign-compare" --host_copt "-Wno-sign-compare"
31+
build --copt "-Wno-unused-parameter" --host_copt "-Wno-unused-parameter"
32+
build --copt "-Wno-c++20-designator" --host_copt "-Wno-c++20-designator"
33+
build --copt "-Wno-gcc-compat" --host_copt "-Wno-gcc-compat"
34+
build --copt "-Wno-nullability-extension" --host_copt "-Wno-nullability-extension"
35+
36+
# The warning acceptance bar in CI for PRs is set by -Werror of a specific
37+
# version of some chosen compiler. Disable warnings from other compilers until
38+
# they are fixed and under CI -Werror acceptance critera as there is nothing the
39+
# developers can(they can't be reproduced locally or in CI) or should do about
40+
# these warnings in code they are not working on.
41+
build --copt "-Wno-unused-private-field" --host_copt "-Wno-unused-private-field"
42+
build --copt "-Wno-cast-function-type-mismatch" --host_copt "-Wno-cast-function-type-mismatch"
43+
build --copt "-Wno-unused-but-set-variable" --host_copt "-Wno-unused-but-set-variable"
44+
build --copt "-Wno-deprecated-copy" --host_copt "-Wno-deprecated-copy"
45+
build --copt "-Wno-deprecated-copy-with-user-provided-copy" --host_copt "-Wno-deprecated-copy-with-user-provided-copy"
46+
build --copt "-Wno-dangling" --host_copt "-Wno-dangling"
47+
48+
# For 3rd party code: Disable warnings entirely.
49+
# They are not actionable and just create noise.
50+
build --per_file_copt=external/.*@-w
51+
build --host_per_file_copt=external/.*@-w
52+
53+
# Settings for --config=asan address sanitizer build
54+
build:asan --strip=never
55+
build:asan --copt -fsanitize=address --host_copt -fsanitize=address
56+
build:asan --copt -DADDRESS_SANITIZER --host_copt -DADDRESS_SANITIZER
57+
build:asan --copt -O1 --host_copt -O1
58+
build:asan --copt -g --host_copt -g
59+
build:asan --copt -fno-omit-frame-pointer --host_copt -fno-omit-frame-pointer
60+
build:asan --linkopt -fsanitize=address --host_linkopt -fsanitize=address
61+
62+
# Flags with enough debug symbols to get useful outputs with Linux `perf`
63+
build:profile --strip=never
64+
build:profile --copt -g --host_copt -g
65+
build:profile --copt -gmlt --host_copt -gmlt
66+
build:profile --copt -fno-omit-frame-pointer --host_copt -fno-omit-frame-pointer
67+
68+
# TODO: document
69+
build --incompatible_strict_action_env
70+
71+
test --build_tests_only
72+
73+
# --- Performance Optimizations ---
74+
# Use a high number of jobs and let the scheduler manage concurrency
75+
build --jobs=200
76+
77+
# Enable local disk caching to supplement the remote cache.
78+
build --disk_cache=~/.cache/bazel-disk-cache
79+
build --repository_cache=~/.cache/bazel-repository-cache
80+
81+
# --- CI Settings (write access) ---
82+
build:ci --remote_cache=https://storage.googleapis.com/openroad-bazel-cache
83+
build:ci --remote_cache_compression=true
84+
build:ci --remote_upload_local_results=true
85+
# CI only needs to know if the build succeeded, not the artifacts themselves.
86+
build:ci --remote_download_minimal
87+
# Disable disk cache for CI builds
88+
build:ci --disk_cache=
89+
90+
# --- OpenROAD Developer Settings (read-only access) ---
91+
build:openroad-dev --remote_cache=https://storage.googleapis.com/openroad-bazel-cache
92+
build:openroad-dev --remote_cache_compression=true
93+
build:openroad-dev --remote_upload_local_results=false
94+
# Developers need the actual output files to run and use them.
95+
build:openroad-dev --remote_download_toplevel
96+
build:openroad-dev --google_default_credentials=true
97+
build:openroad-dev --disk_cache=/workspace/.cache/bazel-disk-cache
98+
build:openroad-dev --repository_cache=/workspace/.cache/bazel-repository-cache
99+
100+
# Without this, bazelisk build ... builds the bazel-orfs tests
101+
build --build_tag_filters=-orfs
102+
103+
try-import %workspace%/user.bazelrc

.bazelversion

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
8.3.1

.clang-format

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ BraceWrapping:
2626
SplitEmptyNamespace: true
2727
BreakBeforeBinaryOperators: All
2828
BreakBeforeBraces: Custom
29+
InsertBraces: true
30+
LineEnding: LF
2931
DerivePointerAlignment: false
3032
SpaceAfterCStyleCast: true
3133
Standard: c++17

.clang-tidy

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Checks: >
3131
-google-runtime-references,
3232
-google-explicit-constructor,
3333
performance-*,
34+
-performance-enum-size,
3435
bugprone-*,
3536
-bugprone-branch-clone,
3637
-bugprone-easily-swappable-parameters,
@@ -56,11 +57,16 @@ Checks: >
5657
-misc-non-private-member-variables-in-classes,
5758
-misc-redundant-expression,
5859
-misc-unused-parameters,
60+
-misc-use-anonymous-namespace,
5961
6062
CheckOptions:
6163
- key: google-runtime-int.TypeSuffix
6264
value: _t
6365

66+
# All modules but sta
67+
# Exclude build as there is too much noise from swig generated code
68+
HeaderFilterRegex: "(?!build/.*)/(ant|cts|dbSta|dft|dpl|drt|dst|est|exa|fin|gpl|grt|gui|ifp|mpl|odb|ord|pad|par|pdn|ppl|psm|rcx|rmp|rsz|stt|tap|upf|utl)/.*"
69+
6470
# Not currently handling identifier naming
6571
# WarningsAsErrors: "*"
6672

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.git
22
build*
33
Dockerfile
4+
etc/openroad_deps_prefixes.txt

.github/workflows/black.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Lint Python
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
Black:
13+
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-latest' }}
14+
steps:
15+
- name: Checkout Code
16+
uses: actions/checkout@v4
17+
- name: Run black
18+
uses: psf/black@stable
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Check that OK files are up to date
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
No-Diffs-In-Ok-Files:
8+
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-latest' }}
9+
steps:
10+
- name: Check out repository code
11+
uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
- name: Check ok files
15+
run: |
16+
set +e
17+
grep --include="*.ok" -Rn "Differences found "
18+
if [[ "$?" == "0" ]]; then
19+
exit 1
20+
fi

.github/workflows/github-actions-are-odb-files-generated.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,29 @@
11
name: Check That ODB Files Are Generated
2+
23
on:
3-
# Triggers the workflow on push or pull request events
44
push:
5+
branches:
6+
- master
57
pull_request:
8+
branches:
9+
- master
610

711
jobs:
8-
format:
9-
runs-on: ubuntu-latest
12+
Are-Odb-Files-Generated:
13+
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-latest' }}
1014
steps:
11-
- name: setup
12-
run: |
13-
sudo apt update
14-
sudo apt install -y python3-jinja2 git clang-format-14
1515
- name: Check out repository code
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 0
19+
submodules: 'recursive'
20+
- name: setup
21+
run: |
22+
python3 -m venv venv
23+
venv/bin/pip install jinja2==3.1.6
1924
- name: Check that ODB Generated Files Are Up To Date
2025
run: |
26+
source venv/bin/activate
2127
cd src/odb/src/codeGenerator/
2228
./generate
2329
if [ -z "$(git status --porcelain)" ]; then
@@ -26,7 +32,7 @@ jobs:
2632
echo ::group::Non-Empty Git Status Oputput
2733
git status --porcelain
2834
echo ::endgroup::
29-
35+
3036
echo ::group::Non-Empty Git Diff Oputput
3137
git diff
3238
echo ::endgroup::
@@ -35,4 +41,3 @@ jobs:
3541
printf "run ./generate in the src/odb/src/codeGenerator folder"
3642
exit 1
3743
fi
38-

.github/workflows/github-actions-build-deb-package.yml

Lines changed: 0 additions & 83 deletions
This file was deleted.

0 commit comments

Comments
 (0)