Skip to content

Commit d576043

Browse files
author
Vladimir Kotal
authored
Matrix os build (#3341)
1 parent b97d235 commit d576043

File tree

1 file changed

+15
-51
lines changed

1 file changed

+15
-51
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,12 @@ on: [push, pull_request]
44

55
jobs:
66
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]
3813
steps:
3914
- name: Checkout master branch
4015
uses: actions/checkout@v2
@@ -50,34 +25,23 @@ jobs:
5025
restore-keys: ${{ runner.os }}-m2
5126
- name: Install pre-requisites
5227
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'
5332
- name: Before build actions
5433
run: ./dev/before
55-
- name: Build
34+
if: runner.os == 'Linux' || runner.os == 'macOS'
35+
- name: Unix build
5636
env:
5737
OPENGROK_PULL_REQUEST: ${{ github.head_ref }}
5838
OPENGROK_REPO_SLUG: ${{ github.repository }}
5939
OPENGROK_REF: ${{ github.ref }}
6040
OPENGROK_COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
6141
OPENGROK_SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
6242
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
if: runner.os == 'Linux' || runner.os == 'macOS'
6344
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
8346
run: mvn -B -V verify
47+
if: runner.os == 'Windows'

0 commit comments

Comments
 (0)