From 8a1eda7f77e7bf381abf7d2d33718a8b5780f71a Mon Sep 17 00:00:00 2001 From: Lisanna Dettwyler Date: Tue, 16 Mar 2021 22:30:49 -0700 Subject: [PATCH] integrate changes from #796 --- .github/ci.sh | 4 -- .github/workflows/build.yml | 98 +++++++++++++++++-------------------- 2 files changed, 46 insertions(+), 56 deletions(-) diff --git a/.github/ci.sh b/.github/ci.sh index 2b865a8cc3..099380f318 100755 --- a/.github/ci.sh +++ b/.github/ci.sh @@ -162,10 +162,6 @@ install_system_deps() { is_exe "$BIN" z3 && is_exe "$BIN" cvc4 && is_exe "$BIN" yices && is_exe "$BIN" yasm } -test_dist() { - VERBOSE=y cabal v2-test integration_tests -} - build_cryptol() { is_exe "dist/bin" "cryptol" && return (cd deps/cryptol && diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3af5643a75..80d1a39528 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -105,7 +105,9 @@ jobs: # uses: GaloisInc/.github/actions/cabal-collect-bins@master id: cabal-test-suites with: - targets: cryptol-saw-core-tc-test + targets: | + integration_tests + cryptol-saw-core-tc-test dest: cabal-test-suites-bins - name: "Upload Artifact: bin/abc" @@ -147,55 +149,6 @@ jobs: name: "saw-${{ runner.os }}-${{ matrix.ghc }}" path: "dist/bin/saw" - integration-tests: - runs-on: ${{ matrix.os }} - needs: [build] - continue-on-error: ${{ matrix.continue-on-error }} - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-18.04 - continue-on-error: false - - os: macos-latest - continue-on-error: true - - os: windows-latest - continue-on-error: true - steps: - - uses: actions/checkout@v2 - with: - submodules: true - - - shell: bash - run: .github/ci.sh install_system_deps - - - name: "Download Artifact: dist/bin" - uses: actions/download-artifact@v2 - with: - name: "${{ runner.os }}-bins" - path: dist/bin - - - name: "Download Artifact: bin/abc" - if: "runner.os != 'Windows'" - uses: actions/download-artifact@v2 - with: - path: bin - name: abc-${{ runner.os }} - - - uses: actions/setup-java@v1 - with: - java-version: "8" - java-package: jdk - architecture: x64 - - - name: Integration Tests - id: test - shell: bash - run: | - chmod +x bin/* dist/bin/* - export PATH="$PWD/bin:$PWD/dist/bin:$PATH" - .github/ci.sh test_dist - saw-remote-api-tests: runs-on: ${{ matrix.os }} needs: [build] @@ -246,6 +199,21 @@ jobs: matrix: suite: ${{ fromJson(needs.build.outputs.cabal-test-suites-json) }} os: [ubuntu-18.04] + continue-on-error: [false] + include: + - suite: integration_tests + os: macos-latest + continue-on-error: true + - suite: integration_tests + os: windows-latest + continue-on-error: true + exclude: + - suite: integration_tests + os: macos-latest + continue-on-error: false + - suite: integration_tests + os: windows-latest + continue-on-error: false steps: - uses: actions/checkout@v2 @@ -258,17 +226,43 @@ jobs: name: "${{ runner.os }}-bins" path: dist/bin + - shell: bash + if: "runner.os != 'Windows'" + run: chmod +x dist/bin/* + + - name: "Download Artifact: bin/abc" + if: | + runner.os != 'Windows' && + matrix.suite == 'integration_tests' + uses: actions/download-artifact@v2 + with: + path: bin + name: abc-${{ runner.os }} + + - shell: bash + if: | + runner.os != 'Windows' && + matrix.suite == 'integration_tests' + run: chmod +x dist/bin/* + - name: "Download Artifact: cabal-test-suites-bins" uses: actions/download-artifact@v2 with: name: cabal-test-suites-bins-${{ matrix.os }} path: cabal-test-suites-bins + - uses: actions/setup-java@v1 + if: "matrix.suite == 'integration_tests'" + with: + java-version: "8" + java-package: jdk + architecture: x64 + - name: ${{ matrix.suite }} id: run-suite + shell: bash run: | - chmod +x dist/bin/* cabal-test-suites-bins/* - export PATH="$PWD/dist/bin:$PATH" + export PATH="$PWD/bin:$PWD/dist/bin:$PATH" cabal-test-suites-bins/${{ matrix.suite }} docker: