Fixes for tests #138
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
name: 'Run ScalaTest' | |
on: | |
push: | |
branches: | |
- '**' | |
tags-ignore: | |
- dev-prerelease | |
pull_request: | |
branches: | |
- '**' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
Compile: | |
if: (github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout VerCors | |
uses: actions/checkout@v2 | |
- name: Install Java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
- name: Cache dependencies and compilation | |
uses: actions/cache@v3 | |
with: | |
path: out | |
key: vercors-ci-ubuntu-${{ hashFiles('build.sc') }}-${{ hashFiles('src') }} | |
restore-keys: | | |
vercors-ci-ubuntu-${{ hashFiles('build.sc') }} | |
vercors-ci-ubuntu | |
- name: Enable VCLLVM compilation | |
run: touch .include-vcllvm | |
- name: Compile | |
run: ./mill -j 0 vercors.allTests.assembly + vercors.vcllvm.compile | |
- name: Upload VerCors | |
uses: actions/upload-artifact@v3 | |
with: | |
name: allTests | |
path: out/vercors/allTests/assembly.dest/out.jar | |
- name: Upload VCLLVM | |
uses: actions/upload-artifact@v3 | |
with: | |
name: vcllvm | |
path: out/vercors/vcllvm/compile.dest/vcllvm | |
- name: Delete Uncached Files | |
run: | | |
find out -type f -name upstreamAssembly.json -print -exec rm -rf {} + | |
find out -type d -name upstreamAssembly.dest -print -exec rm -rf {} + | |
find out -type f -name assembly.json -print -exec rm -rf {} + | |
find out -type d -name assembly.dest -print -exec rm -rf {} + | |
find out -type d -name "mill-worker-*" -print -exec rm -rf {} + | |
rm -rf out/mill | |
rm -rf out/mill-build/mill | |
rm -rf out/mill-launcher | |
ScalaTestWindowsBasic: | |
needs: "Compile" | |
runs-on: windows-latest | |
steps: | |
- name: Checkout VerCors | |
uses: actions/checkout@v2 | |
- name: Install Java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
- name: Cache LLVM and Clang | |
id: cache-llvm | |
uses: actions/cache@v2 | |
with: | |
path: ${{ runner.temp }}/llvm | |
key: llvm-10.0 | |
- name: Install LLVM and Clang | |
uses: KyleMayes/install-llvm-action@v1 | |
with: | |
version: "10.0" | |
directory: ${{ runner.temp }}/llvm | |
cached: ${{ steps.cache-llvm.outputs.cache-hit }} | |
- name: Download VerCors | |
uses: actions/download-artifact@v3 | |
with: | |
name: allTests | |
path: '.' | |
- name: ls | |
run: ls | |
- name: Run scalatest | |
run: java -Xss64m -cp "out.jar;res/universal/deps;res/universal/res" org.scalatest.tools.Runner -o -u report -s vct.test.integration.examples.BasicExamplesSpec | |
- name: Upload test reports | |
if: success() || failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-report-windows-latest | |
path: 'report/**/TEST-*.xml' | |
ScalaTestMacOsBasic: | |
needs: "Compile" | |
runs-on: macos-latest | |
steps: | |
- name: Checkout VerCors | |
uses: actions/checkout@v2 | |
- name: Install Java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
- name: Install clang | |
run: brew install llvm | |
- name: Download VerCors | |
uses: actions/download-artifact@v3 | |
with: | |
name: allTests | |
path: '.' | |
- name: ls | |
run: ls | |
- name: Run scalatest | |
run: java -Xss64m -cp out.jar:res/universal/deps:res/universal/res org.scalatest.tools.Runner -o -u report -s vct.test.integration.examples.BasicExamplesSpec | |
- name: Upload test reports | |
if: success() || failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-report-macos-latest | |
path: 'report/**/TEST-*.xml' | |
ScalaTest: | |
needs: "Compile" | |
strategy: | |
fail-fast: false | |
matrix: | |
batch: ["-n MATRIX[0]", "-n MATRIX[1]", "-n MATRIX[2]", "-n MATRIX[3]", "-n MATRIX[4]", "-n MATRIX[5]", "-n MATRIX[6]", "-n MATRIX[7]", "-l MATRIX"] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout VerCors | |
uses: actions/checkout@v2 | |
- name: Install Java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
- name: Download VerCors | |
uses: actions/download-artifact@v3 | |
with: | |
name: allTests | |
path: '.' | |
- name: Download VCLLVM | |
uses: actions/download-artifact@v3 | |
with: | |
name: vcllvm | |
path: '.' | |
- name: Make VCLLVM executable | |
run: chmod +x vcllvm | |
- name: ls | |
run: ls -lasFhR | |
- name: Run scalatest | |
run: java -Xss64m -Xmx2G -cp out.jar:res/universal/deps:res/universal/res:. org.scalatest.tools.Runner -R out.jar -o -u report -w vct ${{matrix.batch}} | |
- name: Upload test reports | |
if: success() || failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-report-ubuntu-latest-${{ matrix.batch }} | |
path: 'report/**/TEST-*.xml' | |
GenerateTestReport: | |
runs-on: ubuntu-latest | |
if: ${{ success() || failure() }} | |
needs: [ScalaTest, ScalaTestWindowsBasic, ScalaTestMacOsBasic] | |
steps: | |
- name: Checkout VerCors | |
uses: actions/checkout@v2 | |
- {name: Download Test Report ubuntu-0, uses: actions/download-artifact@v3, with: {name: "test-report-ubuntu-latest--n MATRIX[0]", path: reports/ubuntu-0 }} | |
- {name: Download Test Report ubuntu-1, uses: actions/download-artifact@v3, with: {name: "test-report-ubuntu-latest--n MATRIX[1]", path: reports/ubuntu-1 }} | |
- {name: Download Test Report ubuntu-2, uses: actions/download-artifact@v3, with: {name: "test-report-ubuntu-latest--n MATRIX[2]", path: reports/ubuntu-2 }} | |
- {name: Download Test Report ubuntu-3, uses: actions/download-artifact@v3, with: {name: "test-report-ubuntu-latest--n MATRIX[3]", path: reports/ubuntu-3 }} | |
- {name: Download Test Report ubuntu-4, uses: actions/download-artifact@v3, with: {name: "test-report-ubuntu-latest--n MATRIX[4]", path: reports/ubuntu-4 }} | |
- {name: Download Test Report ubuntu-5, uses: actions/download-artifact@v3, with: {name: "test-report-ubuntu-latest--n MATRIX[5]", path: reports/ubuntu-5 }} | |
- {name: Download Test Report ubuntu-6, uses: actions/download-artifact@v3, with: {name: "test-report-ubuntu-latest--n MATRIX[6]", path: reports/ubuntu-6 }} | |
- {name: Download Test Report ubuntu-7, uses: actions/download-artifact@v3, with: {name: "test-report-ubuntu-latest--n MATRIX[7]", path: reports/ubuntu-7 }} | |
- {name: Download Test Report ubuntu-x, uses: actions/download-artifact@v3, with: {name: "test-report-ubuntu-latest--l MATRIX", path: reports/ubuntu-x }} | |
- { name: Download Test Report windows, uses: actions/download-artifact@v3, with: { name: "test-report-windows-latest", path: reports/windows } } | |
- { name: Download Test Report macos, uses: actions/download-artifact@v3, with: { name: "test-report-macos-latest", path: reports/macos } } | |
- name: Test Report | |
uses: dorny/test-reporter@v1 | |
if: success() || failure() | |
with: | |
name: TestReport # Name of the check run which will be created | |
path: 'reports/**/TEST-*.xml' # Path to test results | |
reporter: java-junit |