Skip to content

Commit

Permalink
ci: extract bitwuzla setup
Browse files Browse the repository at this point in the history
  • Loading branch information
ekiwi committed Dec 5, 2024
1 parent 1d0c76b commit 2b9f41c
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 22 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/setup-bitwuzla/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Setup Bitwuzla

inputs:
version:
description: version to install
required: true

runs:
using: composite
steps:
- name: Cache Bitwuzla
id: cache-bitwuzla
uses: actions/cache@v3
with:
key: bitwuzla-${{ runner.os }}-${{ inputs.version }}
path: /tmp/bitwuzla
- name: Install Meson for Bitwuzla
run: sudo apt-get install -y meson
- name: Download and Compile Bitwuzla
if: ${{ steps.cache-bitwuzla.outputs.cache-hit != 'true' }}
run: |
mkdir /tmp/bitwuzla
cd /tmp/bitwuzla
wget -q https://github.com/bitwuzla/bitwuzla/archive/refs/tags/${{ inputs.version }}.zip -O bitwuzla.zip
unzip -q bitwuzla.zip
mv bitwuzla-*/* .
./configure.py
cd build
ninja
- name: Install Bitwuzla
run: cd /tmp/bitwuzla/build && sudo ninja install
25 changes: 3 additions & 22 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,30 +59,11 @@ jobs:
- name: Add Yices to Path
if: ${{ matrix.solver == 'yices2' }}
run: echo "/tmp/yices2/bin" >> "$GITHUB_PATH"
- name: Cache Bitwuzla
id: cache-bitwuzla
uses: actions/cache@v3
- name: Set Up Bitwuzla
if: ${{ matrix.solver == 'bitwuzla' }}
uses: ./.github/workflows/setup-bitwuzla
with:
key: bitwuzla-${{ runner.os }}-${{ env.BITWUZLA_VERSION }}
path: /tmp/bitwuzla
- name: Install Meson for Bitwuzla
if: ${{ matrix.solver == 'bitwuzla' }}
run: sudo apt-get install -y meson
- name: Download and Compile Bitwuzla
if: ${{ matrix.solver == 'bitwuzla' && steps.cache-bitwuzla.outputs.cache-hit != 'true' }}
run: |
mkdir /tmp/bitwuzla
cd /tmp/bitwuzla
wget -q https://github.com/bitwuzla/bitwuzla/archive/refs/tags/${{ env.BITWUZLA_VERSION }}.zip -O bitwuzla.zip
unzip -q bitwuzla.zip
mv bitwuzla-*/* .
./configure.py
cd build
ninja
- name: Install Bitwuzla
if: ${{ matrix.solver == 'bitwuzla' }}
run: cd /tmp/bitwuzla/build && sudo ninja install
version: ${{ env.BITWUZLA_VERSION }
- name: Install btor sim
run: |
mkdir /tmp/btor
Expand Down

0 comments on commit 2b9f41c

Please sign in to comment.