-
Notifications
You must be signed in to change notification settings - Fork 34
53 lines (43 loc) · 1.26 KB
/
pr-build-check.yaml
File metadata and controls
53 lines (43 loc) · 1.26 KB
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
name: PR build check (Compile against Java 26 using Maven)
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
concurrency:
group: pr-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Java 26 (Oracle)
uses: actions/setup-java@v4
with:
distribution: 'oracle'
java-version: '26'
cache: maven
- name: Maven clean install (compile only)
run: mvn -B -ntp -DskipTests clean install
- name: Test run (fail on runtime exceptions)
id: demo-run
shell: bash
run: |
set -euo pipefail
mkdir -p tmp
export JAVA_TOOL_OPTIONS="-Djava.io.tmpdir=$(pwd)/tmp"
java --enable-preview --add-modules=jdk.incubator.vector \
-jar target/JavaDemos-26.0.jar > run.log 2>&1 || {
echo "Non-zero exit code:"
cat run.log
exit 1
}
- name: Upload run.log on runtime failure
if: steps.demo-run.outcome == 'failure'
uses: actions/upload-artifact@v4
with:
name: run-log
path: run.log