Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
4be3390
docs(claude): remove dreamplace
Emin017 Apr 13, 2026
54224a2
chore: bump deps
Emin017 Apr 13, 2026
9ecd313
refactor(ecc): rename pip hub to ecc_pypi to avoid cross-module colli…
Emin017 Apr 13, 2026
4fddb1c
ci: install ecc-dreamplace from release wheel instead of building fro…
Emin017 Apr 15, 2026
3afb4da
docs: document dual-mode dreamplace install (source vs wheel)
Emin017 Apr 15, 2026
fb2c581
chore: bump ecc-dreamplace version to v0.1.0-alpha.1
Emin017 Apr 17, 2026
9be4e30
feat: remove auditwheel step
Emin017 Apr 17, 2026
d32d66f
chore(ci): downgrade ecc-tools version to v0.1.0-alpha
Emin017 Apr 20, 2026
270efc0
refactor(ci): update CI for current Bazel wheel workflow
Emin017 Apr 20, 2026
0c78aff
fix(ci): fix GitHub Actions checkout auth
Emin017 Apr 20, 2026
08785fc
chore(ci): remove unused sccache from CI
Emin017 Apr 20, 2026
9be14ca
ci: smoke test ecc toolchain wheels before build
Emin017 Apr 20, 2026
c61f81d
fix(ci): remove unexist Extra option
Emin017 Apr 20, 2026
3513f80
fix(ci): add no deps option
Emin017 Apr 20, 2026
c9a8276
fix(ci): use uv pip install in wheel smoke test to resolve tool.uv.so…
Emin017 Apr 21, 2026
487a9c8
fix(ci): use temp venv for uv pip install in smoke test
Emin017 Apr 21, 2026
d235d4b
fix(ci): use uv venv instead of python -m venv in smoke test
Emin017 Apr 21, 2026
9939051
fix(ci): use uv pip install with explicit GitHub URLs in smoke test
Emin017 Apr 21, 2026
9ea2b7d
chore(ci): bump ecc-tools wheel version to v0.1.0-alpha.1
Emin017 Apr 21, 2026
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
143 changes: 48 additions & 95 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,137 +2,90 @@ name: CI

on:
workflow_dispatch:
# push:
# branches:
# - 'main'
# pull_request:
push:
branches:
- main
pull_request:

concurrency:
group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions:
contents: read

env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
UV_PYTHON_PREFERENCE: only-managed
ECC_DREAMPLACE_WHEEL_URL: https://github.com/openecos-projects/ecc-dreamplace/releases/download/v0.1.0-alpha.1/ecc_dreamplace-0.1.0a1-py3-none-manylinux_2_34_x86_64.whl
ECC_TOOLS_WHEEL_URL: https://github.com/openecos-projects/ecc-tools/releases/download/v0.1.0-alpha.1/ecc_tools-0.1.0a1-py3-none-manylinux_2_34_x86_64.whl

jobs:
build-package:
name: Build Package
ci:
name: Checks And Build
runs-on: ubuntu-latest
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: true

# feel free to set to "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: false
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ env.GH_TOKEN }}
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.9

- name: Convert SSH to HTTPS in gitmodules
run: sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules

- name: Configure git credentials
run: |
git config --global url."https://${{ env.GH_TOKEN }}@github.com/".insteadOf "https://github.com/"

- name: Checkout submodules
run: git submodule update --init --recursive
submodules: recursive

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: latest

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
cache-dependency-path: gui/pnpm-lock.yaml
python-version: "3.11"

- name: Setup uv
uses: astral-sh/setup-uv@v3
with:
version: latest
enable-cache: "true"

- name: Install Python dependencies (uv)
run: uv sync --frozen --all-groups --python 3.11

- name: Install ecc-dreamplace from release wheel
run: >
uv pip install --no-deps
https://github.com/openecos-projects/ecc-dreamplace/releases/download/v0.1.0-alpha.1/ecc_dreamplace-0.1.0a1-py3-none-manylinux_2_34_x86_64.whl

- name: Install frontend dependencies
working-directory: gui
run: pnpm install

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build build-essential unzip pkg-config \
libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev libsoup-3.0-dev libfuse2 \
patchelf squashfs-tools desktop-file-utils libwebkit2gtk-4.1-dev

sudo apt-get install -y g++-10 \
tcl-dev libgflags-dev libgoogle-glog-dev libboost-all-dev libgtest-dev \
flex libeigen3-dev libunwind-dev libmetis-dev libgmp-dev bison \
libhwloc-dev libcairo2-dev libcurl4-openssl-dev libtbb-dev git \
libftdi1-2 libhidapi-hidraw0 librsvg2-dev

- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.14.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}
repository-cache: true

- name: Build release (packaging test)
env:
ENABLE_OSS_CAD_SUITE: "true"
CARGO_PROFILE_RELEASE_STRIP: "false"
APPIMAGE_EXTRACT_AND_RUN: "1"
- name: Install Python dependencies
run: uv sync --frozen --all-groups --python 3.11

- name: Install release wheels for native toolchains
run: |
bazel build //:release_bundle
mkdir -p _bundle_out
tar -xf bazel-bin/tauri_bundle/tauri_bundle.tar -C _bundle_out
uv pip install --python .venv/bin/python --no-deps "${ECC_DREAMPLACE_WHEEL_URL}"
uv pip install --python .venv/bin/python --no-deps "${ECC_TOOLS_WHEEL_URL}"

- name: Upload AppImage artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: appimage
if-no-files-found: ignore
path: _bundle_out/**/*.AppImage
- name: Smoke test native toolchain wheels
run: |
.venv/bin/python - <<'PY'
import ecc_tools_bin.ecc_py # noqa: F401
from dreamplace.Params import Params # noqa: F401
from dreamplace.Placer import PlacementEngine # noqa: F401

print("ecc-tools and ecc-dreamplace imports passed")
PY

# - name: Ruff format check
# run: uv run ruff format --check chipcompiler test

# - name: Ruff lint
# run: uv run ruff check chipcompiler test

# - name: Pyright
# run: uv run pyright chipcompiler

# - name: Pytest
# run: uv run pytest test/ --cov=chipcompiler --cov-report=term-missing

- name: Build distributable wheel
run: bazel run //:build_wheel

- name: Upload deb artifacts
- name: Upload wheel artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: deb
name: ecc-wheel
if-no-files-found: ignore
path: _bundle_out/**/*.deb
path: |
dist/wheel/repaired/*.whl
dist/wheel/SHA256SUMS
25 changes: 0 additions & 25 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,27 +1,5 @@
load("@ecos-bazel//rules:python_packaging.bzl", "python_pyinstaller_bundle")

package(default_visibility = ["//visibility:public"])

exports_files([
"ecc.spec",
])

python_pyinstaller_bundle(
name = "server_bundle",
spec_file = "ecc.spec",
srcs = [
"README.md",
"pyproject.toml",
"uv.lock",
"//chipcompiler:chipcompiler_python_sources",
"//chipcompiler:chipcompiler_runtime_data",
],
runtime_bundle = "//chipcompiler/thirdparty:ecc_bundle",
output_name = "chipcompiler",
pyinstaller = "//bazel:pyinstaller",
)


alias(
name = "prepare_dev",
actual = "//bazel/scripts:prepare_dev",
Expand All @@ -34,14 +12,12 @@ genrule(
"README.md",
"//chipcompiler:chipcompiler_python_sources",
"//chipcompiler:chipcompiler_runtime_data",
"//chipcompiler/thirdparty:ecc_bundle",
],
outs = ["raw_wheel/ecc-0.1.0-py3-none-any.whl"],
tools = ["@multitool//tools/uv"],
cmd = """
set -euo pipefail
UV="$(execpath @multitool//tools/uv)"
BUNDLE="$(location //chipcompiler/thirdparty:ecc_bundle)"
STAGE=$$(mktemp -d)
trap 'rm -rf "$$STAGE"' EXIT
for src in $(locations pyproject.toml) \
Expand All @@ -51,7 +27,6 @@ genrule(
mkdir -p "$$STAGE/$$(dirname "$$src")"
cp "$$src" "$$STAGE/$$src"
done
tar -xf "$$BUNDLE" -C "$$STAGE"
"$$UV" build --wheel --directory "$$STAGE" --out-dir "$$STAGE/_dist" --cache-dir "$$STAGE/.uv-cache"
cp "$$STAGE"/_dist/*.whl "$@"
""",
Expand Down
10 changes: 5 additions & 5 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions bazel/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
load("@rules_shell//shell:sh_binary.bzl", "sh_binary")

package(default_visibility = ["//visibility:public"])

# Alias to ecos-bazel-rules pyinstaller tool
alias(
name = "pyinstaller",
actual = "@ecos-bazel//tools:pyinstaller",
)
2 changes: 2 additions & 0 deletions bazel/scripts/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ sh_binary(
srcs = ["build-wheel.sh"],
data = [
"//:raw_wheel",
"@multitool//tools/uv",
"@python_3_11//:python3",
],
args = [
"$(rlocationpath //:raw_wheel)",
"$(rlocationpath @python_3_11//:python3)",
"$(rlocationpath @multitool//tools/uv)",
],
)

Expand Down
Loading
Loading