Skip to content

Commit

Permalink
ci: extract setup yices
Browse files Browse the repository at this point in the history
  • Loading branch information
ekiwi committed Dec 5, 2024
1 parent 9da68d3 commit d69067e
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 16 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/setup-bitwuzla/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ runs:
key: bitwuzla-${{ runner.os }}-${{ inputs.version }}
path: /tmp/bitwuzla
- name: Install Meson for Bitwuzla
shell: sh
run: sudo apt-get install -y meson
- name: Download and Compile Bitwuzla
if: ${{ steps.cache-bitwuzla.outputs.cache-hit != 'true' }}
shell: sh
run: |
mkdir /tmp/bitwuzla
cd /tmp/bitwuzla
Expand All @@ -28,4 +30,5 @@ runs:
cd build
ninja
- name: Install Bitwuzla
shell: sh
run: cd /tmp/bitwuzla/build && sudo ninja install
28 changes: 28 additions & 0 deletions .github/workflows/setup-yices/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Setup Yices

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

runs:
using: composite
steps:
- name: Cache Yices
id: cache-yices
uses: actions/cache@v3
with:
key: yices-${{ runner.os }}-${{ inputs.version }}
path: /tmp/yices2
- name: Download Yices2
shell: sh
if: ${{ steps.cache-yices.outputs.cache-hit != 'true' }}
run: |
mkdir /tmp/yices2
cd /tmp/yices2
wget -q https://yices.csl.sri.com/releases/${{ inputs.version }}/yices-${{ inputs.version }}-x86_64-pc-linux-gnu-static-gmp.tar.gz -O yices.tar.gz
tar -xf yices.tar.gz
mv yices-*/* .
- name: Add Yices to Path
shell: sh
run: echo "/tmp/yices2/bin" >> "$GITHUB_PATH"
19 changes: 3 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,11 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Cache Yices
id: cache-yices
uses: actions/cache@v3
- name: Set Up Yices
if: ${{ matrix.solver == 'yices2' }}
uses: ./.github/workflows/setup-yices
with:
key: yices-${{ runner.os }}-${{ env.YICES_VERSION }}
path: /tmp/yices2
- name: Download Yices2
if: ${{ matrix.solver == 'yices2' && steps.cache-yices.outputs.cache-hit != 'true' }}
run: |
mkdir /tmp/yices2
cd /tmp/yices2
wget -q https://yices.csl.sri.com/releases/${{ env.YICES_VERSION }}/yices-${{ env.YICES_VERSION }}-x86_64-pc-linux-gnu-static-gmp.tar.gz -O yices.tar.gz
tar -xf yices.tar.gz
mv yices-*/* .
- name: Add Yices to Path
if: ${{ matrix.solver == 'yices2' }}
run: echo "/tmp/yices2/bin" >> "$GITHUB_PATH"
version: ${{ env.YICES_VERSION }}
- name: Set Up Bitwuzla
if: ${{ matrix.solver == 'bitwuzla' }}
uses: ./.github/workflows/setup-bitwuzla
Expand Down

0 comments on commit d69067e

Please sign in to comment.