Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/black.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ permissions:

jobs:
lint:
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-24.04' }}
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted-ubuntu-26.04' || 'ubuntu-26.04' }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: psf/black@87928e6d6761a4a6d22250e1fee5601b3998086e # 26.5.1
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
analyze:
name: Analyze ${{ matrix.language }}
if: github.repository_owner != 'The-OpenROAD-Project-private'
runs-on: ubuntu-24.04
runs-on: ubuntu-26.04
permissions:
actions: read
contents: read
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
jobs:
Sync-Branch-From-Upstream:
name: Automatic sync 'master' from The-OpenROAD-Project/OpenROAD-flow-scripts
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-24.04' }}
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted-ubuntu-26.04' || 'ubuntu-26.04' }}

# Only allow one action to run at a time.
concurrency: sync-branch-from-upstream
Expand Down
27 changes: 13 additions & 14 deletions .github/workflows/github-actions-cron-test-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,30 +29,29 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["ubuntu20.04", "ubuntu22.04"]
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-24.04' }}
os: ["ubuntu22.04"]
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted-ubuntu-26.04' || 'ubuntu-26.04' }}
env:
INSTALLER_TAG: installer-${{ github.run_id }}-${{ github.run_attempt }}
INSTALLER_CONTAINER: installer-${{ github.run_id }}-${{ github.run_attempt }}-${{ matrix.os }}
steps:
- name: Check out repository code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1
submodules: recursive
- name: Network Setup
run: |
sudo apt-get update
sudo apt-get install -y bridge-utils
sudo pkill docker
sudo iptables -t nat -F
sudo ifconfig docker0 down
sudo brctl delbr docker0
sudo service docker restart
- name: Run installer
run: |
./etc/DockerHelper.sh create -target=dev -os=${{ matrix.os }} -tag=latest
./etc/DockerHelper.sh create -target=dev -os=${{ matrix.os }} -tag="$INSTALLER_TAG"
- name: Build project
run: |
./etc/DockerHelper.sh create -target=builder -os=${{ matrix.os }} -tag=latest
./etc/DockerHelper.sh create -target=builder -os=${{ matrix.os }} -tag="$INSTALLER_TAG"
- name: Test build
run: |
cmd="source ./env.sh ; yosys -help ; openroad -help ; make -C flow ;"
docker run openroad/flow-${{ matrix.os }}-builder /bin/bash -c "${cmd}"
docker run --rm --name "$INSTALLER_CONTAINER" "openroad/flow-${{ matrix.os }}-builder:$INSTALLER_TAG" /bin/bash -c "${cmd}"
- name: Clean up this installer run
if: always()
run: |
docker rm -f "$INSTALLER_CONTAINER" || true
docker image rm "openroad/flow-${{ matrix.os }}-builder:$INSTALLER_TAG" "openroad/flow-${{ matrix.os }}-dev:$INSTALLER_TAG" || true
2 changes: 1 addition & 1 deletion .github/workflows/github-actions-cron-update-OR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:

jobs:
update:
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-24.04' }}
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted-ubuntu-26.04' || 'ubuntu-26.04' }}
steps:
- name: Check out repository code recursively
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github-actions-cron-update-yosys.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:

jobs:
update:
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-24.04' }}
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted-ubuntu-26.04' || 'ubuntu-26.04' }}
steps:
- name: Check out repository code recursively
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/github-actions-cron-util-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,16 @@ jobs:
testUtilScripts:
strategy:
fail-fast: false
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-24.04' }}
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted-ubuntu-26.04' || 'ubuntu-26.04' }}
steps:
- name: Check out repository code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1
submodules: recursive
- name: Install Dependencies
run: |
sudo apt update
sudo apt install -y python3-pip
- name: Run Tests
run: |
cd flow/test
for file in *.py; do
python "$file"
python3 "$file"
done
2 changes: 1 addition & 1 deletion .github/workflows/github-actions-lint-tcl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permissions:

jobs:
Tclint:
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-24.04' }}
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted-ubuntu-26.04' || 'ubuntu-26.04' }}
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github-actions-manual-update-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:

jobs:
update:
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-24.04' }}
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted-ubuntu-26.04' || 'ubuntu-26.04' }}
strategy:
fail-fast: false
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github-actions-on-delete-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
Delete-From-Staging:
name: Delete branch from staging

runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-24.04' }}
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted-ubuntu-26.04' || 'ubuntu-26.04' }}

permissions:
# Read-only access so we don't accidentally try to push to *this* repository.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github-actions-on-label-create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
jobs:
Push-To-Staging:
name: Push to staging
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-24.04' }}
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted-ubuntu-26.04' || 'ubuntu-26.04' }}

