Skip to content

Commit a50fdfb

Browse files
committed
Split fast CI from benchmark workflows
1 parent 6c60fca commit a50fdfb

2 files changed

Lines changed: 82 additions & 7 deletions

File tree

.github/workflows/benchmarks.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Benchmarks
2+
3+
on:
4+
workflow_dispatch:
5+
6+
concurrency:
7+
group: benchmarks-${{ github.ref }}
8+
cancel-in-progress: true
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
golden-benchmark:
15+
name: Golden Dataset Benchmark
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Set up JDK 21
22+
uses: actions/setup-java@v4
23+
with:
24+
java-version: '21'
25+
distribution: 'temurin'
26+
cache: 'maven'
27+
28+
- name: Run benchmark suite
29+
run: mvn -B -ntp -P benchmarks -Dtest=GoldenDatasetBenchmarkTest test --file pom.xml
30+
31+
- name: Upload benchmark reports
32+
if: always()
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: benchmark-reports
36+
path: |
37+
target/surefire-reports
38+
reports

.github/workflows/maven-ci.yml

Lines changed: 44 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,54 @@
1-
# Build and publish to GitHub Packages on push to master
1+
# Fast CI for pushes and pull requests. Heavy regression and benchmarks stay out
2+
# of the default path.
23

3-
name: Maven Package
4+
name: CI
45

56
on:
67
push:
78
branches:
89
- 'master'
10+
pull_request:
11+
workflow_dispatch:
12+
13+
concurrency:
14+
group: ci-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
permissions:
18+
contents: read
919

1020
jobs:
11-
build:
21+
fast-tests:
22+
name: Fast Tests
23+
runs-on: ubuntu-latest
24+
25+
steps:
26+
- uses: actions/checkout@v4
27+
- name: Set up JDK 21
28+
uses: actions/setup-java@v4
29+
with:
30+
java-version: '21'
31+
distribution: 'temurin'
32+
cache: 'maven'
33+
34+
- name: Run fast regression suite
35+
run: mvn -B -ntp clean test --file pom.xml
36+
37+
- name: Upload test reports on failure
38+
if: failure()
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: surefire-reports
42+
path: target/surefire-reports
43+
44+
publish:
45+
name: Publish Package
46+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
47+
needs: fast-tests
1248
runs-on: ubuntu-latest
49+
permissions:
50+
contents: read
51+
packages: write
1352

1453
steps:
1554
- uses: actions/checkout@v4
@@ -18,13 +57,11 @@ jobs:
1857
with:
1958
java-version: '21'
2059
distribution: 'temurin'
60+
cache: 'maven'
2161
server-id: github
2262
settings-path: ${{ github.workspace }}
2363

24-
- name: Build with Maven
25-
run: mvn -B clean package --file pom.xml
26-
2764
- name: Publish to GitHub Packages Apache Maven
28-
run: mvn deploy -Dmaven.test.skip=true -s $GITHUB_WORKSPACE/settings.xml
65+
run: mvn -B -ntp deploy -Dmaven.test.skip=true -s $GITHUB_WORKSPACE/settings.xml
2966
env:
3067
GITHUB_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)