Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use multi-JDK support for testing, configurable Maven version #269

Merged
merged 1 commit into from
Dec 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 20 additions & 67 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: SmallRye Build
env:
MAVEN_VERSION: 3.8.3
IO_TAKARI_MAVEN_WRAPPER_VERSION: 0.7.7

on:
push:
Expand All @@ -20,74 +23,24 @@ on:
- 'README*'

jobs:
build-linux:
runs-on: ubuntu-latest
build:
strategy:
matrix:
java: [ 11, 17 ]
name: build with JDK ${{matrix.java}} (Linux)

steps:
- uses: actions/checkout@v4
name: checkout

- uses: AdoptOpenJDK/install-jdk@v1
name: set up JDK ${{matrix.java}}
with:
version: ${{matrix.java}}

- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-

- name: build with maven
run: |
mvn -q -N io.takari:maven:0.7.7:wrapper -Dmaven=3.8.3
./mvnw -B formatter:validate verify --file pom.xml

build-windows:
runs-on: windows-latest
name: build with JDK 11 (Windows)

steps:
- uses: actions/checkout@v4
name: checkout

- uses: AdoptOpenJDK/install-jdk@v1
name: set up JDK 11
with:
version: 11

- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-

- name: build with maven
shell: bash
run: |
mvn -q -N io.takari:maven:0.7.7:wrapper -Dmaven=3.8.3
./mvnw -B formatter:validate verify --file pom.xml

build-macos:
runs-on: macos-latest
name: build with JDK 11 (Mac OS)
os: [ ubuntu-latest, windows-latest, macos-latest ]
runs-on: ${{ matrix.os }}
name: build

steps:
- uses: actions/checkout@v4
name: checkout

- uses: AdoptOpenJDK/install-jdk@v1
name: set up JDK 11
- uses: actions/setup-java@v3
name: set up JDKs
with:
version: 11
distribution: temurin
java-version: |
11
17

- name: Cache local Maven repository
uses: actions/cache@v3
Expand All @@ -99,20 +52,20 @@ jobs:

- name: build with maven
run: |
mvn -q -N io.takari:maven:0.7.7:wrapper -Dmaven=3.8.3
./mvnw -B formatter:validate verify --file pom.xml
mvn -q -N "io.takari:maven:${{env.IO_TAKARI_MAVEN_WRAPPER_VERSION}}:wrapper" "-Dmaven=${{env.MAVEN_VERSION}}"
./mvnw -B -ntp formatter:validate verify --file pom.xml "-Djava11.home=${{env.JAVA_HOME_11_X64}}"

quality:
needs: [build-linux,build-macos,build-windows]
needs: [ build ]
if: github.event_name == 'push' && github.repository_owner == 'smallrye'
runs-on: ubuntu-latest
name: quality

steps:
- uses: actions/checkout@v4
- uses: AdoptOpenJDK/install-jdk@v1
- uses: actions/setup-java@v3
with:
version: 11
java-version: 11

- name: Cache local Maven repository
uses: actions/cache@v3
Expand All @@ -127,5 +80,5 @@ jobs:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
SONAR_TOKEN: ${{secrets.SONAR_TOKEN}}
run: |
mvn -q -N io.takari:maven:0.7.7:wrapper -Dmaven=3.8.3
./mvnw -B javadoc:javadoc verify --file pom.xml -Pcoverage sonar:sonar -Dsonar.projectKey=smallrye_smallrye-common -Dsonar.login=$SONAR_TOKEN
mvn -q -N "io.takari:maven:${{env.IO_TAKARI_MAVEN_WRAPPER_VERSION}}:wrapper" "-Dmaven=${{env.MAVEN_VERSION}}"
./mvnw -B -ntp javadoc:javadoc verify --file pom.xml -Pcoverage sonar:sonar -Dsonar.projectKey=smallrye_smallrye-common -Dsonar.login=$SONAR_TOKEN
Loading