Add set_max_lol
#197
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| # Primary native Linux build used for install artifacts. | |
| linux-ubuntu: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| 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: Upload generated docs | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: generated-docs | |
| path: | | |
| doc/Commands.md | |
| doc/Variables.md | |
| doc/CommandLine.md | |
| doc/Messages.md | |
| if-no-files-found: error | |
| retention-days: 1 | |
| - name: Check command help | |
| run: | | |
| test -s doc/Commands.md | |
| test -s doc/Variables.md | |
| test -s doc/CommandLine.md | |
| test -s doc/Messages.md | |
| ./build/sta -no_splash -no_init -exit etc/CheckCmdHelp.tcl | |
| - name: Test | |
| run: | | |
| cd test | |
| ./regression | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v7 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: artifact-ubuntu | |
| path: | | |
| build/install/* | |
| retention-days: 1 | |
| - name: Upload Test Result | |
| uses: actions/upload-artifact@v7 | |
| if: ${{ !cancelled() }} | |
| with: | |
| 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/* | |
| docs: | |
| needs: linux-ubuntu | |
| if: ${{ !cancelled() && needs.linux-ubuntu.result != 'skipped' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Download generated docs | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: generated-docs | |
| path: doc | |
| - name: Check generated docs | |
| run: | | |
| test -s doc/Commands.md | |
| test -s doc/Variables.md | |
| test -s doc/CommandLine.md | |
| - name: Set up Python | |
| uses: actions/setup-python@v7 | |
| with: | |
| python-version: "3.12" | |
| - name: Install MkDocs | |
| run: pip install -r doc/requirements.txt | |
| - name: Build docs | |
| run: mkdocs build --strict |