@@ -4,37 +4,12 @@ on: [push, pull_request]
4
4
5
5
jobs :
6
6
ubuntu :
7
- name : Ubuntu with Java 11
8
- runs-on : ubuntu-latest
9
- steps :
10
- - name : Checkout master branch
11
- uses : actions/checkout@v2
12
- - name : Set up JDK 11
13
- uses : actions/setup-java@v1
14
- with :
15
- java-version : 11
16
- - name : Cache Maven packages
17
- uses : actions/cache@v2
18
- with :
19
- path : ~/.m2
20
- key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
21
- restore-keys : ${{ runner.os }}-m2
22
- - name : Install pre-requisites
23
- run : ./dev/before_install
24
- - name : Before build actions
25
- run : ./dev/before
26
- - name : Build
27
- env :
28
- OPENGROK_PULL_REQUEST : ${{ github.head_ref }}
29
- OPENGROK_REPO_SLUG : ${{ github.repository }}
30
- OPENGROK_REF : ${{ github.ref }}
31
- OPENGROK_COVERALLS_TOKEN : ${{ secrets.COVERALLS_TOKEN }}
32
- OPENGROK_SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
33
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34
- run : ./dev/main
35
- macos :
36
- name : macOS with Java 11
37
- runs-on : macos-latest
7
+ name : ${{ matrix.os }} with Java 11
8
+ runs-on : ${{ matrix.os }}
9
+ strategy :
10
+ fail-fast : false
11
+ matrix :
12
+ os : [ubuntu-latest, macos-latest, windows-latest]
38
13
steps :
39
14
- name : Checkout master branch
40
15
uses : actions/checkout@v2
@@ -50,34 +25,23 @@ jobs:
50
25
restore-keys : ${{ runner.os }}-m2
51
26
- name : Install pre-requisites
52
27
run : ./dev/before_install
28
+ if : runner.os == 'Linux' || runner.os == 'macOS'
29
+ - name : Install Universal ctags (Windows)
30
+ run : choco install universal-ctags
31
+ if : runner.os == 'Windows'
53
32
- name : Before build actions
54
33
run : ./dev/before
55
- - name : Build
34
+ if : runner.os == 'Linux' || runner.os == 'macOS'
35
+ - name : Unix build
56
36
env :
57
37
OPENGROK_PULL_REQUEST : ${{ github.head_ref }}
58
38
OPENGROK_REPO_SLUG : ${{ github.repository }}
59
39
OPENGROK_REF : ${{ github.ref }}
60
40
OPENGROK_COVERALLS_TOKEN : ${{ secrets.COVERALLS_TOKEN }}
61
41
OPENGROK_SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
62
42
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
43
+ if : runner.os == 'Linux' || runner.os == 'macOS'
63
44
run : ./dev/main
64
- windows :
65
- name : Windows with Java 11
66
- runs-on : windows-latest
67
- steps :
68
- - name : Checkout master branch
69
- uses : actions/checkout@v2
70
- - name : Set up JDK 11
71
- uses : actions/setup-java@v1
72
- with :
73
- java-version : 11
74
- - name : Cache Maven packages
75
- uses : actions/cache@v2
76
- with :
77
- path : ~/.m2
78
- key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
79
- restore-keys : ${{ runner.os }}-m2
80
- - name : Install Universal ctags
81
- run : choco install universal-ctags
82
- - name : Build
45
+ - name : Windows build
83
46
run : mvn -B -V verify
47
+ if : runner.os == 'Windows'
0 commit comments