Skip to content

Be verbose when setting up MacOS #41

Be verbose when setting up MacOS

Be verbose when setting up MacOS #41

Workflow file for this run

name: Code Checks
on: [push, pull_request]
env:
GRADLE_OPTS: >-
-Dorg.gradle.internal.launcher.welcomeMessageEnabled=false
GRADLE_CMD_OPTS: >-
-PbranchName="${{ github.ref }}"
--console=plain
--continue
--no-build-cache
--no-daemon
--parallel
jobs:
spotless:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
java-version: 11
java-package: jdk
architecture: x64
distribution: 'temurin'
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Check code formatting
run: ./gradlew ${{ env.GRADLE_CMD_OPTS }} spotlessCheck
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
java-version: 11
java-package: jdk
architecture: x64
distribution: 'temurin'
- name: Checkout submodules
run: git submodule update --init --recursive
- uses: burrunan/gradle-cache-action@v2
name: Cache .gradle
with:
# Disable caching of $HOME/.gradle/caches/*.*/generated-gradle-jars
save-generated-gradle-jars: false
# Disable caching of ~/.gradle/caches/build-cache-*
save-local-build-cache: false
# Enable caching of ~/.gradle/caches/modules-*
save-gradle-dependencies-cache: true
# Enable caching of ~/.m2/repository/
save-maven-dependencies-cache: true
- name: Build all files
run: ./gradlew ${{ env.GRADLE_CMD_OPTS }} assemble compileTest
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
needs: [build]
steps:
- run: |
ref="${github_ref////-}"
echo "ref=$ref" >> $GITHUB_ENV
env:
github_ref: ${{ github.ref }}
shell: bash
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
java-version: 11
java-package: jdk
architecture: x64
distribution: 'temurin'
- name: Checkout submodules
run: git submodule update --init --recursive
# This is to ensure unit tests with MariaDB4j don't fail
- name: Symlinks for MacOS
if: ${{ runner.os == 'MacOS' }}
run: |
sudo mkdir -pv /usr/local/opt/openssl/lib
sudo ln -sv /usr/lib/libssl.dylib /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
sudo ln -sv /usr/lib/libcrypto.dylib /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
# This is to ensure unit tests with MariaDB4j don't fail
- name: Install libncurses5
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get install -y libncurses5
- uses: burrunan/gradle-cache-action@v2
name: Cache .gradle
with:
# Disable caching of $HOME/.gradle/caches/*.*/generated-gradle-jars
save-generated-gradle-jars: false
# Disable caching of ~/.gradle/caches/build-cache-*
save-local-build-cache: false
# Enable caching of ~/.gradle/caches/modules-*
save-gradle-dependencies-cache: true
# Enable caching of ~/.m2/repository/
save-maven-dependencies-cache: true
- name: Run all Tests
id: gradle_tests
run: ./gradlew ${{ env.GRADLE_CMD_OPTS }} -x spotlessCheck build
- uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: ${{ env.ref }}_code-checks_${{ matrix.os }}
path: |
**/build/test-results/test/TEST-*.xml
**/build/reports/spotbugs/*.xml