Skip to content

Commit

Permalink
Use shard GitHub actions from Apache
Browse files Browse the repository at this point in the history
  • Loading branch information
slawekjaranowski committed Jul 7, 2022
1 parent d342299 commit 8f7eb0f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 93 deletions.
93 changes: 5 additions & 88 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -1,96 +1,13 @@
name: GitHub CI

on:
workflow_dispatch: {}
push:
branches:
- '*'
pull_request:
branches:
- 'main'
- 'master'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'

- name: Prepare maven build
shell: bash
# cannot go offline, the system dependency is being looked up on Central.
# blocked by MDEP-568
run: mvn --show-version --errors --batch-mode validate

- name: Build with Maven
shell: bash
run: mvn --show-version --errors --batch-mode "-Dinvoker.streamLogsOnFailures=true" clean verify

site:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'

- name: Build with Maven
shell: bash
run: mvn --show-version --errors --batch-mode clean site site:stage

build-all:

needs: build

strategy:
matrix:
maven: [ '3.2.5', '3.3.9', '3.6.3', '3.8.5' ]
os: [ ubuntu-latest, windows-latest, macOS-latest ]
java:
# Hotspot VM, the "default" VM
- version: 8
dist: temurin
- version: 11
dist: temurin
- version: 17
dist: temurin
fail-fast: false

runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java.version }}
distribution: ${{ matrix.java.dist }}
cache: 'maven'

- name: Set up Maven
shell: bash
run: mvn -N "io.takari:maven:0.7.7:wrapper" "-Dmaven=${{ matrix.maven }}"

- name: Prepare maven build
shell: bash
run: ./mvnw --show-version --errors --batch-mode validate

- name: Build with Maven
shell: bash
run: ./mvnw --show-version --errors --batch-mode "-Dinvoker.streamLogsOnFailures=true" clean verify
name: Verify
uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v3
with:
ff-maven: "3.8.6"
maven-matrix: '[ "3.2.5", "3.8.6" ]'
6 changes: 1 addition & 5 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,4 @@ on:
- master
jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: apache/maven-gh-actions-shared/.github/workflows/release-drafter.yml@v3

0 comments on commit 8f7eb0f

Please sign in to comment.