-
Notifications
You must be signed in to change notification settings - Fork 83
47 lines (42 loc) · 1.38 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
name: Build
# Run this workflow every time a new commit pushed to your repository
on: push
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# Build with all versions that can load the nashorn standalone Jar:
java: [ 17, 20 ]
name: Java ${{ matrix.java }} build
steps:
- uses: actions/checkout@v2
- name: Setup java
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Build with Maven
run: mvn -B package --file pom.xml -Drun.jvmArguments="-Xmx4048m -Xms1024m"
- uses: actions/upload-artifact@v4
with:
name: delight-nashorn-sandbox-${{ matrix.java }}
path: target/delight-nashorn-sandbox-*.jar
test:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
# test against latest update of each major Java version, as well as specific updates of LTS versions:
java: [ 17, 20 ]
name: Java ${{ matrix.java }} test
steps:
- uses: actions/[email protected]
with:
name: delight-nashorn-sandbox-${{ matrix.java }}
- name: Display structure of downloaded files
run: ls -R
- name: Clean unnecessary files
run:
rm -rf delight-nashorn-sandbox-*-javadoc.jar
rm -rf delight-nashorn-sandbox-*-sources.jar
# TODO: Validate JAR in some way ...