early commit of collision detection for fastJ physics #69
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
# This workflow builds and tests FastJ on the latest versions of macOS, Windows, and Ubuntu, using Gradle. | |
name: Build | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK 18 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '18' | |
architecture: x64 | |
- name: Build using Gradle | |
run: ./gradlew build --info | |
build-ubuntu: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK 18 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '18' | |
architecture: x64 | |
- name: Grant execute permission for gradlew | |
run: chmod +x ./gradlew | |
- name: Build using Gradle | |
run: ./gradlew build --info | |
build-macos: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK 18 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 18 | |
architecture: x64 | |
- name: Grant execute permission for gradlew | |
run: chmod +x ./gradlew | |
- name: Build | |
run: ./gradlew clean build --info | |
sonarcloud: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK 18 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 18 | |
architecture: x64 | |
- name: Cache SonarCloud packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Cache Gradle packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | |
restore-keys: ${{ runner.os }}-gradle | |
- name: Grant execute permission for gradlew | |
run: chmod +x ./gradlew | |
- name: Build | |
run: ./gradlew clean build --info -x :examples:build | |
- name: Analyze via SonarQube | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: ./gradlew jacocoTestReport sonarqube --info --stacktrace |