From 87e837a8bebfdd582dbc68e6b95075e1a10c79a3 Mon Sep 17 00:00:00 2001 From: Akash Levy Date: Sat, 11 Jul 2026 22:22:43 -0700 Subject: [PATCH] feat(ci): expand CI with macOS and CentOS 7 (Docker) platform coverage (#473) --- .github/workflows/ci.yml | 77 ++++++++++++++++++++++++++++++++++++++-- Brewfile | 2 +- 2 files changed, 75 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d02e9616..00020160 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,8 @@ on: pull_request: jobs: - build: + # Primary native Linux build used for install artifacts. + linux-ubuntu: runs-on: ubuntu-latest steps: - name: Checkout @@ -41,7 +42,7 @@ jobs: uses: actions/upload-artifact@v7 if: ${{ !cancelled() }} with: - name: artifact + name: artifact-ubuntu path: | build/install/* retention-days: 1 @@ -50,6 +51,76 @@ jobs: uses: actions/upload-artifact@v7 if: ${{ !cancelled() }} with: - name: result + name: result-ubuntu + path: | + test/results/* + + # CentOS 7 Docker: old platform still common in EDA environments. + linux-centos: + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - name: Checkout + uses: actions/checkout@v7 + with: + submodules: true + + - name: Build image + run: docker build -f Dockerfile.centos7 --tag sta-centos7 . + + - name: Test in container + run: | + mkdir -p test/results + docker run --rm \ + -v "$PWD/test/results:/OpenSTA/test/results" \ + --entrypoint /bin/bash sta-centos7 \ + -c "cd /OpenSTA/test && ./regression || (cat results/diffs && exit 1)" + + - name: Upload Test Result + uses: actions/upload-artifact@v7 + if: ${{ !cancelled() }} + with: + name: result-centos7 + path: | + test/results/* + + # Native macOS coverage via Brewfile. + macos: + runs-on: macos-latest + timeout-minutes: 30 + steps: + - name: Checkout + uses: actions/checkout@v7 + with: + submodules: true + + - name: Install dependencies + run: brew bundle + + - name: Build + run: | + eval "$(/opt/homebrew/bin/brew shellenv)" + export PATH="$(brew --prefix flex)/bin:$PATH" + export PATH="$(brew --prefix bison)/bin:$PATH" + export TCL_LIBRARY="$(brew --prefix tcl-tk@8)/lib/libtcl8.6.dylib" + export TCL_INCLUDE_PATH="$(brew --prefix tcl-tk@8)/include/tcl-tk" + export FLEX_INCLUDE_DIR="$(brew --prefix flex)/include" + cmake -S . -B build \ + -D TCL_LIBRARY=$TCL_LIBRARY \ + -D TCL_INCLUDE_PATH=$TCL_INCLUDE_PATH \ + -D FLEX_INCLUDE_DIR=$FLEX_INCLUDE_DIR \ + -DCMAKE_BUILD_TYPE=Release + cmake --build build -j "$(sysctl -n hw.ncpu)" + + - name: Test + run: | + cd test + ./regression || (cat results/diffs && exit 1) + + - name: Upload Test Result + uses: actions/upload-artifact@v7 + if: ${{ !cancelled() }} + with: + name: result-macos path: | test/results/* diff --git a/Brewfile b/Brewfile index b4f025b6..32cc165e 100644 --- a/Brewfile +++ b/Brewfile @@ -6,4 +6,4 @@ brew "swig" brew "tcl-tk@8" tap "mht208/formal" -brew "mht208/formal/cudd" +brew "mht208/formal/cudd", trusted: true