Skip to content

Merge release 1.1.0 back into main #1682

Merge release 1.1.0 back into main

Merge release 1.1.0 back into main #1682

Workflow file for this run

name: CI
on:
push:
branches:
- main
- release-*
pull_request:
env:
build_java_version: 17
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Java
uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: ${{ env.build_java_version }}
- name: Build
uses: gradle/gradle-build-action@v2
with:
arguments: build
- name: Check project files unmodified
run: |
directoryState="$(git status --porcelain)"
if [ -n "$directoryState" ]; then
echo "Some files were modified during build. Please run the build locally before checking in, as it ensures some source file conventions (like copyright header)."
echo "The following files were modified:"
echo "$directoryState"
exit 1
fi
test:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
test_java_version:
- 8
- 11
- 17
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Build JDK
uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: ${{ env.build_java_version }}
- name: Test
uses: gradle/gradle-build-action@v2
with:
arguments: test -PallTests -PtestJavaVersion=${{ matrix.test_java_version }}
cache-disabled: true
integration-test:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
test_java_version:
- 8
- 11
- 17
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Build JDK
uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: ${{ env.build_java_version }}
- name: Set up Test JDK
uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: ${{ matrix.test_java_version }}
- name: Provide installed JDKs
uses: actions/github-script@v6
id: provideJdkPaths
with:
script: |
for ( let envVarName in process.env ) {
if (/JAVA_HOME_\d.*64/.test(envVarName)) {
const version = envVarName.match(/JAVA_HOME_(\d+).*64/)[1];
if (version === "${{ matrix.test_java_version }}") {
core.exportVariable('test_jdk_path', process.env[envVarName]);
} else if (version === "${{ env.build_java_version }}") {
core.exportVariable('build_jdk_path', process.env[envVarName]);
}
}
}
- name: Publish to Maven Local
uses: gradle/gradle-build-action@v2
env:
JAVA_HOME: ${{ env.build_jdk_path }}
with:
arguments: build -xtest -xspotbugsMain -xjavadoc publishToMavenLocal
- name: Integration test
uses: gradle/gradle-build-action@v2
env:
JAVA_HOME: ${{ env.build_jdk_path }}
with:
arguments: runMavenTest -PtestJavaVersion=${{ matrix.test_java_version }} -Porg.gradle.java.installations.paths=${{ env.test_jdk_path }}