Skip to content

Commit 74e4c7a

Browse files
committed
Merge remote-tracking branch 'private/master' into gpl-fix-code-scan-defects
2 parents 712f760 + e3d20c6 commit 74e4c7a

File tree

993 files changed

+21883
-17212
lines changed

Some content is hidden

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

993 files changed

+21883
-17212
lines changed

.bazelrc

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,31 @@ build --incompatible_strict_action_env
7070

7171
test --build_tests_only
7272

73-
# TODO: setup a new cache for OpenROAD
74-
# Read only remote cache, updated by OpenROAD team members and CI.
75-
#build --remote_cache=https://storage.googleapis.com/megaboom-bazel-artifacts
76-
#build --remote_cache_compression=true
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
7799

78100
try-import %workspace%/user.bazelrc

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.2.1
1+
8.3.1

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,17 @@ jobs:
1212
format:
1313
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-latest' }}
1414
steps:
15-
- name: setup
16-
run: |
17-
python3 -m pip install -U --user jinja2==3.1.6
1815
- name: Check out repository code
1916
uses: actions/checkout@v4
2017
with:
2118
fetch-depth: 0
19+
- name: setup
20+
run: |
21+
python3 -m venv venv
22+
venv/bin/pip install jinja2==3.1.6
2223
- name: Check that ODB Generated Files Are Up To Date
2324
run: |
25+
source venv/bin/activate
2426
cd src/odb/src/codeGenerator/
2527
./generate
2628
if [ -z "$(git status --porcelain)" ]; then

.github/workflows/github-actions-lint-tcl.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@ jobs:
1414
steps:
1515
- name: Checkout repository
1616
uses: actions/checkout@v4
17-
1817
- name: Install Dependencies
1918
run: |
20-
python3 -m pip install -U --user tclint==0.4.2
19+
python3 -m venv venv
20+
venv/bin/pip install tclint==0.4.2
2121
2222
- name: Lint
2323
run: |
24+
source venv/bin/activate
2425
tclfmt --version
2526
tclfmt --in-place .
2627
git diff --exit-code
2728
tclint --no-check-style .
29+

Jenkinsfile

Lines changed: 46 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -162,31 +162,6 @@ def getParallelTests(String image) {
162162
}
163163
},
164164

