Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
Signed-off-by: Vitor Bandeira <[email protected]>
  • Loading branch information
vvbandeira committed Aug 15, 2024
2 parents 9f979a7 + 797d4c1 commit 5ff1cbc
Show file tree
Hide file tree
Showing 2,795 changed files with 428,305 additions and 524,528 deletions.
4 changes: 4 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Checks: >
clang-diagnostic-*,
clang-analyzer-*,
-clang-analyzer-core.NonNullParamChecker,
-clang-analyzer-core.CallAndMessage,
-clang-analyzer-core.uninitialized.UndefReturn,
-clang-analyzer-cplusplus.NewDeleteLeaks,
-clang-analyzer-optin.performance.Padding,
readability-*,
Expand Down Expand Up @@ -50,10 +52,12 @@ Checks: >
-modernize-use-transparent-functors,
misc-*,
-misc-const-correctness,
-misc-include-cleaner,
-misc-no-recursion,
-misc-non-private-member-variables-in-classes,
-misc-redundant-expression,
-misc-unused-parameters,
-misc-use-anonymous-namespace,
CheckOptions:
- key: google-runtime-int.TypeSuffix
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/black.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Lint Python

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
sudo apt update
sudo apt install -y python3-jinja2 git clang-format-14
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check that ODB Generated Files Are Up To Date
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github-actions-build-deb-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
image: openroad/${{ matrix.os }}-dev

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

Expand Down
28 changes: 0 additions & 28 deletions .github/workflows/github-actions-c++-unit-tests.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/github-actions-c++.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .github/workflows/github-actions-clang-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: ClangTidy Gen
Expand All @@ -17,6 +17,7 @@ jobs:
build_dir: './build'
cmake_command: cmake . -B build
config_file: '.clang-tidy'
exclude: "*/codeGenerator/templates/*"
split_workflow: true
- name: Upload Artifacts
uses: actions/upload-artifact@v3
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/github-actions-docs-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Docs Tester

on:
push:

jobs:
docs-test-job:
name: 'Test docs for Tcl syntax and README'
runs-on: ubuntu-latest
container:
image: openroad/ubuntu-cpp20

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Install required package
run: |
apt-get update
apt-get install -y pandoc
- name: Build messages
run: |
python3 docs/src/test/make_messages.py
- name: Preprocess files
run: |
cd docs
make preprocess -j${nproc}
- name: Run Tcl syntax parser
run: |
python3 docs/src/test/man_tcl_params.py
- name: Run readme parser
run : |
cd docs
make clean
python3 src/test/readme_check.py
4 changes: 2 additions & 2 deletions .github/workflows/github-actions-format-on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
sudo apt update
sudo apt install -y clang-14 clang-format-14
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
Expand All @@ -24,7 +24,7 @@ jobs:
- name: Check format of cpp changed files
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
if [[ "${file##*.}" =~ ^(h|C|cc|cp|cpp|c++|CPP|cxx|hh)$ && "${file}" != "src/sta/"* && "${file}" != "src/rsz/"* && "${file}" != "src/odb/src/codeGenerator/"* ]]; then
if [[ "${file##*.}" =~ ^(h|C|cc|cp|cpp|c++|CPP|cxx|hh)$ && "${file}" != "src/sta/"* && "${file}" != "src/odb/src/codeGenerator/"* ]]; then
clang-format --dry-run --Werror $file
fi
done
11 changes: 2 additions & 9 deletions .github/workflows/github-actions-lint-tcl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,8 @@ jobs:

- name: Install tclint
run: |
python -m pip install tclint==0.1.6
python -m pip install tclint==0.3.2
# TODO: hardcoded list of files while we incrementally lint codebase
# See issue #4347 for tracking
- name: Lint
run: |
tclint \
src/rsz/src/Resizer.tcl \
src/gui/src/gui.tcl \
src/pdn/src/pdn.tcl \
src/pad/src/pad.tcl \
src/psm/src/pdnsim.tcl
tclint .
4 changes: 2 additions & 2 deletions .github/workflows/github-actions-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
xcode-version: latest-stable
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install dependencies
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
rm -rf "${{ github.workspace }}"
mkdir -p "${{ github.workspace }}"
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Build OpenROAD
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/github-actions-on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: run security_scan_on_push
uses: The-OpenROAD-Project/actions/security_scan_on_push@main



57 changes: 0 additions & 57 deletions .github/workflows/github-actions-test-installer.yml

This file was deleted.

47 changes: 45 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ option(ENABLE_TESTS "Enable OpenROAD tests" ON)
# Allow enabling address sanitizer
option(ASAN "Enable Address Sanitizer" OFF)

# Allow enabling address sanitizer
# On Ubuntu22.04 you need to use "sudo sysctl vm.mmap_rnd_bits=28" to
# resolve a known fatal
option(TSAN "Enable Thread Sanitizer" OFF)

# Allow enabling address sanitizer
option(UBSAN "Enable Undefined Behavior Sanitizer" OFF)

project(OpenROAD VERSION 1
LANGUAGES CXX
)
Expand Down Expand Up @@ -137,19 +145,54 @@ configure_file(
${OPENROAD_HOME}/include/ord/Version.hh
)


################################################################

if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.1")
MESSAGE(STATUS "Older version of GCC detected. Linking against stdc++fs")
link_libraries(stdc++fs)
endif()

# Ask CMake to output a compile_commands.json file for use with things like clang-tidy
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)



add_subdirectory(third-party)

if(ENABLE_TESTS)
find_program (BASH_PROGRAM bash REQUIRED)

enable_testing()
add_custom_target(build_and_test ${CMAKE_CTEST_COMMAND} --parallel --output-on-failure -LE IntegrationTest)
include(GoogleTest)
endif()

add_subdirectory(src)

# After all compiled, look for the respective flags
target_compile_definitions(openroad PRIVATE GPU)
target_compile_definitions(openroad PRIVATE BUILD_PYTHON)
target_compile_definitions(openroad PRIVATE BUILD_GUI)
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)
add_custom_target(
man_page ALL
COMMAND make clean && make preprocess && make all -j${PROCESSOR_COUNT}
WORKING_DIRECTORY ${OPENROAD_HOME}/docs
)

# 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)

endif()
Loading

0 comments on commit 5ff1cbc

Please sign in to comment.