-
Notifications
You must be signed in to change notification settings - Fork 1
77 lines (73 loc) · 2.19 KB
/
ci.yaml
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
name: "Blaze-Actor CI"
on: [push, pull_request]
env:
MAVEN_SKIP_RC: true
jobs:
build:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# When GitHub Actions supports it: https://github.com/actions/toolkit/issues/399
# We will use the experimental flag as indicator whether a failure should cause a workflow failure
include:
- jdk: 8
- jdk: 11
- jdk: 15
- jdk: 16
- jdk: 11
build-jdk: 11
- jdk: 15
build-jdk: 15
- jdk: 16
build-jdk: 16
steps:
- uses: actions/checkout@v2
- name: Set up Java 8
uses: AdoptOpenJDK/install-jdk@v1
with:
version: 8
targets: JDK8_HOME;JAVA_HOME
- name: Download Requested JDK
uses: sormuras/download-jdk@1.1
id: jdk
if: ${{ matrix.jdk != 8 }}
with:
feature: ${{ matrix.jdk }}
- name: Set up Requested JDK
uses: actions/setup-java@v1.4.3
if: ${{ matrix.jdk != 8 }}
with:
java-version: ${{ matrix.jdk }}
jdkFile: ${{ env.JDK_FILE }}
- name: Get year/month for cache key
id: get-date
run: |
echo "::set-output name=yearmonth::$(/bin/date -u "+%Y-%m")"
shell: bash
- name: Cache Maven local repository
uses: actions/cache@v2
id: cache-maven
with:
path: |
~/.m2/repository
# refresh cache every month to avoid unlimited growth
key: maven-localrepo-${{ steps.get-date.outputs.yearmonth }}
- name: Set up Maven
run: ./mvnw -v
- name: Run build script
env:
JDK8_HOME: ${{ env.JDK8_HOME }}
JDK: ${{ matrix.jdk }}
BUILD_JDK: ${{ matrix.build-jdk }}
run: ./ci/build-github.sh
shell: bash
- name: Upload test reports (if Maven failed)
uses: actions/upload-artifact@v2
if: failure()
with:
name: test-reports-jdk${{ matrix.jdk }}-build-jdk${{ matrix.build-jdk }}
path: './**/*-reports/'
- name: Omit produced artifacts from build cache
run: ./ci/before-cache.sh