Blaze-Persistence CI #371
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Blaze-Persistence CI" | |
on: | |
schedule: | |
- cron: '0 5 * * *' | |
env: | |
MAVEN_SKIP_RC: true | |
jobs: | |
build: | |
name: Test | |
runs-on: ubuntu-latest | |
# We want to know the test results of all matrix entries | |
continue-on-error: true | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
################################################ | |
# Latest integration dependencies | |
################################################ | |
- rdbms: h2 | |
component: other | |
jdk: 17 | |
################################################ | |
# hibernate-6.2 | |
################################################ | |
- rdbms: h2 | |
component: hibernate-6.2 | |
jdk: 17 | |
################################################ | |
# hibernate-6.4 | |
################################################ | |
- rdbms: h2 | |
component: hibernate-6.4 | |
jdk: 17 | |
################################################ | |
# hibernate-6.5 | |
################################################ | |
- rdbms: h2 | |
component: hibernate-6.5 | |
jdk: 17 | |
################################################ | |
# hibernate-6.6 | |
################################################ | |
- rdbms: h2 | |
component: hibernate-6.6 | |
jdk: 17 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Update /etc/hosts file | |
# /etc/hosts file needs to be updated as a workaround for | |
# https://github.com/actions/virtual-environments/issues/3185 | |
run: echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts | |
- name: Reclaim Disk Space | |
run: .github/ci-prerequisites.sh | |
- name: Set up Java 8 | |
uses: AdoptOpenJDK/install-jdk@v1 | |
with: | |
version: 8 | |
targets: JDK8_HOME;JAVA_HOME | |
- name: Set up Requested JDK | |
uses: actions/setup-java@v3 | |
if: ${{ matrix.jdk != 8 && !endsWith(matrix.jdk, '-ea') }} | |
with: | |
java-version: ${{ matrix.jdk }} | |
distribution: 'temurin' | |
- name: Set up EA JDK | |
uses: actions/setup-java@v3 | |
if: ${{ matrix.jdk != 8 && endsWith(matrix.jdk, '-ea') }} | |
with: | |
java-version: ${{ matrix.jdk }} | |
distribution: 'zulu' | |
- name: Get year/month for cache key | |
id: get-date | |
run: | | |
echo "::set-output name=yearmonth::$(/bin/date -u "+%Y-%m")" | |
shell: bash | |
- name: Cache Maven local repository | |
uses: actions/cache@v2 | |
id: cache-maven | |
with: | |
path: | | |
~/.m2/repository | |
# refresh cache every month to avoid unlimited growth | |
key: maven-localrepo-${{ steps.get-date.outputs.yearmonth }} | |
- name: Set up Maven | |
run: ./mvnw -v | |
- name: Run build script | |
env: | |
JDK8_HOME: ${{ env.JDK8_HOME }} | |
RDBMS: ${{ matrix.rdbms }} | |
COMPONENT: ${{ matrix.component }} | |
JDK: ${{ matrix.jdk }} | |
run: ./ci/build-github-latest.sh | |
shell: bash | |
- name: Upload test reports (if Maven failed) | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: test-reports-${{ matrix.component }} | |
path: './**/*-reports/' | |
- name: Omit produced artifacts from build cache | |
run: ./ci/before-cache.sh |