forked from imagej/imagej-launcher
-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (80 loc) · 2.63 KB
/
10_gauntlet_ci.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: JDK Gauntlet CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
run_gauntlet:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v2
- name: Restore JDK Cache
id: restore-jdk-cache
uses: actions/cache@v2
with:
path: ~/.available_jdks
key: ${{ runner.os }}-jdk-cache-v2
- name: Install Prereqs - Windows
if: steps.restore-jdk-cache.outputs.cache-hit != 'true' && runner.os == 'Windows'
run: |
choco install wget
- name: JDK Cache - Download
if: steps.restore-jdk-cache.outputs.cache-hit != 'true'
run: |
mkdir ~/.available_jdks
wget https://downloads.imagej.net/test/gauntlet/${{ runner.os }}.tar.bz2
mv ${{ runner.os }}.tar.bz2 ~/.available_jdks
- name: JDK Cache - Decompress - Mac
if: steps.restore-jdk-cache.outputs.cache-hit != 'true' && runner.os == 'macOS'
run: |
brew install bzip2
cd ~/.available_jdks
/opt/homebrew/opt/bzip2/bin/bunzip2 ${{ runner.os }}.tar.bz2
tar -xf ${{ runner.os }}.tar
- name: JDK Cache - Decompress - Linux
if: steps.restore-jdk-cache.outputs.cache-hit != 'true' && runner.os == 'Linux'
run: |
cd ~/.available_jdks
bunzip2 ${{ runner.os }}.tar.bz2
tar -xf ${{ runner.os }}.tar
- name: JDK Cache - Decompress - Windows
if: steps.restore-jdk-cache.outputs.cache-hit != 'true' && runner.os == 'Windows'
run: |
cd ~/.available_jdks
7z x ${{ runner.os }}.tar.bz2
7z x ${{ runner.os }}.tar
rm ${{ runner.os }}.tar.bz2
- name: JDK Cache - Clean-up
if: steps.restore-jdk-cache.outputs.cache-hit != 'true'
run: |
cd ~/.available_jdks
rm ${{ runner.os }}.tar
- name: Install System JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Restore Maven Cache
uses: actions/cache@v2
with:
path: ~/.m2
key: m2-cache${{ hashFiles('**/pom.xml') }}
restore-keys: m2-cache
- name: Run the Gauntlet
id: run_gauntlet
run: |
bash run-java-gauntlet.sh
echo "::set-output name=FAILED_COUNT::$(find target/gauntlet/ -name FAILED* | wc -l)"
echo "::set-output name=RUN_COUNT::$(ls target/gauntlet/ | wc -l)"
- name: Fail Gauntlet Output
if: steps.run_gauntlet.outputs.FAILED_COUNT > 0
run: |
echo "Gauntlet Failed:"
ls target/gauntlet
cat target/gauntlet/FAILED*
exit 1