Skip to content

Commit 42989c7

Browse files
authored
Merge branch 'The-OpenROAD-Project:master' into gpl_remove_filler_removal_cap
2 parents 4ffa579 + 9103e99 commit 42989c7

559 files changed

Lines changed: 7434 additions & 4643 deletions

File tree

Some content is hidden

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

.bazelrc

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -78,24 +78,16 @@ build --jobs=200
7878
build --disk_cache=~/.cache/bazel-disk-cache
7979
build --repository_cache=~/.cache/bazel-repository-cache
8080

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
8581
# CI only needs to know if the build succeeded, not the artifacts themselves.
8682
build:ci --remote_download_minimal
83+
build:ci --remote_upload_local_results=true
8784
# Disable disk cache for CI builds
8885
build:ci --disk_cache=
8986

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
87+
# Setup remote cache
88+
build --remote_cache=https://bazel.precisioninno.com
89+
build --remote_cache_compression=true
90+
build --remote_upload_local_results=false
9991

10092
# Without this, bazelisk build ... builds the bazel-orfs tests
10193
build --build_tag_filters=-orfs

.buildifier.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "auto",
3+
"mode": "fix",
4+
"lint": "fix",
5+
"warnings": "all"
6+
}

.github/workflows/buildifier.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Lint Bazel
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
buildifier:
13+
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-latest' }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
check:
18+
- name: Buildifier format
19+
run: ./buildifier -r -mode=check -lint=off .
20+
- name: Buildifier lint
21+
run: ./buildifier -r -lint=warn .
22+
name: ${{ matrix.check.name }}
23+
env:
24+
BUILDIFIER_VERSION: v8.2.1
25+
26+
steps:
27+
- name: Checkout Code
28+
uses: actions/checkout@v5
29+
30+
- name: Cache buildifier
31+
id: cache-buildifier
32+
uses: actions/cache@v4
33+
with:
34+
path: ./buildifier
35+
key: ${{ runner.os }}-buildifier-${{ env.BUILDIFIER_VERSION }}
36+
37+
- name: Download buildifier
38+
if: steps.cache-buildifier.outputs.cache-hit != 'true'
39+
run: |
40+
wget https://github.com/bazelbuild/buildtools/releases/download/${BUILDIFIER_VERSION}/buildifier-linux-amd64 -O buildifier
41+
chmod +x buildifier
42+
43+
- name: ${{ matrix.check.name }}
44+
run: ${{ matrix.check.run }}

BUILD.bazel

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
# Copyright (c) 2025-2025, The OpenROAD Authors
33

44
load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
5+
load("@openroad_rules_python//python:defs.bzl", "py_library")
6+
load("@rules_cc//cc:cc_binary.bzl", "cc_binary")
7+
load("@rules_cc//cc:cc_library.bzl", "cc_library")
58
load("//bazel:python_wrap_cc.bzl", "PYTHON_STABLE_API_DEFINE", "python_wrap_cc")
69
load("//bazel:tcl_encode_or.bzl", "tcl_encode")
710
load("//bazel:tcl_wrap_cc.bzl", "tcl_wrap_cc")
@@ -104,8 +107,8 @@ OPENROAD_LIBRARY_DEPS = [
104107
"@edu_berkeley_abc//:abc-lib",
105108
] + select(
106109
{
107-
":platform_gui": ["//src/gui:gui_qt"],
108110
":platform_cli": ["//src/gui"],
111+
":platform_gui": ["//src/gui:gui_qt"],
109112
},
110113
)
111114

