Skip to content

Commit

Permalink
Enabled GH Jobs for 'release' branches (#106)
Browse files Browse the repository at this point in the history
* Enabled GH Jobs for 'release' branches

* Added Windup dependecies builds

* Made cache OS-agnostic
  • Loading branch information
mrizzi authored Feb 21, 2023
1 parent c1dfb57 commit f264988
Showing 1 changed file with 64 additions and 6 deletions.
70 changes: 64 additions & 6 deletions .github/workflows/pull_request_push_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,84 @@ name: Windup PR builder

on:
pull_request:
branches: [ master ]
branches:
- master
- 'releases/**'
push:
branches: [ master ]
branches:
- master
- 'releases/**'

jobs:
windup-build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
repository: windup/windup
ref: ${{ github.base_ref }}
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
java-package: jdk
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: maven-windup-build-${{ github.sha }}
- name: Build Windup on JDK 11
run: mvn -B clean install -DskipTests

windup-rulesets-build:
runs-on: ubuntu-latest
needs: [windup-build]
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
repository: windup/windup-rulesets
ref: ${{ github.base_ref }}
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
java-package: jdk
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: maven-windup-rulesets-build-${{ github.sha }}
restore-keys: |
maven-windup-build-${{ github.sha }}
- name: Build Windup Rulesets
run: mvn -B clean install -DskipTests

windup-cli-build:
strategy:
fail-fast: false
matrix:
jdk-distribution: [ adopt, temurin ]
jdk-distribution: [ temurin ]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
needs: [windup-rulesets-build]
steps:
- name: Checkout code
uses: actions/checkout@v3.0.2
uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3.3.0
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: ${{ matrix.jdk-distribution }}
cache: 'maven'
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: maven-windup-cli-build-${{ github.sha }}
restore-keys: |
maven-windup-rulesets-build-${{ github.sha }}
- name: Maven build
run: mvn clean install -DskipTests -B -s build/settings.xml

0 comments on commit f264988

Please sign in to comment.