forked from Vertispan/j2clmavenplugin
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (67 loc) · 2.42 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Build maven project and run tests. This currently runs on all commits to pull requests and branches, and must not
# use any secrets or attempt to deploy, but only verify the build.
name: Build and test
on: [push, pull_request]
jobs:
os-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Java 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'temurin'
- name: Build and test
run: |
mvn --batch-mode org.apache.maven.plugins:maven-dependency-plugin:3.2.0:go-offline
mvn --batch-mode install '-Dinvoker.timeoutInSeconds=300'
- name: Upload test results for review
uses: actions/upload-artifact@v2
if: always()
with:
name: test-results-${{ matrix.os }}
path: |
j2cl-maven-plugin/target/it-tests/*/build.log
*/target/surefire-reports/
retention-days: 5
maven-version-test:
runs-on: ubuntu-latest
strategy:
matrix:
mvn: ['3.8.6', '3.6.3', '3.5.4', '3.3.9', '3.2.5']
java: ['11']
# include: # Confirm that old java works in the oldest maven, and that newest maven supports 8-current
# #TODO j2clmavenplugin#159 - re-enable this when the integration tests run cleanly in Java 17+
# - mvn: '3.8.6'
# java: '17'
# - mvn: '3.8.6'
# java: '18'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Java ${{ matrix.java }}
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
- name: Set up maven wrapper for specified version
run: |
mvn wrapper:wrapper -Dmaven=${{ matrix.mvn }}
- name: Build and test
run: |
./mvnw --batch-mode org.apache.maven.plugins:maven-dependency-plugin:3.2.0:go-offline
./mvnw --batch-mode install '-Dinvoker.timeoutInSeconds=300'
- name: Upload test results for review
uses: actions/upload-artifact@v2
if: always()
with:
name: test-results-mvn-v${{ matrix.mvn }}-jvm${{ matrix.java }}
path: |
j2cl-maven-plugin/target/it-tests/*/build.log
*/target/surefire-reports/
retention-days: 5