Skip to content

Commit 3a33890

Browse files
committed
Merge branch 'master' into mpl2-asap7-mock-array
2 parents c93d0d1 + c1ce9c9 commit 3a33890

File tree

390 files changed

+135818
-27530
lines changed

Some content is hidden

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

390 files changed

+135818
-27530
lines changed

.devcontainer/devcontainer.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright (c) 2024 Antmicro <www.antmicro.com>
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
{
5+
"image": "ghcr.io/the-openroad-project/openroad-flow-scripts:lxqt",
6+
"forwardPorts": [6080],
7+
"portsAttributes": {
8+
"6080": {
9+
"label": "desktop"
10+
}
11+
},
12+
"postAttachCommand": "bash /usr/local/share/desktop-init.sh"
13+
}

.github/workflows/black.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Lint Python
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
- uses: psf/black@stable
11+

.github/workflows/github-actions-cron-sync-fork-from-upstream.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ on:
1010
description: Use GitHub --force push.
1111
default:
1212

13-
repository_dispatch:
14-
1513

1614
jobs:
1715
Sync-Branch-From-Upstream:

.github/workflows/github-actions-cron-test-installer.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
strategy:
2727
fail-fast: false
2828
matrix:
29-
os: ["ubuntu20.04", "ubuntu22.04", "centos7"]
29+
os: ["ubuntu20.04", "ubuntu22.04"]
3030
runs-on: ubuntu-latest
3131
steps:
3232
- name: Check out repository code
@@ -45,16 +45,11 @@ jobs:
4545
sudo service docker restart
4646
- name: Run installer
4747
run: |
48-
./etc/DockerHelper.sh create -target=dev -os=${{ matrix.os }}
48+
./etc/DockerHelper.sh create -target=dev -os=${{ matrix.os }} -tag=latest
4949
- name: Build project
5050
run: |
51-
./etc/DockerHelper.sh create -target=builder -os=${{ matrix.os }}
51+
./etc/DockerHelper.sh create -target=builder -os=${{ matrix.os }} -tag=latest
5252
- name: Test build
5353
run: |
5454
cmd="source ./env.sh ; yosys -help ; openroad -help ; make -C flow ;"
55-
if [[ ${{ matrix.os }} == "centos7" ]]; then
56-
cmd="source /opt/rh/devtoolset-8/enable; ${cmd}"
57-
cmd="source /opt/rh/llvm-toolset-7.0/enable; ${cmd}"
58-
cmd="source /opt/rh/rh-python38/enable; ${cmd}"
59-
fi
6055
docker run openroad/flow-${{ matrix.os }}-builder /bin/bash -c "${cmd}"
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Manually Trigger Update Rules
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
type:
6+
description: 'Type of update (overwrite or normal)'
7+
required: true
8+
default: 'normal'
9+
10+
jobs:
11+
update:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
steps:
16+
- name: Check out repository code recursively
17+
uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 0
20+
- uses: actions/setup-python@v4
21+
with:
22+
python-version: "3.10"
23+
- name: Install Python Packages
24+
run: |
25+
pip install firebase-admin
26+
- name: Execute Python Script Update
27+
env:
28+
CREDS_FILE: ${{ secrets.CREDS_FILE }}
29+
API_BASE_URL: ${{ secrets.API_BASE_URL }}
30+
run: |
31+
if [[ "${{ github.event.inputs.type }}" == "overwrite" ]]; then
32+
python flow/util/updateRules.py --keyFile "${CREDS_FILE}" --apiURL ${API_BASE_URL} --commitSHA $(git rev-parse HEAD) --overwrite
33+
else
34+
python flow/util/updateRules.py --keyFile "${CREDS_FILE}" --apiURL ${API_BASE_URL} --commitSHA $(git rev-parse HEAD)
35+
fi
36+
- name: Push updated rules
37+
id: remote-update
38+
run: |
39+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
40+
git config --local user.name "github-actions[bot]"
41+
if [ -n "$(git status --porcelain)" ]; then
42+
echo "has_update=true" >> "$GITHUB_OUTPUT"
43+
else
44+
echo "has_update=false" >> "$GITHUB_OUTPUT"
45+
fi
46+
git add .
47+
git commit --signoff -m "flow: update rules based on new golden reference"
48+
- if: "steps.remote-update.outputs.has_update == 'true'"
49+
name: update rules pr
50+
id: remote-update-pr
51+
run: |
52+
git push
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
name: Build and publish ORFS images
2+
on:
3+
push:
4+
paths:
5+
- etc/DependencyInstaller.sh
6+
- etc/DockerHelper.sh
7+
- .github/workflows/github-actions-publish-docker-images.yml
8+
- build_openroad.sh
9+
- env.sh
10+
- flow/Makefile
11+
- docker/Dockerfile.dev
12+
- docker/Dockerfile.builder
13+
- tools/codespace/scripts/**
14+
- tools/codespace/Dockerfile-lxqt
15+
pull_request:
16+
paths:
17+
- etc/DependencyInstaller.sh
18+
- etc/DockerHelper.sh
19+
- .github/workflows/github-actions-publish-docker-images.yml
20+
- build_openroad.sh
21+
- env.sh
22+
- flow/Makefile
23+
- docker/Dockerfile.dev
24+
- docker/Dockerfile.builder
25+
- tools/codespace/scripts/**
26+
- tools/codespace/Dockerfile-lxqt
27+
28+
jobs:
29+
buildCodespaceImage:
30+
runs-on: ubuntu-latest
31+
timeout-minutes: 600
32+
steps:
33+
- uses: actions/checkout@v4
34+
35+
- name: Set environment variables
36+
run: echo "IMAGE=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
37+
38+
- name: Set up Docker Buildx
39+
uses: docker/setup-buildx-action@v3
40+
41+
- name: Login to GitHub Container Registry (GHCR)
42+
if: github.event_name != 'pull_request'
43+
uses: docker/login-action@v3
44+
with:
45+
registry: ghcr.io
46+
username: gha
47+
password: ${{ github.token }}
48+
49+
- name: Build and export codespaces image
50+
uses: docker/build-push-action@v6
51+
with:
52+
context: .
53+
push: true
54+
tags: ${{ env.IMAGE }}:lxqt
55+
file: tools/codespace/Dockerfile-lxqt
56+
cache-from: type=registry,ref=${{ env.IMAGE }}:lxqtbuildcache
57+
cache-to: type=registry,ref=${{ env.IMAGE }}:lxqtbuildcache
58+
59+
buildDependenciesImage:
60+
strategy:
61+
fail-fast: false
62+
matrix:
63+
os: [["ubuntu20.04", "ubuntu:20.04"], ["ubuntu22.04", "ubuntu:22.04"]]
64+
runs-on: ubuntu-latest
65+
steps:
66+
- name: Check out repository code
67+
uses: actions/checkout@v4
68+
with:
69+
fetch-depth: 1
70+
submodules: recursive
71+
72+
- name: Set environment variables
73+
run: |
74+
echo "IMAGE_DEPS=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')-dev/${{ matrix.os[0] }}" >> $GITHUB_ENV
75+
76+
- name: Set up Docker Buildx
77+
uses: docker/setup-buildx-action@v3
78+
79+
- name: Login to GitHub Container Registry (GHCR)
80+
if: github.event_name != 'pull_request'
81+
uses: docker/login-action@v2
82+
with:
83+
registry: ghcr.io
84+
username: gha
85+
password: ${{ github.token }}
86+
87+
- name: Copy OpenROAD installer
88+
run: cp tools/OpenROAD/etc/DependencyInstaller.sh etc/InstallerOpenROAD.sh
89+
90+
- name: Build and export dependencies image
91+
uses: docker/build-push-action@v6
92+
with:
93+
context: etc
94+
push: true
95+
tags: ${{ env.IMAGE_DEPS }}:latest
96+
file: docker/Dockerfile.dev
97+
build-args: |
98+
fromImage=${{ matrix.os[1] }}
99+
cache-from: type=registry,ref=${{ env.IMAGE_DEPS }}:buildcache
100+
cache-to: type=registry,ref=${{ env.IMAGE_DEPS }}:buildcache,mode=max
101+
102+
buildORFSImage:
103+
needs: buildDependenciesImage
104+
strategy:
105+
fail-fast: false
106+
matrix:
107+
os: ["ubuntu20.04", "ubuntu22.04"]
108+
runs-on: ubuntu-latest
109+
steps:
110+
- name: Free Disk Space
111+
uses: jlumbroso/free-disk-space@main
112+
with:
113+
tool-cache: false
114+
115+
- name: Check out repository code
116+
uses: actions/checkout@v4
117+
with:
118+
fetch-depth: 1
119+
submodules: recursive
120+
121+
- name: Set environment variables
122+
run: |
123+
echo "IMAGE=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')/${{ matrix.os }}" >> $GITHUB_ENV
124+
echo "IMAGE_DEPS=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')-dev/${{ matrix.os }}" >> $GITHUB_ENV
125+
echo "NUM_THREADS=$(nproc)" >> $GITHUB_ENV
126+
127+
- name: Set up Docker Buildx
128+
uses: docker/setup-buildx-action@v3
129+
130+
- name: Login to GitHub Container Registry (GHCR)
131+
if: github.event_name != 'pull_request'
132+
uses: docker/login-action@v2
133+
with:
134+
registry: ghcr.io
135+
username: gha
136+
password: ${{ github.token }}
137+
138+
- name: Build and export ORFS image
139+
uses: docker/build-push-action@v6
140+
with:
141+
context: .
142+
push: true
143+
tags: ${{ env.IMAGE }}:latest
144+
file: docker/Dockerfile.builder
145+
build-args: |
146+
fromImage=${{ env.IMAGE_DEPS }}
147+
numThreads=${{ env.NUM_THREADS }}
148+
cache-from: type=registry,ref=${{ env.IMAGE }}:buildcache
149+
cache-to: type=registry,ref=${{ env.IMAGE }}:buildcache,mode=max

.github/workflows/github-actions-update-rules.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@ jobs:
1313
- name: Check out repository code recursively
1414
uses: actions/checkout@v3
1515
with:
16-
submodules: recursive
1716
fetch-depth: 0
17+
- name: Git prep
18+
run: |
19+
git config --add remote.origin.fetch "+refs/pull/*/head:refs/remotes/origin/pr/*"
20+
git fetch
21+
git checkout "origin/pr/${{ github.event.client_payload.branch }}"
1822
- uses: actions/setup-python@v4
1923
with:
2024
python-version: "3.10"
@@ -29,9 +33,9 @@ jobs:
2933
echo ${{ github.event_name }}
3034
echo ${{ github.event.client_payload.type }}
3135
if [[ "${{ github.event_name }}" == "repository_dispatch" && "${{ github.event.client_payload.type }}" == "overwrite" ]]; then
32-
python flow/util/updateRules.py --keyFile "${CREDS_FILE}" --apiURL ${API_BASE_URL} --overwrite
36+
python flow/util/updateRules.py --keyFile "${CREDS_FILE}" --apiURL ${API_BASE_URL} --commitSHA ${{ github.event.client_payload.commitsha }} --overwrite
3337
else
34-
python flow/util/updateRules.py --keyFile "${CREDS_FILE}" --apiURL ${API_BASE_URL}
38+
python flow/util/updateRules.py --keyFile "${CREDS_FILE}" --apiURL ${API_BASE_URL} --commitSHA ${{ github.event.client_payload.commitsha }}
3539
fi
3640
- name: Push updated rules
3741
id: remote-update
@@ -44,8 +48,13 @@ jobs:
4448
echo "has_update=false" >> "$GITHUB_OUTPUT"
4549
fi
4650
git add .
47-
git commit -m "flow: update rules based on new golden reference"
48-
- if: "steps.remote-update.outputs.has_update == 'true'"
51+
git commit --signoff -m "flow: update rules based on new golden reference"
52+
- if: "github.event.client_payload.branch != 'master'"
53+
name: update rules pr
54+
id: remote-update-pr
55+
run: |
56+
git push origin "HEAD:refs/pull/${{ github.event.client_payload.branch }}/head"
57+
- if: "steps.remote-update.outputs.has_update == 'true' && github.event.client_payload.branch == 'master'"
4958
name: Create Draft PR
5059
uses: peter-evans/create-pull-request@v5
5160
with:

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,10 @@ perf.data.old
8888
docs/main
8989
docs/build
9090
GitGuide.md
91+
SupportedOS.md
92+
index2.md
93+
Manpage.md
9194
mainREADME.md
95+
build
96+
.scala-build/
97+
.bsp/

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,3 @@
44
[submodule "tools/OpenROAD"]
55
path = tools/OpenROAD
66
url = ../OpenROAD.git
7-
[submodule "tools/LSOracle"]
8-
path = tools/LSOracle
9-
url = ../../The-OpenROAD-Project/LSOracle.git

Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ WORKDIR /OpenROAD-flow-scripts
55

66
# synthesis tools binaries and plugins
77
COPY --from=openroad/yosys /install ./tools/install/yosys
8-
COPY --from=openroad/lsoracle /LSOracle/build/core/lsoracle ./tools/build/LSOracle/bin/lsoracle
9-
COPY --from=openroad/lsoracle /LSOracle/core/test.ini ./tools/build/LSOracle/share/lsoracle/test.ini
10-
COPY --from=openroad/lsoracle /LSOracle/build/yosys-plugin/oracle.so /OpenROAD-flow/tools/build/yosys/share/yosys/plugins/
118

129
# openroad binary
1310
COPY --from=openroad/ubuntu22.04-builder-gcc /OpenROAD/build/src/openroad ./tools/install/OpenROAD/bin/openroad

0 commit comments

Comments
 (0)