-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add nightly scheduled build of saw-script (#889)
* Add nightly scheduled build of saw-script * Build cryptol correctly * Don't mask build failures * Continue on error for all tests for now * Use release file structure for nightlies * Remove docker layer caching
- Loading branch information
Jared Weakly
authored
Nov 24, 2020
1 parent
d521320
commit 27d6f2d
Showing
4 changed files
with
130 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,14 +35,17 @@ jobs: | |
matrix: | ||
os: [ubuntu-latest] | ||
ghc: ["8.6.5", "8.8.4"] | ||
continue-on-error: [false] | ||
continue-on-error: [true] | ||
include: | ||
- os: macos-latest | ||
ghc: "8.6.5" | ||
continue-on-error: true | ||
- os: macos-latest | ||
ghc: "8.8.4" | ||
continue-on-error: true | ||
- os: windows-latest | ||
ghc: "8.8.4" | ||
continue-on-error: true | ||
- os: windows-latest | ||
ghc: "8.6.5" | ||
continue-on-error: true | ||
|
@@ -58,7 +61,7 @@ jobs: | |
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
python-version: "3.x" | ||
|
||
- shell: bash | ||
run: pip3 install virtualenv | ||
|
@@ -74,16 +77,17 @@ jobs: | |
path: | | ||
${{ steps.setup-haskell.outputs.cabal-store }} | ||
dist-newstyle | ||
key: cabal-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('**/cabal.GHC-*') }}-${{ github.sha }} | ||
key: cabal-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc)) }}-${{ github.sha }} | ||
restore-keys: | | ||
cabal-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('**/cabal.GHC-*') }}- | ||
cabal-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc)) }}- | ||
- shell: bash | ||
run: .github/ci.sh build_abc | ||
if: runner.os != 'Windows' | ||
|
||
- shell: bash | ||
run: .github/ci.sh build | ||
continue-on-error: false | ||
|
||
- shell: bash | ||
run: .github/ci.sh install_system_deps | ||
|
@@ -96,8 +100,8 @@ jobs: | |
run: .github/ci.sh setup_dist_bins | ||
|
||
- shell: bash | ||
# TODO: change this once we can get these tests working in CI | ||
continue-on-error: true | ||
id: cabal-test | ||
continue-on-error: ${{ matrix.continue-on-error }} | ||
run: cabal v2-test saw-remote-api | ||
env: | ||
SAW_SERVER: ${GITHUB_WORKSPACE}/dist/bin/saw-remote-api | ||
|
@@ -119,8 +123,7 @@ jobs: | |
env.RELEASE && matrix.ghc == '8.8.4' | ||
run: | | ||
.github/ci.sh build_cryptol | ||
exe="$(cd deps/cryptol && cabal exec which cryptol)" | ||
cp "$exe" "dist/bin" | ||
.github/ci.sh extract_exe "cryptol" "dist/bin" "deps/cryptol/dist-newstyle" | ||
- if: >- | ||
env.RELEASE && matrix.ghc == '8.8.4' | ||
|
@@ -137,7 +140,7 @@ jobs: | |
path: "dist/bin/saw" | ||
|
||
- shell: bash | ||
if: "steps.test.outcome == 'failure'" | ||
if: "steps.test.outcome == 'failure' || steps.cabal-test.outcome == 'failure'" | ||
name: Warn if tests failed | ||
run: echo "::error ::Test Suite Failed. Pipeline allowed to pass until tests are reliable." | ||
|
||
|
@@ -150,8 +153,6 @@ jobs: | |
- run: | | ||
git submodule update --init | ||
git -C deps/abcBridge submodule update --init | ||
- uses: satackey/[email protected] | ||
continue-on-error: true | ||
- name: Publish to Registry | ||
uses: docker/build-push-action@v1 | ||
with: | ||
|
@@ -226,7 +227,6 @@ jobs: | |
run: .github/ci.sh bundle_files | ||
|
||
- shell: bash | ||
continue-on-error: true # temporary to test release without setting up secrets | ||
env: | ||
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }} | ||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
name: Nightly Builds | ||
on: | ||
push: | ||
branches: ["actions/**"] | ||
schedule: | ||
- cron: "0 0 * * *" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
outputs: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
saw-version: ${{ steps.saw.outputs.saw-version }} | ||
name: ${{ steps.saw.outputs.name }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- id: saw | ||
run: | | ||
.github/ci.sh set_version | ||
.github/ci.sh output name saw-$(.github/ci.sh ver)-$(date -I) | ||
docker: | ||
runs-on: ubuntu-latest | ||
needs: [outputs] | ||
continue-on-error: true | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- run: git -C deps/abcBridge submodule update --init | ||
- name: Publish to Registry | ||
uses: docker/build-push-action@v1 | ||
with: | ||
username: ${{ secrets.GITHUBSAW_USERNAME }} | ||
password: ${{ secrets.GITHUBSAW }} | ||
repository: galoisinc/saw | ||
tags: "nightly" | ||
add_git_labels: true | ||
push: ${{ github.event_name == 'schedule' }} | ||
|
||
build: | ||
needs: [outputs] | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
VERSION: ${{ needs.outputs.outputs.saw-version }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
ghc: [8.8.4] | ||
continue-on-error: true | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- run: git -C deps/abcBridge submodule update --init | ||
|
||
- uses: actions/setup-haskell@v1 | ||
id: setup-haskell | ||
with: | ||
ghc-version: ${{ matrix.ghc }} | ||
|
||
- uses: actions/cache@v2 | ||
name: Cache cabal store | ||
with: | ||
path: | | ||
${{ steps.setup-haskell.outputs.cabal-store }} | ||
dist-newstyle | ||
key: cabal-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc)) }}-${{ github.sha }} | ||
restore-keys: | | ||
cabal-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc)) }}- | ||
- shell: bash | ||
run: .github/ci.sh build_abc | ||
if: runner.os != 'Windows' | ||
|
||
- shell: bash | ||
run: .github/ci.sh build | ||
|
||
- shell: bash | ||
run: .github/ci.sh setup_dist_bins | ||
|
||
- shell: bash | ||
run: | | ||
.github/ci.sh build_cryptol | ||
.github/ci.sh extract_exe "cryptol" "dist/bin" "deps/cryptol/dist-newstyle" | ||
- shell: bash | ||
run: .github/ci.sh bundle_files | ||
|
||
- shell: bash | ||
env: | ||
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }} | ||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | ||
name: ${{ needs.outputs.outputs.name }}-${{ runner.os }}-x86_64 | ||
run: .github/ci.sh zip_dist | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ needs.outputs.outputs.name }}-${{ runner.os }}-x86_64 | ||
path: "${{ needs.outputs.outputs.name }}-${{ runner.os }}-x86_64.tar.gz*" |
This file contains 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