diff --git a/.github/workflows/bitwuzla-linux.yml b/.github/workflows/bitwuzla-linux.yml new file mode 100644 index 000000000..b4e62c733 --- /dev/null +++ b/.github/workflows/bitwuzla-linux.yml @@ -0,0 +1,62 @@ +on: + workflow_call: + +env: + BITWUZLA_VERSION: 0.6.1 + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Cache Bitwuzla build + id: cache-bitwuzla + uses: actions/cache@v4 + with: + path: bitwuzla/build/install + key: ${{ runner.os }}-bitwuzla-install-${{ env.BITWUZLA_VERSION }} + + - name: Install Packages + if: steps.cache-bitwuzla.outputs.cache-hit != 'true' + run: | + sudo apt-get update + sudo apt-get install -y libgmp-dev ninja-build + + - name: Setup Python Environment + if: steps.cache-bitwuzla.outputs.cache-hit != 'true' + run: | + python3 -m venv ~/.bitwuzla-venv + source ~/.bitwuzla-venv/bin/activate + python3 -m pip install meson pytest cython>=3.* + echo "$HOME/.bitwuzla-venv/bin/" >> $GITHUB_PATH + + - name: Checkout + uses: actions/checkout@v4 + if: steps.cache-bitwuzla.outputs.cache-hit != 'true' + with: + repository: bitwuzla/bitwuzla + ref: ${{ env.BITWUZLA_VERSION }} + path: bitwuzla + submodules: "recursive" + persist-credentials: false + + - name: Wrap + if: steps.cache-bitwuzla.outputs.cache-hit != 'true' + run: meson wrap install gtest + working-directory: bitwuzla + + - name: Configure + if: steps.cache-bitwuzla.outputs.cache-hit != 'true' + run: ./configure.py --prefix=${{ github.workspace }}/bitwuzla/build/install + working-directory: bitwuzla + + - name: Build + if: steps.cache-bitwuzla.outputs.cache-hit != 'true' + run: ninja install + working-directory: bitwuzla/build + + - name: Upload Bitwuzla binary + uses: actions/upload-artifact@v4 + with: + name: bitwuzla-linux + path: bitwuzla/build/install