-
Notifications
You must be signed in to change notification settings - Fork 83
108 lines (89 loc) · 2.9 KB
/
tests.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Tests
on:
push:
paths-ignore:
- publiccode.yml
branches:
- master
- develop
pull_request:
types:
- opened
- reopened
- synchronize
branches:
- master
- develop
env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
java-version: [ 8, 11, 17 ]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: ${{ matrix.java-version }}
- name: Cache Maven Packages
uses: actions/cache@v3
with:
# be careful not to include ~/.m2/settings.xml which contains credentials
path: |
~/.m2/repository
~/.m2/wrapper
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml', '.mvn/*.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Cache Test Artifacts
uses: actions/cache@v3
with:
path: |
.artifacts
key: ${{ runner.os }}-artifacts-${{ hashFiles('**/Artifacts.java') }}
- name: Install ffmpeg on Ubuntu
run: sudo apt-get update && sudo apt-get install -y ffmpeg && ffmpeg -version
if: startsWith(matrix.os, 'ubuntu')
- name: Install ffmpeg on MacOS
run: brew install ffmpeg && ls -lhtr /usr/local/opt/ffmpeg/ && ffmpeg -version
if: startsWith(matrix.os, 'macos')
- name: Install ffmpeg on Windows
run: choco install ffmpeg && ffmpeg -version
if: startsWith(matrix.os, 'windows')
- name: Build on Ubuntu
run: bash mvnw clean package -B
if: startsWith(matrix.os, 'ubuntu')
- name: Build on MacOS
run: bash mvnw clean package -B
if: startsWith(matrix.os, 'macos')
- name: Build on Windows
run: ./mvnw clean package -B
if: startsWith(matrix.os, 'windows')
test-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: 11
- name: Set up RANDOM GPG key
run: gpg --quick-generate-key --batch --passphrase '' test42
- uses: actions/cache@v3
with:
# be careful not to include ~/.m2/settings.xml which contains credentials
path: |
~/.m2/repository
~/.m2/wrapper
key: release-m2-${{ hashFiles('**/pom.xml', '.mvn/*.xml') }}
restore-keys: |
release-m2
${{ runner.os }}-m2
- name: Test release
run: bash mvnw clean install -B -DskipTests -PJ9-module -Prelease