Skip to content

Commit 495e2fd

Browse files
committed
Add support for v3 dep builds
1 parent 883c020 commit 495e2fd

File tree

6 files changed

+99
-6
lines changed

6 files changed

+99
-6
lines changed

.github/workflows/dep_build.yml renamed to .github/workflows/dep_build_v2.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ jobs:
3434
trigger-dep-build:
3535
name: Trigger downstream builds
3636
needs: [build]
37-
uses: ./.github/workflows/trigger_dep_builds.yml
37+
uses: ./.github/workflows/trigger_dep_builds_v2.yml
3838
secrets:
3939
token: ${{ secrets.REPO_DISPATCH }}

.github/workflows/dep_build_v3.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Re-build on jackson-core push
2+
on:
3+
repository_dispatch:
4+
types: [jackson-core-pushed-v3]
5+
# just for testing
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
build:
13+
# Do we want wide matrix build? For now, limited
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
java_version: ['8', '17', '21']
19+
os: ['ubuntu-22.04']
20+
env:
21+
JAVA_OPTS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1"
22+
steps:
23+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
24+
with:
25+
ref: master
26+
- name: Set up JDK
27+
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
28+
with:
29+
distribution: 'temurin'
30+
java-version: ${{ matrix.java_version }}
31+
cache: 'maven'
32+
- name: Build and test
33+
run: ./mvnw -B -ff -ntp verify
34+
35+
# And let's proceed recursively...
36+
trigger-dep-build:
37+
name: Trigger downstream builds
38+
needs: [build]
39+
uses: ./.github/workflows/trigger_dep_builds_v3.yml
40+
secrets:
41+
token: ${{ secrets.REPO_DISPATCH }}

.github/workflows/main.yml

+12-3
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,20 @@ jobs:
7777
file: ./target/site/jacoco/jacoco.xml
7878
flags: unittests
7979

80-
trigger-dep-build:
81-
name: Trigger dep builds
80+
trigger-dep-build-v2:
81+
name: Trigger v2 dep builds
8282
needs: [build]
8383
# Only for pushes to default branch
8484
if: ${{ github.event_name == 'push' && github.ref_name == github.event.repository.default_branch }}
85-
uses: ./.github/workflows/trigger_dep_builds.yml
85+
uses: ./.github/workflows/trigger_dep_builds_v2.yml
86+
secrets:
87+
token: ${{ secrets.REPO_DISPATCH }}
88+
89+
trigger-dep-build-v3:
90+
name: Trigger v3 dep builds
91+
needs: [build]
92+
# Only for pushes to default branch
93+
if: ${{ github.event_name == 'push' && github.ref_name == 'master' }}
94+
uses: ./.github/workflows/trigger_dep_builds_v3.yml
8695
secrets:
8796
token: ${{ secrets.REPO_DISPATCH }}

.github/workflows/trigger_dep_builds.yml renamed to .github/workflows/trigger_dep_builds_v2.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
name: Trigger downstream builds
1+
name: Trigger downstream Jackson 2.x builds
22
on:
33
workflow_call:
44
secrets:
55
token:
66
required: true
77

88
jobs:
9-
trigger-dep-build:
9+
trigger-dep-build-v2:
1010
name: Trigger downstream builds
1111
runs-on: ubuntu-latest
1212

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Trigger downstream Jackson 3.x builds
2+
on:
3+
workflow_call:
4+
secrets:
5+
token:
6+
required: true
7+
8+
jobs:
9+
trigger-dep-build-v3:
10+
name: Trigger downstream builds
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
fail-fast: false
15+
# Won't matter a lot but try to make dispatching non-parallel
16+
max-parallel: 1
17+
matrix:
18+
repo:
19+
- 'FasterXML/jackson-modules-base'
20+
- 'FasterXML/jackson-dataformats-binary'
21+
- 'FasterXML/jackson-dataformats-text'
22+
- 'FasterXML/jackson-dataformat-xml'
23+
- 'FasterXML/jackson-datatypes-collections'
24+
- 'FasterXML/jackson-datatypes-misc'
25+
- 'FasterXML/jackson-module-kotlin'
26+
- 'FasterXML/jackson-module-scala'
27+
- 'FasterXML/jackson-integration-tests'
28+
29+
steps:
30+
- name: Repository dispatch
31+
uses: peter-evans/repository-dispatch@v3
32+
with:
33+
token: ${{ secrets.token }}
34+
repository: ${{ matrix.repo }}
35+
event-type: jackson-databind-pushed-v3
36+
# Could push information on what was built but not yet
37+
client-payload: '{"version": "N/A" }'
38+
- name: Delay between dispatches
39+
run: sleep 10s
40+
shell: bash

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ syntax: glob
2323
*.ipr
2424
*.iws
2525
/target
26+
27+
# Other/local
28+
/gh-workflows

0 commit comments

Comments
 (0)