Skip to content

Commit

Permalink
Fix CI to run correct Java versions per branch
Browse files Browse the repository at this point in the history
  • Loading branch information
abelsromero committed Mar 19, 2024
1 parent 11da7a1 commit 4d9e2f6
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,39 @@ on:
- '*'

jobs:
build:

build-dev-branch:
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
java-version:
- 11
runs-on: ${{ matrix.os }}
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Set up Java ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java-version }}
cache: 'maven'
cache-dependency-path: 'pom.xml'
- name: Build & Test
run: mvn -B clean verify

build-maintenance-branch:
strategy:
matrix:
os:
- ubuntu-latest
java-version:
- 8
runs-on: ${{ matrix.os }}
if: github.ref == 'refs/heads/v1.5.x'
steps:
- uses: actions/checkout@v4
- name: Set up Java ${{ matrix.java-version }}
Expand All @@ -26,5 +51,5 @@ jobs:
java-version: ${{ matrix.java-version }}
cache: 'maven'
cache-dependency-path: 'pom.xml'
- name: Build with Maven
run: mvn verify -B -Prun-its
- name: Build & Test
run: mvn -B -Prun-its clean verify

0 comments on commit 4d9e2f6

Please sign in to comment.