-
Notifications
You must be signed in to change notification settings - Fork 39
47 lines (39 loc) · 1.34 KB
/
build.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
# This action builds all keymaerax artifacts.
#
# See also:
# https://www.scala-sbt.org/1.x/docs/GitHub-Actions-with-sbt.html
name: Build
on: [ push ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up java and sbt
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
cache: sbt
- name: Cache JLink.jar
id: cache-jlink-jar
uses: actions/cache@v4
with:
path: JLink.jar
key: jlink-jar-${{ hashFiles('.github/actions/obtain-jlink-jar/**') }}
- name: Obtain JLink.jar
uses: ./.github/actions/obtain-jlink-jar
if: ${{ steps.cache-jlink-jar.outputs.cache-hit != 'true' }}
- name: Prepare local.properties
run: echo "mathematica.jlink.path=JLink.jar" > local.properties
- name: Check formatting
run: sbt --mem 2048 scalafmtCheck Test/scalafmtCheck
- name: Compile
run: sbt --mem 2048 'set ThisBuild/scalacOptions += "-Werror"' compile
- name: Compile tests
run: sbt --mem 2048 'set ThisBuild/scalacOptions += "-Werror"' Test/compile
- name: Build jar files
run: sbt --mem 2048 'set ThisBuild/scalacOptions += "-Werror"' assembly