Skip to content

Fix macOS build in pipeline #70

Fix macOS build in pipeline

Fix macOS build in pipeline #70

name: build-action
on:
push:
branches-ignore:
- 'gh-pages'
pull_request:
branches-ignore:
- 'gh-pages'
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{matrix.os}}
steps:
- name: Check repository
uses: actions/checkout@v3
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
#Run only on macOS
- name: Setup Docker
if: ${{ matrix.os == 'macos-latest' && github.event_name == 'pull_request' }}
uses: better0fdead/actions-setup-docker@better0fdead/increase-timeout
#Build without test on Windows or macOS (when not a PR)
- name: Gradle build
run: |
if [[ "$RUNNER_OS" == "Windows" || ( "$RUNNER_OS" == "macOS" && ${{ github.event_name }} != 'pull_request' ) ]]; then
./gradlew build -x test
else
./gradlew build
fi
shell: bash