@@ -161,8 +164,8 @@ cc_binary(
161164

162165
GUI_BUILD_FLAGS = select(
163166
{
164-
":platform_gui": ["BUILD_GUI=true"],
165167
":platform_cli": ["BUILD_GUI=false"],
168+
":platform_gui": ["BUILD_GUI=true"],
166169
},
167170
)
168171

Jenkinsfile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,9 @@ def bazelTest = {
219219
}
220220
withDockerContainer(args: '-u root -v /var/run/docker.sock:/var/run/docker.sock', image: 'openroad/bazel-ci:latest') {
221221
stage('bazelisk test ...') {
222-
withCredentials([file(credentialsId: 'bazel-cache-sa', variable: 'GCS_SA_KEY')]) {
222+
withCredentials([string(credentialsId: 'bazel-auth-token-b64', variable: 'BAZEL_AUTH_TOKEN_B64')]) {
223223
timeout(time: 120, unit: 'MINUTES') {
224-
def cmd = 'bazelisk test --config=ci --show_timestamps --test_output=errors --curses=no --force_pic';
225-
if (env.BRANCH_NAME != 'master') {
226-
cmd += ' --remote_upload_local_results=false';
227-
}
228-
cmd += ' --google_credentials=$GCS_SA_KEY';
224+
def cmd = 'bazelisk test --config=ci --show_timestamps --test_output=errors --curses=no --force_pic --remote_header="Authorization=Basic $BAZEL_AUTH_TOKEN_B64"'
229225
try {
230226
sh label: 'Bazel Build', script: cmd + ' ...';
231227
} catch (e) {

MODULE.bazel

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ bazel_dep(name = "or-tools", version = "9.12")
9090
bazel_dep(name = "spdlog", version = "1.15.1")
9191
bazel_dep(name = "tcmalloc", version = "0.0.0-20250331-43fcf6e")
9292
bazel_dep(name = "zlib", version = "1.3.1.bcr.5")
93+
bazel_dep(name = "yaml-cpp", version = "0.8.0")
9394

9495
# A from source build of QT that allows it to link into OpenROAD.
9596
# Building like any other bazel project. scripts in the docker folder
@@ -153,7 +154,7 @@ bazel_dep(name = "bazel-orfs")
153154
# To bump version, run: bazelisk run @bazel-orfs//:bump
154155
git_override(
155156
module_name = "bazel-orfs",
156-
commit = "2cf0198a49a220cfcabae35bba64b0034bbdbffc",
157+
commit = "acd76cb3d123e18ee1b65a632cd05be30b46fbbf",
157158
remote = "https://github.com/The-OpenROAD-Project/bazel-orfs.git",
158159
)
159160

@@ -162,18 +163,16 @@ orfs = use_extension("@bazel-orfs//:extension.bzl", "orfs_repositories")
162163
# To bump version, run: bazelisk run @bazel-orfs//:bump
163164
orfs.default(
164165
# Official image https://hub.docker.com/r/openroad/orfs/tags
165-
image = "docker.io/openroad/orfs:v3.0-3845-gbefd38218",
166+
image = "docker.io/openroad/orfs:v3.0-3868-g832999cb0",
166167
# Use OpenROAD of this repo instead of from the docker image
167168
openroad = "//:openroad",
168-
sha256 = "4982a5b87588e4699f11deaed3286cba8b65d144e439c6f5845656abebfc0971",
169+
sha256 = "01c6532234a4708847d1fe98d71dfc586d7566e5428bf7dfa23099bddf195f81",
169170
)
170171
use_repo(orfs, "com_github_nixos_patchelf_download")
171172
use_repo(orfs, "docker_orfs")
172173

173174
SCALA_VERSION = "2.13.16"
174175

175-
SCALA_VERSION_SHORT = SCALA_VERSION.rpartition(".")[0]
176-
177176
scala_config = use_extension(
178177
"@rules_scala//scala/extensions:config.bzl",
179178
"scala_config",
@@ -195,7 +194,7 @@ scala_deps.scalatest()
195194

196195
maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
197196
maven.install(
198-
name = "openroad_maven",
197+
name = "maven",
199198
artifacts = [
200199
"org.chipsalliance:chisel_2.13:7.0.0",
201200
"org.chipsalliance:chisel-plugin_2.13.16:7.0.0",
@@ -206,7 +205,7 @@ maven.install(
206205
"https://s01.oss.sonatype.org/content/repositories/snapshots",
207206
],
208207
)
209-
use_repo(maven, "openroad_maven")
208+
use_repo(maven, "maven")
210209

211210
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
212211

MODULE.bazel.lock

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bazel/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
load("@openroad_rules_python//python:pip.bzl", "compile_pip_requirements")
2+
load("@rules_cc//cc:cc_library.bzl", "cc_library")
23

34
compile_pip_requirements(
45
name = "requirements",

bazel/tcl_encode_or.bzl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ def _tcl_encode_or_impl(ctx):
2222
# Only keep .tcl and .py files.
2323
allowed_extensions = (".tcl", ".py")
2424
filtered_sources = [
25-
f for f in ctx.files.srcs if f.basename.endswith(allowed_extensions)
25+
f
26+
for f in ctx.files.srcs
27+
if f.basename.endswith(allowed_extensions)
2628
]
2729

2830
ctx.actions.run(
@@ -41,13 +43,13 @@ tcl_encode = rule(
4143
doc = "The name of the extern string array value in the generated file.",
4244
mandatory = True,
4345
),
44-
"out": attr.string(
45-
doc = "The name of the C++ source file generated by these rules.",
46-
),
4746
"namespace": attr.string(
4847
doc = "The namespace in the C++ source file generated.",
4948
mandatory = True,
5049
),
50+
"out": attr.string(
51+
doc = "The name of the C++ source file generated by these rules.",
52+
),
5153
"srcs": attr.label_list(
5254
allow_empty = False,
5355
allow_files = [".tcl", ".py"],

bazel/tcl_wrap_cc.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ tcl_wrap_cc = rule(
136136
The root file must be explicitly provided. This is the file which will be passed to
137137
swig for generation.""",
138138
),
139+
"runtime_header": attr.string(),
139140
"srcs": attr.label_list(
140141
allow_empty = False,
141142
allow_files = [".i", ".swig", ".h", ".hpp", ".hh"],
@@ -147,7 +148,6 @@ tcl_wrap_cc = rule(
147148
"swig_options": attr.string_list(
148149
doc = "args to pass directly to the swig binary",
149150
),
150-
"runtime_header": attr.string(),
151151
"_swig": attr.label(
152152
default = "@org_swig//:swig_stable",
153153
allow_files = True,

0 commit comments

Comments
 (0)