forked from utwente-fmt/vercors
-
Notifications
You must be signed in to change notification settings - Fork 0
195 lines (181 loc) · 7.33 KB
/
scalatest.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
name: 'Run ScalaTest'
on:
push:
branches:
- '**'
tags-ignore:
- dev-prerelease
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ScalaTestWindowsBasic:
runs-on: windows-latest
steps:
- name: Checkout VerCors
uses: actions/checkout@v2
- name: Install Java
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache SBT and Viper
uses: actions/cache@v3
with:
path: |
~/.cache/coursier
~/AppData/Local/Coursier/Cache
~/Library/Caches/Coursier
~/.ivy2/cache
~/.sbt
key: sbt-viper-windows-latest-${{ hashFiles('project/build.properties') }}-${{ hashFiles('build.sbt') }}
restore-keys: |
sbt-viper-windows-latest-${{ hashFiles('project/build.properties') }}
- name: Set SBT options
run: echo -J-Xmx2G -J-Xss20m > .sbtopts
- name: Compile
run: sbt -v compile
- 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: Run scalatest
run: sbt "testOnly vct.test.integration.examples.BasicExamplesSpec"
- name: Upload test reports
if: success() || failure()
uses: actions/upload-artifact@v3
with:
name: test-report-windows-latest
path: '**/target/test-reports/TEST-*.xml'
ScalaTestMacOsBasic:
runs-on: macos-latest
steps:
- name: Checkout VerCors
uses: actions/checkout@v2
- name: Install Java
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache SBT and Viper
uses: actions/cache@v3
with:
path: |
~/.cache/coursier
~/AppData/Local/Coursier/Cache
~/Library/Caches/Coursier
~/.ivy2/cache
~/.sbt
key: sbt-viper-macos-latest-${{ hashFiles('project/build.properties') }}-${{ hashFiles('build.sbt') }}
restore-keys: |
sbt-viper-macos-latest-${{ hashFiles('project/build.properties') }}
- name: Compile
run: sbt -J-Xmx2G -J-Xss20m compile
- name: Install clang
run: brew install llvm
- name: Run scalatest
run: sbt "testOnly vct.test.integration.examples.BasicExamplesSpec"
- name: Upload test reports
if: success() || failure()
uses: actions/upload-artifact@v3
with:
name: test-report-macos-latest
path: '**/target/test-reports/TEST-*.xml'
Compile:
runs-on: ubuntu-latest
steps:
- name: Checkout VerCors
uses: actions/checkout@v2
- name: Install Java
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache SBT and Viper
uses: actions/cache@v3
with:
path: |
~/.cache/coursier
~/AppData/Local/Coursier/Cache
~/Library/Caches/Coursier
~/.ivy2/cache
~/.sbt
key: sbt-viper-ubuntu-latest-${{ hashFiles('project/build.properties') }}-${{ hashFiles('build.sbt') }}
restore-keys: |
sbt-viper-ubuntu-latest-${{ hashFiles('project/build.properties') }}
- name: Compile
run: sbt -J-Xmx2G -J-Xss20m pushRemoteCache
- name: Upload precompiled repository
uses: actions/upload-artifact@v3
with:
name: precompiled-repository
path: tmp/vercors-build-cache
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: 11
- name: Cache SBT and Viper
uses: actions/cache@v3
with:
path: |
~/.cache/coursier
~/AppData/Local/Coursier/Cache
~/Library/Caches/Coursier
~/.ivy2/cache
~/.sbt
key: sbt-viper-ubuntu-latest-${{ hashFiles('project/build.properties') }}-${{ hashFiles('build.sbt') }}
- name: Download precompiled repository
uses: actions/download-artifact@v3
with:
name: precompiled-repository
path: tmp/vercors-build-cache
- name: Pull cached compilation into sbt
run: sbt -J-Xmx2G -J-Xss20m pullRemoteCache compile
- name: Run scalatest for label ${{matrix.batch}}
run: sbt "testOnly vct.* -- ${{matrix.batch}}"
- name: Upload test reports
if: success() || failure()
uses: actions/upload-artifact@v3
with:
name: test-report-ubuntu-latest-${{ matrix.batch }}
path: '**/target/test-reports/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