👷 (CI): Split CI into separate native and JVM workflows
Changes
3 files changed, +78 -75
DELETE
.github/workflows/ci.yml
+0 -75
@@ -1,75 +0,0 @@
1
-name: CI
2
-
3
-on:
4
- push:
5
- branches: [main]
6
- pull_request:
7
-
8
-jobs:
9
- jvm-tests:
10
- runs-on: ubuntu-latest
11
- steps:
12
- - uses: actions/checkout@v4
13
- - uses: actions/setup-java@v4
14
- with:
15
- distribution: temurin
16
- java-version: '21'
17
- cache: maven
18
- - name: Run JVM tests
19
- run: ./mvnw -B test
20
-
21
- jvm-image:
22
- # Publish the JVM container image to GHCR once tests and the native gate pass.
23
- if: github.ref == 'refs/heads/main'
24
- runs-on: ubuntu-latest
25
- needs: native-build-and-smoke
26
- permissions:
27
- contents: read
28
- packages: write
29
- steps:
30
- - uses: actions/checkout@v4
31
- - uses: actions/setup-java@v4
32
- with:
33
- distribution: temurin
34
- java-version: '21'
35
- cache: maven
36
- - name: Build application
37
- run: ./mvnw -B package -DskipTests
38
- - name: Log in to GHCR
39
- uses: docker/login-action@v3
40
- with:
41
- registry: ghcr.io
42
- username: ${{ github.actor }}
43
- password: ${{ secrets.GITHUB_TOKEN }}
44
- - name: Extract image metadata
45
- id: meta
46
- uses: docker/metadata-action@v5
47
- with:
48
- images: ghcr.io/${{ github.repository }}
49
- tags: |
50
- type=sha
51
- type=raw,value=latest
52
- - name: Build and push JVM image
53
- uses: docker/build-push-action@v6
54
- with:
55
- context: .
56
- file: src/main/docker/Dockerfile.jvm
57
- push: true
58
- tags: ${{ steps.meta.outputs.tags }}
59
- labels: ${{ steps.meta.outputs.labels }}
60
-
61
- native-build-and-smoke:
62
- # Native build + native integration tests gate every main-branch build
63
- # so native-image regressions surface at merge time, not release time.
64
- if: github.ref == 'refs/heads/main'
65
- runs-on: ubuntu-latest
66
- needs: jvm-tests
67
- steps:
68
- - uses: actions/checkout@v4
69
- - uses: actions/setup-java@v4
70
- with:
71
- distribution: temurin
72
- java-version: '21'
73
- cache: maven
74
- - name: Native build + integration smoke tests
75
- run: ./mvnw -B verify -Dnative -Dquarkus.native.container-build=true
ADD
.github/workflows/jvm.yml
+59 -0
@@ -0,0 +1,59 @@
1
+name: JVM
2
+
3
+on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+jobs:
9
+ jvm-tests:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - uses: actions/setup-java@v4
14
+ with:
15
+ distribution: temurin
16
+ java-version: '21'
17
+ cache: maven
18
+ - name: Run JVM tests
19
+ run: ./mvnw -B test
20
+
21
+ jvm-image:
22
+ # Build the application and publish the JVM container image to GHCR after tests pass.
23
+ if: github.ref == 'refs/heads/main'
24
+ runs-on: ubuntu-latest
25
+ needs: jvm-tests
26
+ permissions:
27
+ contents: read
28
+ packages: write
29
+ steps:
30
+ - uses: actions/checkout@v4
31
+ - uses: actions/setup-java@v4
32
+ with:
33
+ distribution: temurin
34
+ java-version: '21'
35
+ cache: maven
36
+ - name: Build application
37
+ run: ./mvnw -B package -DskipTests
38
+ - name: Log in to GHCR
39
+ uses: docker/login-action@v3
40
+ with:
41
+ registry: ghcr.io
42
+ username: ${{ github.actor }}
43
+ password: ${{ secrets.GITHUB_TOKEN }}
44
+ - name: Extract image metadata
45
+ id: meta
46
+ uses: docker/metadata-action@v5
47
+ with:
48
+ images: ghcr.io/${{ github.repository }}
49
+ tags: |
50
+ type=sha
51
+ type=raw,value=latest
52
+ - name: Build and push JVM image
53
+ uses: docker/build-push-action@v6
54
+ with:
55
+ context: .
56
+ file: src/main/docker/Dockerfile.jvm
57
+ push: true
58
+ tags: ${{ steps.meta.outputs.tags }}
59
+ labels: ${{ steps.meta.outputs.labels }}
ADD
.github/workflows/native.yml
+19 -0
@@ -0,0 +1,19 @@
1
+name: Native
2
+
3
+on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+jobs:
9
+ native-build:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - uses: actions/setup-java@v4
14
+ with:
15
+ distribution: temurin
16
+ java-version: '21'
17
+ cache: maven
18
+ - name: Native build
19
+ run: ./mvnw -B package -Dnative -DskipTests -Dquarkus.native.container-build=true