-
-
Notifications
You must be signed in to change notification settings - Fork 112
87 lines (72 loc) · 2.33 KB
/
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# Github action building the project with different versions of Java and uploading the test coverage to Coveralls.
name: build
on:
push:
branches: [ '*' ]
pull_request:
branches: [ master ]
env:
STOREPASS: password
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: [ 8, 11, 17, 21 ]
steps:
- uses: actions/checkout@v4
- name: Set up Java ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: 'maven'
- name: Set up dependencies
run: sudo apt-get install -y ykcs11 opensc-pkcs11
- name: Compile
run: |
mvn -version
mvn -B clean compile
- name: Tests
run: mvn -B test
- name: Packaging
run: mvn -B package -DskipTests
- name: Archive artifacts
if: ${{ matrix.java == '8' }}
uses: actions/upload-artifact@v4
with:
name: jsign-artifacts
path: |
jsign/target/jsign-*.jar
!jsign/target/jsign-*-javadoc.jar
!jsign/target/jsign-*-sources.jar
!jsign/target/jsign-*_proguard_base.jar
jsign/target/*.deb
jsign/target/*.rpm
jsign-core/target/jsign-core-*.jar
!jsign-core/target/jsign-core-*-javadoc.jar
!jsign-core/target/jsign-core-*-sources.jar
!jsign-core/target/jsign-core-*-tests.jar
jsign-core/target/jsign-crypto-*.jar
!jsign-core/target/jsign-crypto-*-javadoc.jar
!jsign-core/target/jsign-crypto-*-sources.jar
!jsign-core/target/jsign-crypto-*-tests.jar
- name: Coverage report
if: ${{ matrix.java == '17' }}
run: mvn -B clean test jacoco:report-aggregate coveralls:report -DjacocoReports=jsign/target/site/jacoco-aggregate/jacoco.xml -DrepoToken=${{ secrets.COVERALLS_TOKEN }} || true
experimental:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: 'Set up Java EA'
uses: oracle-actions/setup-java@v1
with:
website: jdk.java.net
release: EA
cache: 'maven'
- name: Build
run: |
mvn -version
mvn -B clean package || true