165-
'Build with Bazel': {
166-
node {
167-
withDockerContainer(args: '-u root -v /var/run/docker.sock:/var/run/docker.sock', image: image) {
168-
stage('Setup Bazel Build') {
169-
echo "Build with Bazel";
170-
sh label: 'Configure git', script: "git config --system --add safe.directory '*'";
171-
checkout scm;
172-
}
173-
stage('Bazel Build') {
174-
timeout(time: 120, unit: 'MINUTES') {
175-
sh label: 'Bazel Build', script: '''
176-
bazel test \
177-
--keep_going \
178-
--show_timestamps \
179-
--test_output=errors \
180-
--curses=no \
181-
--force_pic \
182-
...
183-
''';
184-
}
185-
}
186-
}
187-
}
188-
},
189-
190165
'Check message IDs': {
191166
dir('src') {
192167
sh label: 'Find duplicated message IDs', script: '../etc/find_messages.py > messages.txt';
@@ -274,21 +249,35 @@ def getParallelTests(String image) {
274249
return ret;
275250
}
276251

277-
node {
278-
279-
def isDefaultBranch = (env.BRANCH_NAME == 'master')
280-
def daysToKeep = '20';
281-
def numToKeep = (isDefaultBranch ? '-1' : '10');
282-
283-
properties([
284-
buildDiscarder(logRotator(
285-
daysToKeepStr: daysToKeep,
286-
artifactDaysToKeepStr: daysToKeep,
252+
def bazelTest = {
253+
node {
254+
stage('Setup') {
255+
checkout scm;
256+
sh label: 'Setup Docker Image', script: 'docker build -f docker/Dockerfile.bazel -t openroad/bazel-ci .';
257+
}
258+
withDockerContainer(args: '-u root -v /var/run/docker.sock:/var/run/docker.sock', image: 'openroad/bazel-ci:latest') {
259+
stage('bazelisk test ...') {
260+
withCredentials([file(credentialsId: 'bazel-cache-sa', variable: 'GCS_SA_KEY')]) {
261+
timeout(time: 120, unit: 'MINUTES') {
262+
def cmd = 'bazelisk test --config=ci --show_timestamps --test_output=errors --curses=no --force_pic';
263+
if (env.BRANCH_NAME != 'master') {
264+
cmd += ' --remote_upload_local_results=false';
265+
}
266+
cmd += ' --google_credentials=$GCS_SA_KEY';
267+
try {
268+
sh label: 'Bazel Build', script: cmd + ' ...';
269+
} catch (e) {
270+
currentBuild.result = 'FAILURE';
271+
sh label: 'Bazel Build (keep_going)', script: cmd + ' --keep_going ...';
272+
}
273+
}
274+
}
275+
}
276+
}
277+
}
278+
}
287279

288-
numToKeepStr: numToKeep,
289-
artifactNumToKeepStr: numToKeep
290-
))
291-
]);
280+
def dockerTests = {
292281
stage('Checkout') {
293282
checkout scm;
294283
}
@@ -317,6 +306,24 @@ node {
317306
echo "Docker image is ${DOCKER_IMAGE}";
318307
}
319308
parallel(getParallelTests(DOCKER_IMAGE));
309+
}
310+
311+
node {
312+
def isDefaultBranch = (env.BRANCH_NAME == 'master')
313+
def daysToKeep = '20';
314+
def numToKeep = (isDefaultBranch ? '-1' : '10');
315+
properties([
316+
buildDiscarder(logRotator(
317+
daysToKeepStr: daysToKeep,
318+
artifactDaysToKeepStr: daysToKeep,
319+
numToKeepStr: numToKeep,
320+
artifactNumToKeepStr: numToKeep
321+
))
322+
]);
323+
parallel(
324+
"Bazel": bazelTest,
325+
"Docker Tests": dockerTests
326+
);
320327
stage('Send Email Report') {
321328
sendEmail();
322329
}

MODULE.bazel

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module(
77

88
bazel_dep(name = "platforms", version = "0.0.11")
99
bazel_dep(name = "bazel_skylib", version = "1.7.1")
10+
bazel_dep(name = "rules_cc", version = "0.1.2")
1011
bazel_dep(name = "rules_flex", version = "0.3.1")
1112
bazel_dep(name = "rules_bison", version = "0.3.1")
1213
bazel_dep(name = "rules_jvm_external", version = "6.4")
@@ -17,17 +18,6 @@ git_override(
1718
remote = "https://github.com/bazelbuild/rules_scala",
1819
)
1920

20-
# The current rules_cc 0.1.1 hardcodes script locations to `#!/bin/bash`
21-
# instead of using `#!/usr/bin/env bash`.
22-
# This is fixed by https://github.com/bazelbuild/rules_cc/pull/306 but
23-
# is not released yet. Use rules_cc from that commit.
24-
bazel_dep(name = "rules_cc", version = "0.1.1")
25-
git_override(
26-
module_name = "rules_cc",
27-
commit = "d74915024017250e46d95e91a3defc34174effe0",
28-
remote = "https://github.com/bazelbuild/rules_cc",
29-
)
30-
3121
bazel_dep(name = "rules_verilator", version = "5.034")
3222
single_version_override(
3323
module_name = "rules_verilator",
@@ -149,7 +139,7 @@ bazel_dep(name = "bazel-orfs")
149139
# To bump version, run: bazelisk run @bazel-orfs//:bump
150140
git_override(
151141
module_name = "bazel-orfs",
152-
commit = "5c8f9e30a993848c90ce5250d43e4c2d5206380e",
142+
commit = "eaf22cee8fe62d5326f0486e2742a63bbe3d987f",
153143
remote = "https://github.com/The-OpenROAD-Project/bazel-orfs.git",
154144
)
155145

@@ -158,10 +148,10 @@ orfs = use_extension("@bazel-orfs//:extension.bzl", "orfs_repositories")
158148
# To bump version, run: bazelisk run @bazel-orfs//:bump
159149
orfs.default(
160150
# Official image https://hub.docker.com/r/openroad/orfs/tags
161-
image = "docker.io/openroad/orfs:v3.0-3299-gb81e0302",
151+
image = "docker.io/openroad/orfs:v3.0-3393-g0ae5fce9",
162152
# Use OpenROAD of this repo instead of from the docker image
163153
openroad = "//:openroad",
164-
sha256 = "67535ca2091d7f760b765c0e85a74ca5fd5868aa415f042bbb9fd86bc0a7dc53",
154+
sha256 = "3e8134fc509e189ee3762cec4345ba1c690255abee4bba9966d4b0605b2079f7",
165155
)
166156
use_repo(orfs, "com_github_nixos_patchelf_download")
167157
use_repo(orfs, "docker_orfs")

MODULE.bazel.lock

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

bazel/openmp/bundled.BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ cc_library(
8585
"runtime/src/ompt-event-specific.h",
8686
"runtime/src/ompt-general.cpp",
8787
"runtime/src/ompt-internal.h",
88-
"runtime/src/ompt-specific.cpp",
8988
"runtime/src/ompt-specific.h",
9089
"runtime/src/test-touch.c",
9190
"runtime/src/z_Linux_asm.S",

0 commit comments

Comments
 (0)