Skip to content

Commit

Permalink
Add support for v3 dep builds
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jun 13, 2024
1 parent 883c020 commit 495e2fd
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ jobs:
trigger-dep-build:
name: Trigger downstream builds
needs: [build]
uses: ./.github/workflows/trigger_dep_builds.yml
uses: ./.github/workflows/trigger_dep_builds_v2.yml
secrets:
token: ${{ secrets.REPO_DISPATCH }}
41 changes: 41 additions & 0 deletions .github/workflows/dep_build_v3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Re-build on jackson-core push
on:
repository_dispatch:
types: [jackson-core-pushed-v3]
# just for testing
workflow_dispatch:

permissions:
contents: read

jobs:
build:
# Do we want wide matrix build? For now, limited
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
java_version: ['8', '17', '21']
os: ['ubuntu-22.04']
env:
JAVA_OPTS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1"
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
ref: master
- name: Set up JDK
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
distribution: 'temurin'
java-version: ${{ matrix.java_version }}
cache: 'maven'
- name: Build and test
run: ./mvnw -B -ff -ntp verify

# And let's proceed recursively...
trigger-dep-build:
name: Trigger downstream builds
needs: [build]
uses: ./.github/workflows/trigger_dep_builds_v3.yml
secrets:
token: ${{ secrets.REPO_DISPATCH }}
15 changes: 12 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,20 @@ jobs:
file: ./target/site/jacoco/jacoco.xml
flags: unittests

trigger-dep-build:
name: Trigger dep builds
trigger-dep-build-v2:
name: Trigger v2 dep builds
needs: [build]
# Only for pushes to default branch
if: ${{ github.event_name == 'push' && github.ref_name == github.event.repository.default_branch }}
uses: ./.github/workflows/trigger_dep_builds.yml
uses: ./.github/workflows/trigger_dep_builds_v2.yml
secrets:
token: ${{ secrets.REPO_DISPATCH }}

trigger-dep-build-v3:
name: Trigger v3 dep builds
needs: [build]
# Only for pushes to default branch
if: ${{ github.event_name == 'push' && github.ref_name == 'master' }}
uses: ./.github/workflows/trigger_dep_builds_v3.yml
secrets:
token: ${{ secrets.REPO_DISPATCH }}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Trigger downstream builds
name: Trigger downstream Jackson 2.x builds
on:
workflow_call:
secrets:
token:
required: true

jobs:
trigger-dep-build:
trigger-dep-build-v2:
name: Trigger downstream builds
runs-on: ubuntu-latest

Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/trigger_dep_builds_v3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Trigger downstream Jackson 3.x builds
on:
workflow_call:
secrets:
token:
required: true

jobs:
trigger-dep-build-v3:
name: Trigger downstream builds
runs-on: ubuntu-latest

strategy:
fail-fast: false
# Won't matter a lot but try to make dispatching non-parallel
max-parallel: 1
matrix:
repo:
- 'FasterXML/jackson-modules-base'
- 'FasterXML/jackson-dataformats-binary'
- 'FasterXML/jackson-dataformats-text'
- 'FasterXML/jackson-dataformat-xml'
- 'FasterXML/jackson-datatypes-collections'
- 'FasterXML/jackson-datatypes-misc'
- 'FasterXML/jackson-module-kotlin'
- 'FasterXML/jackson-module-scala'
- 'FasterXML/jackson-integration-tests'

steps:
- name: Repository dispatch
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.token }}
repository: ${{ matrix.repo }}
event-type: jackson-databind-pushed-v3
# Could push information on what was built but not yet
client-payload: '{"version": "N/A" }'
- name: Delay between dispatches
run: sleep 10s
shell: bash
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ syntax: glob
*.ipr
*.iws
/target

# Other/local
/gh-workflows

0 comments on commit 495e2fd

Please sign in to comment.