forked from glowroot/glowroot
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (55 loc) · 1.72 KB
/
reusable-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
name: Reusable - Build
on:
workflow_call:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 8, 11, 17, 20 ]
testGroup: [ 1, 2, 3, 4 ]
testShaded: [ true, false ]
glowrootHarness: [ javaagent, local ]
fail-fast: false
env:
TEST_SHADED: ${{ matrix.testShaded }}
GLOWROOT_HARNESS: ${{ matrix.glowrootHarness }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }} for tests
if: ${{ matrix.java != 8 }}
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: ${{ matrix.java }}
- name: Set up env var for java home for tests
if: ${{ matrix.java != 8 }}
run: |
test_jvm_path_matches=(/opt/hostedtoolcache/Java_Adopt_jdk/${{ matrix.java }}.*/x64/bin/java)
echo "TEST_JVM_PATH=${test_jvm_path_matches[0]}" >> $GITHUB_ENV
cat $GITHUB_ENV
- name: Set up JDK 11 for build
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 11
- name: Restore cache
uses: actions/cache@v4
with:
path: |
~/.m2/repository
~/.cache/bower
key: build-test${{ matrix.testGroup }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
build-
- name: Build
uses: coactions/setup-xvfb@v1
with:
run: .github/scripts/build.sh test${{ matrix.testGroup }}
if: runner.os == 'Linux'
- name: Upload webdriver screenshots
if: failure()
uses: actions/upload-artifact@v3
with:
path: /tmp/glowroot-webdriver-test-*.png
if-no-files-found: ignore