permissions:
# Read-only access so we don't accidentally try to push to *this* repository.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github-actions-on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:

jobs:
scan:
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-24.04' }}
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted-ubuntu-26.04' || 'ubuntu-26.04' }}
steps:
- name: Check out repository code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down
26 changes: 8 additions & 18 deletions .github/workflows/github-actions-publish-docker-images.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Build and publish ORFS images
on:
push:
branches:
- master
paths:
- etc/DependencyInstaller.sh
- etc/DockerHelper.sh
Expand All @@ -12,26 +14,13 @@ on:
- docker/Dockerfile.builder
- tools/codespace/scripts/**
- tools/codespace/Dockerfile-lxqt
pull_request:
paths:
- etc/DependencyInstaller.sh
- etc/DockerHelper.sh
- .github/workflows/github-actions-publish-docker-images.yml
- build_openroad.sh
- env.sh
- flow/Makefile
- docker/Dockerfile.dev
- docker/Dockerfile.builder
- tools/codespace/scripts/**
- tools/codespace/Dockerfile-lxqt

permissions:
contents: read
packages: write

jobs:
buildCodespaceImage:
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-24.04' }}
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted-ubuntu-26.04' || 'ubuntu-26.04' }}
timeout-minutes: 600
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down Expand Up @@ -64,8 +53,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [["ubuntu20.04", "ubuntu:20.04"], ["ubuntu22.04", "ubuntu:22.04"]]
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-24.04' }}
os: [["ubuntu22.04", "ubuntu:22.04"]]
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted-ubuntu-26.04' || 'ubuntu-26.04' }}
steps:
- name: Check out repository code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down Expand Up @@ -108,10 +97,11 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["ubuntu20.04", "ubuntu22.04"]
runs-on: ubuntu-24.04
os: ["ubuntu22.04"]
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted-ubuntu-26.04' || 'ubuntu-26.04' }}
steps:
- name: Free Disk Space
if: runner.environment == 'github-hosted'
uses: jlumbroso/free-disk-space@ceedf095f4ec1a097402bc6bd80831f2e1a6fde6 # v2.0.0
with:
tool-cache: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github-actions-quarterly-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:
jobs:
create-tag:
name: Create quarterly tag
runs-on: ubuntu-24.04
runs-on: ubuntu-26.04
if: github.repository == 'The-OpenROAD-Project/OpenROAD-flow-scripts'
permissions:
contents: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github-actions-stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
Stale:
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-24.04' }}
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted-ubuntu-26.04' || 'ubuntu-26.04' }}

permissions:
# Required to label and close stale issues.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github-actions-update-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:

jobs:
update:
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-24.04' }}
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted-ubuntu-26.04' || 'ubuntu-26.04' }}
strategy:
fail-fast: false
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github-actions-yaml-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
docs-test-job:
name: 'Tests for variables.yaml'
if: github.event_name == 'pull_request' || github.event_name == 'push'
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-24.04' }}
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted-ubuntu-26.04' || 'ubuntu-26.04' }}
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down
2 changes: 1 addition & 1 deletion build_openroad.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Options:
Options valid only for Docker builds:
-c, --copy-platforms Copy platforms to inside docker image.

--os=DOCKER_OS_NAME Choose between ubuntu22.04 (default), ubuntu20.04.
--os=DOCKER_OS_NAME Use ubuntu22.04 (default).

This script builds the OpenROAD tools: openroad, yosys and yosys plugins.
By default, the tools will be built from the linked submodule hashes.
Expand Down
2 changes: 1 addition & 1 deletion docs/user/BuildLocally.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

The `setup.sh` script installs all of the dependencies, including OpenROAD dependencies, if they are not already installed.

Supported configurations are: Ubuntu 20.04, Ubuntu 22.04, Ubuntu 22.04(aarch64), RHEL 8, RockyLinux 9 and Debian 11.
Supported configurations are: Ubuntu 22.04, Ubuntu 22.04(aarch64), RHEL 8, RockyLinux 9 and Debian 11.

``` shell
git clone --recursive https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts
Expand Down
6 changes: 3 additions & 3 deletions docs/user/BuildWithPrebuilt.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ included from the Precision Innovations' GitHub releases
Thanks to [Precision Innovations](https://precisioninno.com/) for hosting and maintaining these binaries.

The following platforms are supported currently:
- Ubuntu 20.04/22.04
- Ubuntu 22.04
- Debian 11

Use the following steps to download:
Expand All @@ -28,10 +28,10 @@ Step 1: Click on the [Precision Innovations Github releases link](https://github
Step 2: Download the artifacts for your distribution.

Step 3: Run the install command based on platform use package installer.
For example Ubuntu 20.04 use:
For example Ubuntu 22.04 use:

```shell
sudo apt install ./openroad_2.0_amd64-ubuntu20.04.deb
sudo apt install ./openroad_2.0_amd64-ubuntu22.04.deb
```

## Verify Installation
Expand Down
2 changes: 1 addition & 1 deletion docs/user/BuildWithWSL.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Windows Subsystem for Linux, or WSL for short is a way for you to mount a Linux-based OS onto your Windows machine, allowing you to build OpenROAD-flow-scripts both locally and via Docker.

## Install WSL
Instructions to install WSL can be found [here](https://learn.microsoft.com/en-us/windows/wsl/install). You may use any kernel supported, such as: Ubuntu 20.04, Ubuntu 22.04, RHEL 8, RockyLinux 9, Debian 11.
Instructions to install WSL can be found [here](https://learn.microsoft.com/en-us/windows/wsl/install). You may use any kernel supported, such as: Ubuntu 22.04, RHEL 8, RockyLinux 9, Debian 11.

We recommend that users follow the Docker build by continuing onto the guide below. However, if you wish to install locally, you may follow the build locally instructions [here](./BuildLocally.md).

Expand Down
6 changes: 2 additions & 4 deletions etc/DependencyInstaller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -261,14 +261,12 @@ _installUbuntuPackages() {
echo "Klayout is already installed"
fi
else
if [[ $1 == 20.04 ]]; then
klayoutChecksum=146f51de7fcc760e51c7438998934d9d
elif [[ $1 == 22.04 ]]; then
if [[ $1 == 22.04 ]]; then
klayoutChecksum=6dfffa50f385881768dee30bdc759608
elif [[ $1 == 24.04 ]]; then
klayoutChecksum=0181713e60891e461d6d1664c1b8e213
else
echo "Unsupported Ubuntu version $1. Supported versions: 20.04, 22.04, 24.04. Please upgrade to a supported LTS release or install KLayout ${klayoutVersion} manually from https://www.klayout.org/build.html"
echo "Unsupported Ubuntu version $1. Supported versions: 22.04, 24.04. Please upgrade to a supported LTS release or install KLayout ${klayoutVersion} manually from https://www.klayout.org/build.html"
exit 1
fi
wget https://www.klayout.org/downloads/Ubuntu-${1%.*}/klayout_${klayoutVersion}-1_amd64.deb
Expand Down
5 changes: 1 addition & 4 deletions etc/DockerHelper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ usage: $0 [CMD] [OPTIONS]
push Push the docker image to Docker Hub

OPTIONS:
-os=OS_NAME Choose between ubuntu20.04 and ubuntu22.04 (default).
-os=OS_NAME Use ubuntu22.04 (default).
-target=TARGET Choose target for the Docker image:
'dev': os + packages to compile app
'builder': os + packages to compile app +
Expand All @@ -45,9 +45,6 @@ EOF

_setup() {
case "${os}" in
"ubuntu20.04")
osBaseImage="ubuntu:20.04"
;;
"ubuntu22.04")
osBaseImage="ubuntu:22.04"
;;
Expand Down
16 changes: 12 additions & 4 deletions flow/test/test_run_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,18 @@ def test_streaming_flush(self):
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
# Wait a bit for first line to be flushed
time.sleep(0.3)
with open(self.log_path) as f:
content = f.read()
# Poll until the first line is flushed. Interpreter start-up time
# varies, so a fixed sleep is racy. The child sleeps 1.5s in total,
# so line1 must show up before the deadline while it still runs.
content = ""
deadline = time.monotonic() + 1.0
while time.monotonic() < deadline:
if os.path.exists(self.log_path):
with open(self.log_path) as f:
content = f.read()
if "line1" in content:
break
time.sleep(0.05)
Comment on lines +202 to +210

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To make the polling loop more robust and efficient, we can make two improvements:

  1. Early exit on subprocess failure: If the subprocess exits prematurely (e.g., due to a crash or error), we should break out of the loop immediately instead of waiting for the full 1.0-second timeout. This prevents unnecessary delays in test failures.
  2. Explicit file encoding: Specify encoding="utf-8" when opening the log file to ensure consistent cross-platform behavior, adhering to PEP 597 best practices.
        content = ""
        deadline = time.monotonic() + 1.0
        while time.monotonic() < deadline:
            if os.path.exists(self.log_path):
                with open(self.log_path, encoding="utf-8") as f:
                    content = f.read()
                if "line1" in content:
                    break
            if proc.poll() is not None:
                break
            time.sleep(0.05)

self.assertIn(
"line1", content, "line1 should appear before subprocess finishes"
)
Expand Down