Skip to content

Commit

Permalink
go back to matrix with no fetch depth
Browse files Browse the repository at this point in the history
  • Loading branch information
0xFirekeeper committed Mar 21, 2024
1 parent 4e32149 commit dbbf27e
Showing 1 changed file with 8 additions and 74 deletions.
82 changes: 8 additions & 74 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
types: [opened, synchronize]

jobs:
buildAndTestForLinuxAndWebGLPlatforms:
name: Build and Test ${{ matrix.targetPlatform }}
buildAndTestForLinuxBasedPlatforms:
name: Build and Test for ${{ matrix.targetPlatform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -19,79 +19,13 @@ jobs:
- 2022.3.17f1
targetPlatform:
- StandaloneLinux64 # Build a Linux 64-bit standalone.
- WebGL # WebGL.
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: false
- uses: actions/cache@v3
with:
path: ${{ matrix.projectPath }}/Library
key:
Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}-${{
hashFiles(matrix.projectPath) }}
restore-keys: |
Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}-
Library-${{ matrix.projectPath }}-
Library-
- name: Setup config.json
env:
CLIENT_ID: ${{ secrets.CLIENT_ID }}
run: |
mkdir -p Assets/Tests/Resources
echo '{"clientId": "${{ secrets.CLIENT_ID }}"}' > Assets/Tests/Resources/config.json
shell: bash
- uses: game-ci/unity-test-runner@v4
id: testRunner
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
testMode: PlayMode # Run PlayMode tests.
- uses: actions/upload-artifact@v3
if: always()
with:
name: Test results (all modes)
path: ${{ steps.testRunner.outputs.artifactsPath }}
- if: matrix.targetPlatform == 'Android'
uses: jlumbroso/[email protected]
- uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
targetPlatform: ${{ matrix.targetPlatform }}
allowDirtyBuild: true
- uses: actions/upload-artifact@v3
with:
name: Build
path: build

buildAndTestForMobilePlatforms:
name: Build and Test For ${{ matrix.targetPlatform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
projectPath:
- ""
unityVersion:
- 2022.3.17f1
targetPlatform:
- iOS # Build an iOS player.
- Android # Build an Android player.
- WebGL # WebGL.
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# fetch-depth: 0
lfs: false
- uses: actions/cache@v3
with:
Expand Down Expand Up @@ -144,7 +78,7 @@ jobs:
path: build

buildForWindowsBasedPlatforms:
name: Build ${{ matrix.targetPlatform }}
name: Build for ${{ matrix.targetPlatform }}
runs-on: windows-2022
strategy:
fail-fast: false
Expand All @@ -159,7 +93,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# fetch-depth: 0
lfs: false
- uses: actions/cache@v3
with:
Expand Down Expand Up @@ -187,7 +121,7 @@ jobs:
path: build

buildForMacOSBasedPlatforms:
name: Build ${{ matrix.targetPlatform }}
name: Build for ${{ matrix.targetPlatform }}
runs-on: macos-latest
strategy:
fail-fast: false
Expand All @@ -202,7 +136,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# fetch-depth: 0
lfs: false

- uses: actions/cache@v3
Expand Down

0 comments on commit dbbf27e

Please sign in to comment.