Skip to content

Commit

Permalink
Merge pull request #1395 from GaloisInc/at-solver-dist
Browse files Browse the repository at this point in the history
Add build artifact including solvers
  • Loading branch information
mergify[bot] authored Oct 6, 2021
2 parents 46db1b4 + 23d44f0 commit c84fad8
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 9 deletions.
13 changes: 12 additions & 1 deletion .github/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ build() {
}

install_system_deps() {
(cd $BIN && curl -o bins.zip -sL "https://github.com/GaloisInc/what4-solvers/releases/download/$SOLVER_PKG_VERSION/$BIN_ZIP_FILE" && unzip -o bins.zip && rm bins.zip)
(cd $BIN && curl -o bins.zip -sL "https://github.com/GaloisInc/what4-solvers/releases/download/$SOLVER_PKG_VERSION/$BUILD_TARGET_OS-bin.zip" && unzip -o bins.zip && rm bins.zip)
chmod +x $BIN/*
cp $BIN/yices_smt2$EXT $BIN/yices-smt2$EXT
export PATH="$BIN:$PATH"
Expand Down Expand Up @@ -117,6 +117,17 @@ zip_dist() {
tar -czf "$name".tar.gz "$name"
}

zip_dist_with_solvers() {
sname="${1}"
cp "$BIN/abc" dist/bin/
cp "$BIN/cvc4" dist/bin/
cp "$BIN/yices" dist/bin/
cp "$BIN/yices-smt2" dist/bin/
cp "$BIN/z3" dist/bin/
cp -r dist "$sname"
tar -cvzf "$sname".tar.gz "$sname"
}

output() { echo "::set-output name=$1::$2"; }
ver() { grep Version saw-script.cabal | awk '{print $2}'; }
set_version() { output saw-version "$(ver)"; }
Expand Down
39 changes: 31 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, macos-latest, windows-latest]
os: [ubuntu-18.04, macos-10.15, windows-latest]
ghc: ["8.8.4", "8.10.3"]
exclude:
- os: windows-latest
Expand All @@ -84,6 +84,11 @@ jobs:
with:
ghc-version: ${{ matrix.ghc }}

- shell: bash
run: .github/ci.sh install_system_deps
env:
BUILD_TARGET_OS: ${{ matrix.os }}

- uses: actions/cache@v2
name: Cache cabal store
with:
Expand Down Expand Up @@ -129,13 +134,23 @@ jobs:
- shell: bash
run: .github/ci.sh zip_dist $NAME

- shell: bash
run: .github/ci.sh zip_dist_with_solvers $NAME-with-solvers

- if: matrix.ghc == '8.10.3' && needs.config.outputs.release == 'true'
shell: bash
env:
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
run: .github/ci.sh sign $NAME.tar.gz

- if: matrix.ghc == '8.10.3' && needs.config.outputs.release == 'true'
shell: bash
env:
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
run: .github/ci.sh sign $NAME-with-solvers.tar.gz

- if: matrix.ghc == '8.10.3'
uses: actions/upload-artifact@v2
with:
Expand All @@ -144,6 +159,14 @@ jobs:
if-no-files-found: error
retention-days: ${{ needs.config.outputs.retention-days }}

- if: matrix.ghc == '8.10.3'
uses: actions/upload-artifact@v2
with:
name: ${{ steps.config.outputs.name }} (GHC ${{ matrix.ghc }})
path: "${{ steps.config.outputs.name }}-with-solvers.tar.gz*"
if-no-files-found: error
retention-days: ${{ needs.config.outputs.retention-days }}

- if: "matrix.ghc == '8.10.3'"
uses: actions/upload-artifact@v2
with:
Expand All @@ -161,7 +184,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-10.15]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand All @@ -171,7 +194,7 @@ jobs:
- shell: bash
run: .github/ci.sh install_system_deps
env:
BIN_ZIP_FILE: ${{ matrix.os }}-bin.zip
BUILD_TARGET_OS: ${{ matrix.os }}

- uses: actions/download-artifact@v2
with:
Expand Down Expand Up @@ -213,7 +236,7 @@ jobs:
- test: saw-remote-api/scripts/run_rpc_tests.sh
os: ubuntu-18.04
- test: saw-remote-api/scripts/run_rpc_tests.sh
os: macos-latest
os: macos-10.15
- test: saw-remote-api/scripts/check_docs.sh
os: ubuntu-18.04
steps:
Expand All @@ -224,7 +247,7 @@ jobs:
- shell: bash
run: .github/ci.sh install_system_deps
env:
BIN_ZIP_FILE: ${{ matrix.os }}-bin.zip
BUILD_TARGET_OS: ${{ matrix.os }}

- uses: actions/download-artifact@v2
with:
Expand Down Expand Up @@ -263,15 +286,15 @@ jobs:
continue-on-error: [false]
include:
- suite: integration_tests
os: macos-latest
os: macos-10.15
continue-on-error: true # https://github.com/GaloisInc/saw-script/issues/1135
- suite: integration_tests
os: windows-latest
timeout-minutes: 60
continue-on-error: true # https://github.com/GaloisInc/saw-script/issues/1135
exclude:
- suite: integration_tests
os: macos-latest
os: macos-10.15
continue-on-error: false
- suite: integration_tests
os: windows-latest
Expand All @@ -284,7 +307,7 @@ jobs:
- shell: bash
run: .github/ci.sh install_system_deps
env:
BIN_ZIP_FILE: ${{ matrix.os }}-bin.zip
BUILD_TARGET_OS: ${{ matrix.os }}

- uses: actions/download-artifact@v2
with:
Expand Down

0 comments on commit c84fad8

Please sign in to comment.