Repository navigation
132 lines (112 loc) · 4.71 KB
/
Copy pathci.yml
File metadata and controls
132 lines (112 loc) · 4.71 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
122
123
124
125
126
127
128
129
130
131
132
name: CI Build
on:
push:
branches: [main]
paths-ignore:
- 'docs/**'
- '*.md'
pull_request:
branches: [main]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Set up JDK 17
uses: actions/setup-java@cf277c60eb25467037889841efdb72551f06f6c3 # v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Cache the Maven distribution the wrapper uses
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.m2/wrapper
key: maven-wrapper-${{ hashFiles('.mvn/wrapper/maven-wrapper.properties') }}
- name: Build with Maven
run: ./mvnw clean verify -B
- name: Upload test results
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: test-results
path: '**/target/surefire-reports/'
retention-days: 7
# The SDK targets and releases on Java 17, but Error Prone (which runs NullAway) needs
# JDK 21. The parent pom's errorprone profile activates on JDK 21+, so this job is the one
# that enforces Error Prone's bug checks and the @NullMarked packages at ERROR.
errorprone:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Set up JDK 21
uses: actions/setup-java@cf277c60eb25467037889841efdb72551f06f6c3 # v4
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Cache the Maven distribution the wrapper uses
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.m2/wrapper
key: maven-wrapper-${{ hashFiles('.mvn/wrapper/maven-wrapper.properties') }}
- name: Build with Maven (Error Prone and NullAway enforced)
run: ./mvnw -B clean verify
# Issue #14 only reproduced when the JVM was starved of cores: the agent's lock release
# and the client's next prompt race on one CPU. Pin the contention tests to one core so
# the window stays open in CI.
contention:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Set up JDK 17
uses: actions/setup-java@cf277c60eb25467037889841efdb72551f06f6c3 # v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Cache the Maven distribution the wrapper uses
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.m2/wrapper
key: maven-wrapper-${{ hashFiles('.mvn/wrapper/maven-wrapper.properties') }}
- name: Contention tests pinned to one CPU
run: taskset -c 0 ./mvnw -B -pl acp-core -am test -Dtest='MultiPromptSyncSessionTest,AcpAgentSessionPromptLockTest' -Dsurefire.failIfNoSpecifiedTests=false
# Lincheck model checks the SDK's concurrent state (the *LincheckTest classes): every
# interleaving of seeded, bounded scenarios against a sequential specification. The build
# runs them with a small budget; this job explores ten times as many scenarios. Scenarios and
# interleavings come from a fixed seed, so a failure reproduces locally with the same
# -Dlincheck.scale.
lincheck:
runs-on: ubuntu-latest
# One job per module: at scale 10 the acp-core models alone take about 17 minutes.
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
module: [acp-core, acp-http-core]
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Set up JDK 17
uses: actions/setup-java@cf277c60eb25467037889841efdb72551f06f6c3 # v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Cache the Maven distribution the wrapper uses
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.m2/wrapper
key: maven-wrapper-${{ hashFiles('.mvn/wrapper/maven-wrapper.properties') }}
# Install first rather than -am: a -Dtest filter would also reach the JSON modules,
# which scan acp-core's test-jar for their contract tests.
- name: Install the modules under test
run: ./mvnw -B -q install -DskipTests -Dpmd.skip -Dcpd.skip
- name: Lincheck model checking, extended budget
run: ./mvnw -B -pl ${{ matrix.module }} test -Dtest='*LincheckTest' -Dlincheck.scale=10