Skip to content

Commit

Permalink
Simplify GameCI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dqhntt committed Jul 17, 2023
1 parent 6f7e918 commit 6fce18b
Showing 1 changed file with 20 additions and 44 deletions.
64 changes: 20 additions & 44 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ jobs:
matrix:
targetPlatform:
- StandaloneLinux64 # Build a Linux 64-bit standalone.
# - iOS # Build an iOS player.
# - Android # Build an Android player.
# - WebGL # WebGL.
steps:
- run: |
sudo apt update
- uses: actions/checkout@v3
with:
fetch-depth: 0
lfs: true
- uses: actions/cache@v3
with:
Expand All @@ -54,58 +54,33 @@ jobs:
- uses: game-ci/unity-builder@v2
with:
targetPlatform: ${{ matrix.targetPlatform }}
customParameters: '-myParameter myValue -myBoolean -ThirdParameter andItsValue'
# We use dirty build because we are replacing the default project settings file above
allowDirtyBuild: true
- uses: actions/upload-artifact@v3
with:
name: Build for ${{ matrix.targetPlatform }}
path: build
name: Build-${{ matrix.targetPlatform }}
path: build/${{ matrix.targetPlatform }}

buildForWindowsBasedPlatforms:
buildForAllSupportedPlatforms: # Except Linux above
name: Build for ${{ matrix.targetPlatform }}
runs-on: windows-2019
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
targetPlatform:
# - StandaloneWindows # Build a Windows 32-bit standalone.
- StandaloneOSX # Build a macOS standalone (Intel 64-bit).
# - StandaloneWindows # Build a Windows standalone.
- StandaloneWindows64 # Build a Windows 64-bit standalone.
# - tvOS # Build an AppleTV player.
# - WSAPlayer # Build a UWP App.
steps:
- uses: actions/checkout@v3
with:
lfs: true
- uses: actions/cache@v3
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
restore-keys: |
Library-${{ matrix.targetPlatform }}
Library-
- uses: game-ci/unity-builder@v2
with:
targetPlatform: ${{ matrix.targetPlatform }}
customParameters: '-myParameter myValue -myBoolean -ThirdParameter andItsValue'
# We use dirty build because we are replacing the default project settings file above
allowDirtyBuild: true
- uses: actions/upload-artifact@v3
with:
name: Build for ${{ matrix.targetPlatform }}
path: build

buildForMacOSBasedPlatforms:
name: Build for ${{ matrix.targetPlatform }}
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
targetPlatform:
- StandaloneOSX # Build a macOS standalone.
# - StandaloneLinux64 # Build a Linux 64-bit standalone.
# - iOS # Build an iOS player.
# - Android # Build an Android .apk standalone app.
- WebGL # WebGL.
steps:
- run: |
sudo apt update
- uses: actions/checkout@v3
with:
fetch-depth: 0
lfs: true
- uses: actions/cache@v3
with:
Expand All @@ -114,13 +89,14 @@ jobs:
restore-keys: |
Library-${{ matrix.targetPlatform }}
Library-
- uses: jlumbroso/free-disk-space@main
if: matrix.targetPlatform == 'Android'
- uses: game-ci/unity-builder@v2
with:
targetPlatform: ${{ matrix.targetPlatform }}
customParameters: '-myParameter myValue -myBoolean -ThirdParameter andItsValue'
# We use dirty build because we are replacing the default project settings file above
allowDirtyBuild: true
- uses: actions/upload-artifact@v3
with:
name: Build for ${{ matrix.targetPlatform }}
path: build
name: Build-${{ matrix.targetPlatform }}
path: build/${{ matrix.targetPlatform }}

0 comments on commit 6fce18b

Please sign in to comment.