Updated after https://github.com/b3dgs/lionengine/issues/811 #140
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 will: | |
# - compile game on windows, linux, macos | |
# - compile editor on windows | |
# - run game and editor sonar on linux | |
name: Build | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
jdk: [17] | |
runs-on: ${{ matrix.os }} | |
env: | |
JDK_VERSION: ${{ matrix.jdk }} | |
AUDIODEV: "null" | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Cache | |
uses: actions/[email protected] | |
with: | |
path: ~/.m2/repository | |
key: maven-${{ matrix.os }}-java${{ matrix.jdk }}-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
maven-${{ matrix.os }}-java${{ matrix.jdk }}- | |
maven-${{ matrix.os }}- | |
- name: Maven | |
uses: stCarolas/[email protected] | |
with: | |
maven-version: 3.9.6 | |
- name: JDK | |
uses: actions/[email protected] | |
with: | |
java-version: | | |
${{ matrix.jdk }} | |
distribution: 'temurin' | |
mvn-toolchain-id: | | |
JavaSE-17 | |
- name: Compile windows | |
if: matrix.os == 'windows-latest' | |
uses: coactions/[email protected] | |
with: | |
run: mvn clean install --file lionheart-parent/pom.xml -U -Pall | |
- name: Compile macos | |
if: matrix.os == 'macos-latest' | |
uses: coactions/[email protected] | |
with: | |
run: mvn clean install --file lionheart-parent/pom.xml -U -Pall -Dtycho.testArgLine=-XstartOnFirstThread | |
- name: Sonar ubuntu | |
if: matrix.os == 'ubuntu-latest' | |
uses: coactions/[email protected] | |
with: | |
run: mvn clean install org.sonarsource.scanner.maven:sonar-maven-plugin:sonar --file lionheart-parent/pom.xml -U -Pall -Dsonar.organization=b3dgs -Dsonar.host.url=https://sonarcloud.io -Dsonar.token=${{ secrets.SONAR_TOKEN }} -Dsonar.projectKey=b3dgs_lionheart-remake |