Bugfix/music change #373
Workflow file for this run
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: GothicVR Build Jobs | |
on: | |
pull_request: | |
branches: | |
- main | |
types: [labeled] | |
# We will reuse it once we define release pipeline | |
# push: | |
# branches: | |
# - main | |
# paths-ignore: | |
# - 'docs/**' | |
# - "README.md" | |
jobs: | |
######### | |
# TESTS # | |
######### | |
Unit_Tests: | |
if: ${{ github.event.label.name == 'Pipeline' }} | |
name: Test in ${{ matrix.testMode }} | |
runs-on: self-hosted | |
strategy: | |
fail-fast: false | |
matrix: | |
testMode: | |
- playmode | |
- editmode | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
lfs: true | |
fetch-depth: 0 | |
clean: true | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ matrix.projectPath }}/Library | |
key: Library-${{ matrix.projectPath }} | |
restore-keys: | | |
Library- | |
- uses: game-ci/unity-test-runner@v3 | |
id: tests | |
env: | |
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | |
with: | |
testMode: ${{ matrix.testMode }} | |
artifactsPath: ${{ matrix.testMode }}-artifacts | |
githubToken: ${{ secrets.GITHUB_TOKEN }} | |
checkName: ${{ matrix.testMode }} Test Results | |
coverageOptions: 'generateAdditionalMetrics;generateHtmlReport;generateBadgeReport;assemblyFilters:+my.assembly.*' | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: Test results for ${{ matrix.testMode }} | |
path: ${{ steps.tests.outputs.artifactsPath }} | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: Coverage results for ${{ matrix.testMode }} | |
path: ${{ steps.tests.outputs.coveragePath }} | |
######### | |
# BUILD # | |
######### | |
buildForAllPlatforms: | |
if: ${{ github.event.label.name == 'Pipeline' }} | |
name: Build GothicVR for ${{ matrix.targetDevice }} | |
needs: Unit_Tests | |
runs-on: self-hosted | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- targetPlatform: StandaloneWindows64 | |
targetDevice: Windows64 | |
- targetPlatform: Android | |
targetDevice: Pico | |
- targetPlatform: Android | |
targetDevice: Quest | |
steps: | |
# Checkout | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
lfs: true | |
fetch-depth: 0 | |
clean: true | |
# Cache | |
- uses: actions/cache@v3 | |
with: | |
path: Library | |
key: Library-${{ matrix.targetPlatform }} | |
restore-keys: Library- | |
# Build | |
- name: Build project | |
uses: game-ci/unity-builder@v3 | |
env: | |
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | |
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | |
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | |
with: | |
targetPlatform: ${{ matrix.targetPlatform }} | |
allowDirtyBuild: true | |
buildMethod: GVR.Editor.UnityBuildTools.UnityBuilderAction.Perform${{ matrix.targetDevice }}Build | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Build-${{ matrix.targetDevice }} | |
path: build/${{ matrix.targetDevice }} | |
expire-in: 2 days |