From a47a8dd8315f6e8d55a90c3f55d4c433e55bff7d Mon Sep 17 00:00:00 2001 From: Kazuto Iris <78157415+kazutoiris@users.noreply.github.com> Date: Sat, 28 Feb 2026 05:51:28 +0800 Subject: [PATCH] Add GitHub Action for CI and fix broken testcases (#391) * feat(ci): add GitHub Action for push and pull request * fix(ci): fix broken testcases * chore: add CODEOWNERS for ci * ci: bump actions/upload-artifact from 6 to 7 --- .github/dependabot.yml | 6 +++++ .github/workflows/ci.yml | 54 ++++++++++++++++++++++++++++++++++++++++ CODEOWNERS | 2 ++ test/get_filter.ok | 2 +- test/report_json1.ok | 10 ++++---- test/suppress_msg.ok | 8 +++--- 6 files changed, 72 insertions(+), 10 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/ci.yml create mode 100644 CODEOWNERS diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..c7fc735e --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: "daily" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..74255543 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,54 @@ +name: CI + +on: + push: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + submodules: true + + - name: Set up dependencies + run: | + sudo apt-get update && sudo apt-get install -y flex libfl-dev bison tcl-dev tcl-tclreadline libeigen3-dev ninja-build + + - name: Set up cudd-3.0.0 + run: | + wget https://github.com/oscc-ip/artifact/releases/download/cudd-3.0.0/build.tar.gz + mkdir -p cudd + tar -zxvf build.tar.gz -Ccudd + + - name: Build + run: | + mkdir build + cd build + cmake .. -G Ninja -DCUDD_DIR=$(pwd)/../cudd -DCMAKE_INSTALL_PREFIX=$(pwd)/install -DCMAKE_BUILD_TYPE=Release + cmake --build . --target all -- -j $(nproc) + cmake --install . + tar -zcvf build.tar.gz -Cinstall . + + - name: Test + run: | + cd test + ./regression + + - name: Upload Artifacts + uses: actions/upload-artifact@v7 + if: ${{ !cancelled() }} + with: + name: artifact + path: | + build/install/* + + - name: Upload Test Result + uses: actions/upload-artifact@v7 + if: ${{ !cancelled() }} + with: + name: result + path: | + test/results/* diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 00000000..c6c2b793 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,2 @@ +# For CI/CD issues +/.github/ @kazutoiris diff --git a/test/get_filter.ok b/test/get_filter.ok index deaa54f3..b66978cd 100644 --- a/test/get_filter.ok +++ b/test/get_filter.ok @@ -53,4 +53,4 @@ in2 [get_ports -filter direction==output *] out [get_cells -filter {name ~= *r1*} *] -Error: get_filter.tcl line 48, unknown filter operand. +Error 336: get_filter.tcl line 48, unknown filter operand. diff --git a/test/report_json1.ok b/test/report_json1.ok index 7f70fbf7..51e8ae79 100644 --- a/test/report_json1.ok +++ b/test/report_json1.ok @@ -36,7 +36,7 @@ "net": "mid", "arrival": 3.296e-10, "capacitance": 1.949e-15, - "slew": 4.035e-11 + "slew": 3.612e-11 }, { "instance": "_1416_[0]", @@ -45,7 +45,7 @@ "pin": "_1416_[0]/D", "net": "mid", "arrival": 3.296e-10, - "slew": 4.035e-11 + "slew": 3.612e-11 } ], "target_clock": "clk", @@ -72,9 +72,9 @@ ], "data_arrival_time": 3.296e-10, "crpr": 0.000e+00, - "margin": 1.225e-10, - "required_time": 9.877e-09, - "slack": 9.548e-09 + "margin": 1.207e-10, + "required_time": 9.879e-09, + "slack": 9.550e-09 } ] } diff --git a/test/suppress_msg.ok b/test/suppress_msg.ok index 0fd4d548..2673ab25 100644 --- a/test/suppress_msg.ok +++ b/test/suppress_msg.ok @@ -1,12 +1,12 @@ Warning 1: suppress_msg.tcl line 18, cmd warn 1 -caught Error: suppress_msg.tcl line 18, cmd error 1 +caught Error 2: suppress_msg.tcl line 18, cmd error 1 Warning 1: cmd warn 2 -caught Error: 2cmd error 2 +caught Error: 2 cmd error 2 after error caught caught after error Warning 1: suppress_msg.tcl line 51, cmd warn 7 -caught Error: suppress_msg.tcl line 51, cmd error 7 +caught Error 2: suppress_msg.tcl line 51, cmd error 7 Warning 1: cmd warn 8 -caught Error: 2cmd error 8 +caught Error: 2 cmd error 8