-
Notifications
You must be signed in to change notification settings - Fork 7
67 lines (60 loc) · 2.53 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: scala-isabelle
on: [push]
jobs:
test-sc-isa:
strategy:
matrix:
isabelle: [2024, 2023, 2022, 2021-1, 2021, 2020, 2019]
os: [linux, windows, macos]
runs-on: [self-hosted, "${{matrix.os}}"]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Running tests (Linux)
if: matrix.os == 'linux'
run: |
export SCALA_ISABELLE_NO_CLEANUP=true
echo /opt/Isabelle${{matrix.isabelle}} >.isabelle-home
sbt '+ testOnly -- -h target/test-reports-html'
- name: Running tests (Windows)
if: matrix.os == 'windows'
run: |
$Env:SCALA_ISABELLE_NO_CLEANUP = "true"
Set-Content -Path .isabelle-home -Value 'c:\Isabelle${{matrix.isabelle}}'
Set-Content -Path .afp-home -Value 'c:\afp-2022'
sbt '+ testOnly -- -h target/test-reports-html'
- name: Running tests (MacOS)
if: matrix.os == 'macos'
run: |
ifconfig # To find out address for SSHing
~/keepawake.sh & # A script to keep the Mac from falling asleep
echo $! >keepawake.pid
export SCALA_ISABELLE_NO_CLEANUP=true
case "${{matrix.isabelle}}" in
2019|2020) echo ~/Isabelle${{matrix.isabelle}}.app/Isabelle >.isabelle-home;;
*) echo ~/Isabelle${{matrix.isabelle}}.app >.isabelle-home;;
esac
echo ~/afp-2022 >.afp-home
# My Mac is very small. So we make sure there is no other parallel GitHub action running before continuing.
while pgrep -l -f sbt-launch.jar; do echo "Another sbt is running. To keep load low, we wait until it finishes."; caffeinate -i -t 300; done
~/keepawake.sh & # Another invocation in case we waited very long
sbt '+ testOnly -- -h target/test-reports-html'
- name: Upload test results
uses: actions/upload-artifact@v3
if: always()
with:
name: test-reports-html-${{matrix.isabelle}}-${{matrix.os}}
path: target/test-reports-html
# - name: Cleanup (MacOS)
# if: matrix.os == 'macos'
# run: |
# kill `cat keepawake.pid` || true
publish-snapshot:
runs-on: [self-hosted, linux]
needs: test-sc-isa
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Publish snapshot
run: sbt "+ publishSigned"