Skip to content

Commit cd00728

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

File tree

2 files changed

+34
-4
lines changed

2 files changed

+34
-4
lines changed

.github/workflows/build.yml renamed to .github/workflows/build11.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Java CI
1+
name: Build with Scala 2.11
22

33
on:
44
push:
@@ -12,17 +12,17 @@ jobs:
1212

1313
steps:
1414
- uses: actions/checkout@v2
15-
- name: Set up JDK 1.8
15+
- name: Set up JDK 8
1616
uses: actions/setup-java@v1
1717
with:
18-
java-version: 1.8
18+
java-version: 8
1919
- name: Cache Maven packages
2020
uses: actions/cache@v2
2121
with:
2222
path: ~/.m2
2323
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
2424
restore-keys: ${{ runner.os }}-m2
2525
- name: Build with Maven
26-
run: mvn -B package --file pom.xml
26+
run: ./mvnw -B package --file pom.xml -Pscala-2.11
2727

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

.github/workflows/build12.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build with Scala 2.12
2+
3+
on:
4+
push:
5+
branches: '*'
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up JDK 11
16+
uses: actions/setup-java@v1
17+
with:
18+
distributions: adopt
19+
java-version: 11
20+
check-latest: true
21+
- name: Cache Maven packages
22+
uses: actions/cache@v2
23+
with:
24+
path: ~/.m2
25+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
26+
restore-keys: ${{ runner.os }}-m2
27+
- name: Build with Maven
28+
run: ./mvnw -B package --file pom.xml -Pscala-2.12
29+
30+
# vim: ts=2:sts=2:sw=2:expandtab

0 commit comments

Comments
 (0)