Skip to content

Commit 4e6874b

Browse files
committed
ci: Make scala 2.12 build on Java 11 and 2.11 on 8
1 parent e951424 commit 4e6874b

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Java CI
1+
name: Build and test
22

33
on:
44
push:
@@ -7,22 +7,41 @@ on:
77
branches: [main]
88

99
jobs:
10-
build:
10+
build-scala-12:
1111
runs-on: ubuntu-latest
1212

1313
steps:
1414
- uses: actions/checkout@v2
15-
- name: Set up JDK 1.8
15+
- name: Set up JDK 11
1616
uses: actions/setup-java@v1
1717
with:
18-
java-version: 1.8
18+
distributions: adopt
19+
java-version: 11
20+
check-latest: true
1921
- name: Cache Maven packages
2022
uses: actions/cache@v2
2123
with:
2224
path: ~/.m2
2325
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
2426
restore-keys: ${{ runner.os }}-m2
2527
- name: Build with Maven
26-
run: mvn -B package --file pom.xml
28+
run: ./mvnw -B package --file pom.xml -Pscala-2.12
29+
build-scala-11:
30+
runs-on: ubuntu-latest
31+
32+
steps:
33+
- uses: actions/checkout@v2
34+
- name: Set up JDK 8
35+
uses: actions/setup-java@v1
36+
with:
37+
java-version: 8
38+
- name: Cache Maven packages
39+
uses: actions/cache@v2
40+
with:
41+
path: ~/.m2
42+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
43+
restore-keys: ${{ runner.os }}-m2
44+
- name: Build with Maven
45+
run: ./mvnw -B package --file pom.xml -Pscala-2.11
2746

2847
# vim: ts=2:sts=2:sw=2:expandtab

0 commit comments

Comments
 (0)