-
Notifications
You must be signed in to change notification settings - Fork 0
121 lines (104 loc) · 3.6 KB
/
Copy pathci.yml
File metadata and controls
121 lines (104 loc) · 3.6 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
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
109
110
111
112
113
114
115
116
117
118
119
120
121
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
permissions:
contents: read
jobs:
test:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 25
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '25'
cache: gradle
- name: Grant execute permission for gradlew (Unix)
if: runner.os != 'Windows'
run: chmod +x gradlew
- name: Build and test
run: ./gradlew build --no-daemon --stacktrace
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.os }}
path: '**/build/test-results/**/*.xml'
retention-days: 7
fork-build:
name: OpenJDK fork build (linux-x64)
runs-on: ubuntu-22.04
needs: test
steps:
- name: Checkout fork repo
uses: actions/checkout@v4
with:
path: AprismJDK
- name: Checkout upstream OpenJDK
run: |
git clone --depth 1 --branch jdk-25+10 \
https://github.com/openjdk/jdk.git openjdk-25
- name: Install build deps
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential autoconf zip unzip file \
libx11-dev libxext-dev libxrender-dev libxrandr-dev \
libxtst-dev libxt-dev libcups2-dev libfontconfig1-dev \
libasound2-dev libffi-dev
- name: Set up boot JDK 25
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '25'
- name: Apply patch series + overlay + agent jar
working-directory: openjdk-25
run: |
bash ../AprismJDK/scripts/apply-patches.sh
mkdir -p lib
cd ../AprismJDK
./gradlew :aprismate-agent:embedJar --no-daemon
cp aprismate-agent/build/libs/aprismate.jar ../openjdk-25/lib/
- name: Configure + make images (retry)
working-directory: openjdk-25
run: |
bash configure \
--with-boot-jdk="$(dirname "$(dirname "$(which javac)")")" \
--with-debug-level=release \
--with-jvm-variants=server \
--enable-warnings-as-errors=no \
--disable-javac-server \
--with-vendor-name=AprismLab \
--with-vendor-version-string=AJR \
--with-vendor-url=https://github.com/AprismLab/AprismJDK \
--with-vendor-bug-url=https://github.com/AprismLab/AprismJDK/issues \
--with-vendor-vm-bug-url=https://github.com/AprismLab/AprismJDK/issues \
--with-version-string=25.2.1
for i in 1 2 3; do
make images JOBS=$(nproc) LOG=info && break
echo "retry $i failed; incremental retry"
done
./build/*/images/jdk/bin/java -version
- name: Smoke test fork image
working-directory: openjdk-25
run: |
IMG=$(ls -d build/*/images/jdk)
$IMG/bin/java -XX:+AprismateAgent -version 2>&1 | grep -q "attached via premain" && echo "AGENT_OK"
$IMG/bin/java --list-modules | grep -q jdk.aprismate && echo "MODULE_OK"
- name: Upload fork image summary
uses: actions/upload-artifact@v4
with:
name: fork-build-log
path: openjdk-25/build/*/build.log
retention-days: 7