Skip to content

Jesse interface thesis proj #1941

Jesse interface thesis proj

Jesse interface thesis proj #1941

Workflow file for this run

name: Test
on:
push:
branches: [main]
pull_request:
branches: [main]
# running tests can be skipped for docs-only changes
paths: ['src/**', 'basilmill/**', '**.mill', '.?mill*', '*.conf', '.github/workflows/run-examples.yml']
workflow_dispatch:
jobs:
Compile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- uses: coursier/cache-action@v6
with:
extraMillFiles: '**/*.mill'
ignoreJob: true
ignoreMatrix: true
- uses: actions/cache@v4
with:
path: out
key: |
build-${{ runner.os }}-${{ hashFiles('**/*.mill') }}-${{ hashFiles('**/*.scala') }}
restore-keys: |
build-${{ runner.os }}-${{ hashFiles('**/*.mill') }}-
build-${{ runner.os }}-
build-
- run: ./mill -i compile
- run: ./mill -i test.compile
# run to warm up cache for scalafmt
- run: './mill -i semanticDbData + test.semanticDbData + mill.scalalib.scalafmt.ScalafmtModule/scalafmtClasspath + test.fix'
CheckTestTagging:
runs-on: ubuntu-latest
needs: [Compile]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- uses: coursier/cache-action@v6
with:
extraMillFiles: '**/*.mill'
ignoreJob: true
ignoreMatrix: true
- uses: actions/cache@v4
with:
path: out
key: |
build-${{ runner.os }}-${{ hashFiles('**/*.mill') }}-${{ hashFiles('**/*.scala') }}
restore-keys: |
build-${{ runner.os }}-${{ hashFiles('**/*.mill') }}-
build-${{ runner.os }}-
build-
- run: './mill -i test.compile'
- name: Check all test suites have at least one tag
run: .github/workflows/check-test-tagging.sh
# INFO: Scalatest runner arguments (i.e., arguments to scalatest.sh) can be
# found at: https://www.scalatest.org/user_guide/using_the_runner
# useful scalatest arguments
# --------------------------
#
# - to include only a specific tag, use -n.
# - to exclude a specific tag, use -l.
# - these can be combined. for example, to select all StandardSystemTest except Slow ones:
#
# ./scripts/scalatest.sh -o -n test_util.tags.StandardSystemTest -l test_util.tags.Slow
#
# - when passing tags through the command line, the fully-qualified name must be used.
# - to print individual test durations, pass D to -o. for example, -oD.
# - to print a summary of failing tests at the end of the output, pass I to -o.
StandardSystemTests:
runs-on: ubuntu-latest
needs: [Compile]
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- uses: coursier/cache-action@v6
with:
extraMillFiles: '**/*.mill'
ignoreJob: true
ignoreMatrix: true
- uses: actions/cache@v4
with:
path: out
key: |
build-${{ runner.os }}-${{ hashFiles('**/*.mill') }}-${{ hashFiles('**/*.scala') }}
restore-keys: |
build-${{ runner.os }}-${{ hashFiles('**/*.mill') }}-
build-${{ runner.os }}-
build-
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- run: sudo apt-get update
- run: sudo apt-get install -y z3='4.8.12-*'
- run: dotnet tool install --global boogie --version '3.4.3'
- run: ./mill -i test.compile
- run: ./scripts/scalatest.sh -PS3 -oGD -T 1000000 -n test_util.tags.StandardSystemTest
- uses: actions/upload-artifact@v4
with:
name: testresult-${{ github.run_number }}
path: |
src/test/*.csv
src/test/*.svg
- run: |
pushd src/test
tail -n+1 summary-*.csv
pasted="$(paste headers.md.part summary-*.md.part)"
for part in summary-*.md.part; do
# basename, then everything after "summary-", then everything before ".md.part" (via two rev passes)
testname="$(basename $part | cut -d- -f2- | rev | cut -d. -f3- | rev)"
[[ -n "$testname" ]]
svg="verifyTime-$testname.svg"
ls -l "$svg"
# 1920 hours = 80 days
#url="$(curl -F"file=@$svg" -Fexpires=1920 http://0x0.st)"
#[[ -n "$url" ]]
#pasted="$(echo "$pasted" | sed "s#HISTO${testname}HISTO#$url#g")"
done
popd
echo "$pasted" > $GITHUB_STEP_SUMMARY
shell: "bash -xe {0}"
UnitTestsWindows:
runs-on: windows-latest
needs: [Compile]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- uses: coursier/cache-action@v6
with:
extraMillFiles: '**/*.mill'
ignoreJob: true
ignoreMatrix: true
- uses: actions/cache@v4
with:
path: out
key: |
build-${{ runner.os }}-${{ hashFiles('**/*.mill') }}-${{ hashFiles('**/*.scala') }}
restore-keys: |
build-${{ runner.os }}-${{ hashFiles('**/*.mill') }}-
build-${{ runner.os }}-
build-
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- run: choco install z3
- run: dotnet tool install --global boogie --version '3.4.3'
- run: ./mill -i test.compile
# XXX: scalatest.sh doesn't work on windows
- run: ./mill -i test.testForked -oGD -T 1000000 -n test_util.tags.UnitTest
UnitTests:
runs-on: ubuntu-latest
needs: [Compile]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- uses: coursier/cache-action@v6
with:
extraMillFiles: '**/*.mill'
ignoreJob: true
ignoreMatrix: true
- uses: actions/cache@v4
with:
path: out
key: |
build-${{ runner.os }}-${{ hashFiles('**/*.mill') }}-${{ hashFiles('**/*.scala') }}
restore-keys: |
build-${{ runner.os }}-${{ hashFiles('**/*.mill') }}-
build-${{ runner.os }}-
build-
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- run: sudo apt-get update
- run: sudo apt-get install -y z3='4.8.12-*'
- run: dotnet tool install --global boogie --version '3.4.3'
- run: ./mill -i test.compile
- run: ./scripts/scalatest.sh -PS3 -oGD -T 1000000 -n test_util.tags.UnitTest
# every test with package prefix:
# sbt "show test:definedTests"
AnalysisSystemTests:
runs-on: ubuntu-latest
needs: [Compile]
# run 4 AnalysisSystemTests in 4 parallel github jobs.
# the first job captures all AnalysisSystemTest and excludes all tests numbered with a different tag.
strategy:
matrix:
test: [
"AnalysisSystemTest -l test_util.tags.AnalysisSystemTest2 -l test_util.tags.AnalysisSystemTest3 -l test_util.tags.AnalysisSystemTest4",
AnalysisSystemTest2,
AnalysisSystemTest3,
AnalysisSystemTest4,
]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- uses: coursier/cache-action@v6
with:
extraMillFiles: '**/*.mill'
ignoreJob: true
ignoreMatrix: true
- uses: actions/cache@v4
with:
path: out
key: |
build-${{ runner.os }}-${{ hashFiles('**/*.mill') }}-${{ hashFiles('**/*.scala') }}
restore-keys: |
build-${{ runner.os }}-${{ hashFiles('**/*.mill') }}-
build-${{ runner.os }}-
build-
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- run: sudo apt-get update
- run: sudo apt-get install -y z3='4.8.12-*'
- run: dotnet tool install --global boogie --version '3.4.3'
- run: ./mill -i test.compile
- run: "./scripts/scalatest.sh -PS3 -oGD -T 1000000 -n test_util.tags.${{ matrix.test }} -F 2"