Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
gudeh committed Nov 22, 2024
2 parents 262305d + 8396d08 commit a4902d7
Show file tree
Hide file tree
Showing 241 changed files with 27,346 additions and 16,853 deletions.
87 changes: 0 additions & 87 deletions .github/workflows/github-actions-build-deb-package.yml

This file was deleted.

16 changes: 9 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ project(OpenROAD VERSION 1
)

set(OPENROAD_HOME ${PROJECT_SOURCE_DIR})
set(OPENROAD_SHARE ${CMAKE_INSTALL_PREFIX}/share/openroad)

# Default c++ standard used unless otherwise specified in target_compile_features.
set(CMAKE_CXX_STANDARD 17 CACHE STRING "the C++ standard to use for this project")
Expand Down Expand Up @@ -178,13 +179,15 @@ target_compile_definitions(openroad PRIVATE ENABLE_CHARTS)

# Build man pages (Optional)

# Use the processor_count command to get the number of cores
include(ProcessorCount)
ProcessorCount(PROCESSOR_COUNT)
message("Number of processor cores: ${PROCESSOR_COUNT}")

option(BUILD_MAN "Enable building man pages" OFF)
if(BUILD_MAN)
message(STATUS "man is enabled")

# Use the processor_count command to get the number of cores
include(ProcessorCount)
ProcessorCount(PROCESSOR_COUNT)
message(STATUS "Number of processor cores: ${PROCESSOR_COUNT}")

add_custom_target(
man_page ALL
COMMAND make clean && make preprocess && make all -j${PROCESSOR_COUNT}
Expand All @@ -193,6 +196,5 @@ if(BUILD_MAN)

# Based on ${CMAKE_INSTALL_PREFIX}, we want to go to ${CMAKE_INSTALL_PREFIX}/share/man
set(MANPAGE_DIR ${OPENROAD_HOME}/docs/cat)
install(DIRECTORY ${MANPAGE_DIR} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man)

install(DIRECTORY ${MANPAGE_DIR} DESTINATION ${OPENROAD_SHARE}/man)
endif()
93 changes: 73 additions & 20 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ def baseTests(String image) {
Map base_tests = [failFast: false];

base_tests['Unit Tests CTest'] = {
docker.image(image).inside('--user=root --privileged -v /var/run/docker.sock:/var/run/docker.sock') {
withDockerContainer(args: '-u root', image: image) {
stage('Setup CTest') {
echo 'Nothing to be done.';
}
Expand All @@ -27,7 +27,7 @@ def baseTests(String image) {

base_tests['Unit Tests Tcl'] = {
node {
docker.image(image).inside('--user=root --privileged -v /var/run/docker.sock:/var/run/docker.sock') {
withDockerContainer(args: '-u root', image: image) {
stage('Setup Tcl Tests') {
sh label: 'Configure git', script: "git config --system --add safe.directory '*'";
checkout scm;
Expand Down Expand Up @@ -68,7 +68,7 @@ def baseTests(String image) {
flow_tests.each { current_test ->
base_tests["Flow Test - ${current_test}"] = {
node {
docker.image(image).inside('--user=root --privileged -v /var/run/docker.sock:/var/run/docker.sock') {
withDockerContainer(args: '-u root', image: image) {
stage("Setup ${current_test}") {
sh label: 'Configure git', script: "git config --system --add safe.directory '*'";
checkout scm;
Expand Down Expand Up @@ -104,7 +104,7 @@ def getParallelTests(String image) {

'Build without GUI': {
node {
docker.image(image).inside('--user=root --privileged -v /var/run/docker.sock:/var/run/docker.sock') {
withDockerContainer(args: '-u root', image: image) {
stage('Setup no-GUI Build') {
echo "Build without GUI";
sh label: 'Configure git', script: "git config --system --add safe.directory '*'";
Expand All @@ -121,7 +121,7 @@ def getParallelTests(String image) {

'Build without Test': {
node {
docker.image(image).inside('--user=root --privileged -v /var/run/docker.sock:/var/run/docker.sock') {
withDockerContainer(args: '-u root', image: image) {
stage('Setup no-test Build') {
echo "Build without Tests";
sh label: 'Configure git', script: "git config --system --add safe.directory '*'";
Expand All @@ -148,7 +148,7 @@ def getParallelTests(String image) {

'Unit Tests Ninja': {
node {
docker.image(image).inside('--user=root --privileged -v /var/run/docker.sock:/var/run/docker.sock') {
withDockerContainer(args: '-u root', image: image) {
stage('Setup Ninja Tests') {
sh label: 'Configure git', script: "git config --system --add safe.directory '*'";
checkout scm;
Expand All @@ -174,7 +174,7 @@ def getParallelTests(String image) {

'Compile with C++20': {
node {
docker.image('openroad/ubuntu-cpp20').inside('--user=root --privileged -v /var/run/docker.sock:/var/run/docker.sock') {
withDockerContainer(args: '-u root', image: image) {
stage('Setup C++20 Compile') {
sh label: 'Configure git', script: "git config --system --add safe.directory '*'";
checkout scm;
Expand All @@ -188,22 +188,75 @@ def getParallelTests(String image) {

];

if (env.BRANCH_NAME == 'master') {
deb_os = [
[name: 'Ubuntu 20.04' , artifact_name: 'ubuntu-20.04', image: 'openroad/ubuntu20.04-dev'],
[name: 'Ubuntu 22.04' , artifact_name: 'ubuntu-22.04', image: 'openroad/ubuntu22.04-dev'],
[name: 'Debian 11' , artifact_name: 'debian11', image: 'openroad/debian11-dev']
];
deb_os.each { os ->
ret["Build .deb - ${os.name}"] = {
node {
stage('Setup and Build') {
sh label: 'Pull latest image', script: "docker pull ${os.image}:latest";
withDockerContainer(args: '-u root', image: "${os.image}") {
sh label: 'Configure git', script: "git config --system --add safe.directory '*'";
checkout([
$class: 'GitSCM',
branches: [[name: scm.branches[0].name]],
doGenerateSubmoduleConfigurations: false,
extensions: [
[$class: 'CloneOption', noTags: false],
[$class: 'SubmoduleOption', recursiveSubmodules: true]
],
submoduleCfg: [],
userRemoteConfigs: scm.userRemoteConfigs
]);
def version = sh(script: 'git describe | sed s,^v,,', returnStdout: true).trim();
sh label: 'Create Changelog', script: "./debian/create-changelog.sh ${version}";
sh label: 'Run debuild', script: 'debuild --preserve-env --preserve-envvar=PATH -B -j$(nproc)';
sh label: 'Move generated files', script: "./debian/move-artifacts.sh ${version} ${os.artifact_name}";
archiveArtifacts artifacts: '*' + "${version}" + '*';
}
}
}
}
}
}

return ret;
}

timeout(time: 2, unit: 'HOURS') {
node {
stage('Checkout') {
checkout scm;
}
def DOCKER_IMAGE;
stage('Build and Push Docker Image') {
DOCKER_IMAGE = dockerPush('ubuntu22.04', 'openroad');
echo "Docker image is ${DOCKER_IMAGE}";
}
parallel(getParallelTests(DOCKER_IMAGE));
stage('Send Email Report') {
sendEmail();
node {
stage('Checkout') {
checkout scm;
}
def DOCKER_IMAGE;
stage('Build, Test and Push Docker Image') {
Map build_docker_images = [failFast: false];
test_os = [
[name: 'Ubuntu 20.04', base: 'ubuntu:20.04', image: 'ubuntu20.04'],
[name: 'Ubuntu 22.04', base: 'ubuntu:22.04', image: 'ubuntu22.04'],
[name: 'Ubuntu 24.04', base: 'ubuntu:24.04', image: 'ubuntu24.04'],
[name: 'RockyLinux 9', base: 'rockylinux:9', image: 'rockylinux9'],
[name: 'Debian 11', base: 'debian:11', image: 'debian11']
];
test_os.each { os ->
build_docker_images["Test Installer - ${os.name}"] = {
node {
checkout scm;
sh label: 'Build Docker image', script: "./etc/DockerHelper.sh create -target=builder -os=${os.image}";
sh label: 'Test Docker image', script: "./etc/DockerHelper.sh test -target=builder -os=${os.image}";
dockerPush("${os.image}", 'openroad');
}
}
}
parallel(build_docker_images);
DOCKER_IMAGE = dockerPush('ubuntu22.04', 'openroad');
echo "Docker image is ${DOCKER_IMAGE}";
}
parallel(getParallelTests(DOCKER_IMAGE));
stage('Send Email Report') {
sendEmail();
}
}
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ flowchart LR
subgraph ORFlow
direction TB
style ORFlow fill:#ffffff00, stroke-width:0px
A[Verilog\n+ libraries\n + constraints] --> FLOW
A[Verilog
+ libraries
+ constraints] --> FLOW
style A fill:#74c2b5,stroke:#000000,stroke-width:4px
subgraph FLOW
style FLOW fill:#FFFFFF00,stroke-width:4px
Expand All @@ -64,7 +66,8 @@ flowchart LR
style G fill:#ff6666,stroke:#000000,stroke-width:4px
end
FLOW --> H[GDSII\n Final Layout]
FLOW --> H[GDSII
Final Layout]
%% H --- H1[ ]
%% style H1 stroke-width:0px, fill: #FFFFFF00
%% linkStyle 11 stroke-width:0px
Expand Down
4 changes: 3 additions & 1 deletion debian/create-changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ fi
cat > debian/changelog <<EOF
openroad ($1) UNRELEASED; urgency=low
$(git log -1 --pretty=format:"-- %an <%ae> on %ad")
* Automated release
$(git log --date=rfc -1 --pretty=format:" -- %an <%ae> %ad")
EOF
14 changes: 14 additions & 0 deletions debian/move-artifacts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

if [[ $# -ne 2 ]]; then
echo "Error: This script requires exactly one argument."
echo "usage: $0 <VERSION> <OS_NAME>"
exit 1
fi

for file in ../*${1}*; do
base_name=$(basename "$file")
name="${base_name%.*}"
ext="${base_name##*.}"
mv "$file" "${name}-${2}.${ext}"
done
1 change: 1 addition & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ override_dh_shlibdeps:
override_dh_install:
dh_install --sourcedir=/opt

override_dh_auto_test:
override_dh_dwz:
26 changes: 0 additions & 26 deletions docker/Dockerfile.cpp20

This file was deleted.

Loading

0 comments on commit a4902d7

Please sign in to comment.