2021-10-03 20:18:31 -04:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
2021-12-14 12:35:31 -05:00
|
|
|
pull_request: # all pull requests
|
2021-10-03 20:18:31 -04:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
2023-02-28 17:11:37 -05:00
|
|
|
oracle:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
java: [ '17' ]
|
|
|
|
runs-on: 'ubuntu-latest'
|
|
|
|
env:
|
|
|
|
MVN_CMD: ./mvnw --no-transfer-progress -B
|
|
|
|
name: jdk-${{ matrix.java }}-oracle
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up JDK
|
|
|
|
uses: oracle-actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
release: ${{ matrix.java }}
|
|
|
|
- name: Build
|
|
|
|
# run a full build, just as we would for a release (i.e. the `ossrh` profile), but don't use gpg
|
|
|
|
# to sign artifacts, since we don't want to mess with storing signing credentials in CI:
|
|
|
|
run: ${{env.MVN_CMD}} verify -Possrh -Dgpg.skip=true
|
|
|
|
|
2022-04-25 21:51:28 -04:00
|
|
|
temurin:
|
2021-12-14 12:35:31 -05:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-04-25 21:51:28 -04:00
|
|
|
java: [ '8', '11', '17', '18' ]
|
2021-12-14 12:35:31 -05:00
|
|
|
runs-on: 'ubuntu-latest'
|
|
|
|
env:
|
|
|
|
MVN_CMD: ./mvnw --no-transfer-progress -B
|
2022-04-25 21:51:28 -04:00
|
|
|
name: jdk-${{ matrix.java }}-temurin
|
2021-12-14 12:35:31 -05:00
|
|
|
steps:
|
2022-04-25 21:51:28 -04:00
|
|
|
- uses: actions/checkout@v3
|
2021-12-14 12:35:31 -05:00
|
|
|
- name: Set up JDK
|
2022-04-25 21:51:28 -04:00
|
|
|
uses: actions/setup-java@v3
|
2021-12-14 12:35:31 -05:00
|
|
|
with:
|
|
|
|
java-version: ${{ matrix.java }}
|
|
|
|
distribution: 'temurin'
|
|
|
|
cache: 'maven'
|
2022-04-25 21:51:28 -04:00
|
|
|
check-latest: true
|
2021-12-14 12:35:31 -05:00
|
|
|
- name: Build
|
2022-04-25 21:51:28 -04:00
|
|
|
# run a full build, just as we would for a release (i.e. the `ossrh` profile), but don't use gpg
|
|
|
|
# to sign artifacts, since we don't want to mess with storing signing credentials in CI:
|
|
|
|
run: ${{env.MVN_CMD}} verify -Possrh -Dgpg.skip=true
|
2021-12-14 12:35:31 -05:00
|
|
|
|
|
|
|
zulu:
|
2021-10-03 20:18:31 -04:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-02-28 17:11:37 -05:00
|
|
|
java: [ '7', '8', '9', '11', '12', '13', '14', '15', '16', '17', '18' ]
|
2021-12-14 12:35:31 -05:00
|
|
|
runs-on: 'ubuntu-latest'
|
|
|
|
env:
|
|
|
|
MVN_CMD: ./mvnw --no-transfer-progress -B
|
2022-04-25 21:51:28 -04:00
|
|
|
JDK_MAJOR_VERSION: ${{ matrix.java }}
|
|
|
|
name: jdk-${{ matrix.java }}-zulu
|
2021-12-14 12:35:31 -05:00
|
|
|
steps:
|
2022-04-25 21:51:28 -04:00
|
|
|
- uses: actions/checkout@v3
|
2021-12-14 12:35:31 -05:00
|
|
|
- name: Set up JDK
|
2022-04-25 21:51:28 -04:00
|
|
|
uses: actions/setup-java@v3
|
2021-12-14 12:35:31 -05:00
|
|
|
with:
|
|
|
|
java-version: ${{ matrix.java }}
|
|
|
|
distribution: 'zulu'
|
|
|
|
cache: 'maven'
|
2022-04-25 21:51:28 -04:00
|
|
|
check-latest: true
|
2021-12-14 12:35:31 -05:00
|
|
|
- name: Build
|
2022-04-25 21:51:28 -04:00
|
|
|
# run a full build, just as we would for a release (i.e. the `ossrh` profile), but don't use gpg
|
|
|
|
# to sign artifacts, since we don't want to mess with storing signing credentials in CI:
|
|
|
|
run: |
|
|
|
|
if [ "$JDK_MAJOR_VERSION" == "7" ]; then export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=128m"; fi
|
|
|
|
${{env.MVN_CMD}} verify -Possrh -Dgpg.skip=true
|
2021-12-14 12:35:31 -05:00
|
|
|
|
2022-04-30 16:54:05 -04:00
|
|
|
code-coverage:
|
|
|
|
# (commented out for now - see the comments in 'Wait to start' below for why. Keeping this here as a placeholder
|
|
|
|
# as it may be better to use instead of an artificial delay once we no longer need to build on JDK 7):
|
|
|
|
#needs: zulu # wait until others finish so a coverage failure doesn't cancel others accidentally
|
|
|
|
runs-on: 'ubuntu-latest'
|
|
|
|
env:
|
|
|
|
MVN_CMD: ./mvnw --no-transfer-progress -B
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up JDK
|
|
|
|
uses: actions/setup-java@v3
|
|
|
|
with:
|
|
|
|
distribution: 'zulu'
|
|
|
|
java-version: '8'
|
|
|
|
cache: 'maven'
|
|
|
|
check-latest: true
|
|
|
|
- name: Wait to start
|
|
|
|
# wait a little to start: code coverage usually only takes about 1 1/2 minutes. If coverage fails, it will
|
|
|
|
# cancel the other running builds, and we don't want that (because we want to see if jobs fail due to
|
|
|
|
# build issues, not due to the code-coverage job causing the others to cancel). We could have used the
|
|
|
|
# 'need' property (commented out above), and that would wait until all the other jobs have finished before
|
|
|
|
# starting this one, but that introduces unnecessary (sometimes 2 1/2 minute) delay, whereas delaying the
|
|
|
|
# start of the code coverage checks a bit should allow everything to finish around the same time without having
|
|
|
|
# much of an adverse effect on the other jobs above.
|
|
|
|
run: sleep 90s
|
|
|
|
shell: bash
|
|
|
|
- name: Code Coverage
|
|
|
|
# run a full build, just as we would for a release (i.e. the `ossrh` profile), but don't use gpg
|
|
|
|
# to sign artifacts, since we don't want to mess with storing signing credentials in CI:
|
|
|
|
run: |
|
|
|
|
${{env.MVN_CMD}} clover:setup test && \
|
|
|
|
${{env.MVN_CMD}} -pl . clover:clover clover:check coveralls:report \
|
|
|
|
-DrepoToken="${{ secrets.GITHUB_TOKEN }}" \
|
|
|
|
-DserviceName=github \
|
2023-02-28 17:11:37 -05:00
|
|
|
-DserviceBuildNumber="${{ env.GITHUB_RUN_ID }}"
|