forked from paniznr/coolKidsGameJam23
-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (97 loc) · 3.15 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: GameCI 😎
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main, '*']
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
# cancel-in-progress: true
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
jobs:
buildAndTestForLinuxBasedPlatforms:
name: Build and Test for ${{ matrix.targetPlatform }}
runs-on: ubuntu-latest
permissions:
actions: write
checks: write
strategy:
fail-fast: false
matrix:
targetPlatform:
- StandaloneLinux64 # Build a Linux 64-bit standalone.
steps:
- run: |
sudo apt update
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- uses: actions/cache@v3
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
restore-keys: |
Library-${{ matrix.targetPlatform }}
Library-
- uses: game-ci/unity-test-runner@v2
id: testRunner
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v3
if: always()
with:
name: Test results (all modes)
path: ${{ steps.testRunner.outputs.artifactsPath }}
- uses: game-ci/unity-builder@v2
with:
targetPlatform: ${{ matrix.targetPlatform }}
# We use dirty build because we are replacing the default project settings file above
allowDirtyBuild: true
- uses: actions/upload-artifact@v3
with:
name: Build-${{ matrix.targetPlatform }}
path: build/${{ matrix.targetPlatform }}
buildForAllSupportedPlatforms: # Except Linux above
name: Build for ${{ matrix.targetPlatform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
targetPlatform:
- StandaloneOSX # Build a macOS standalone (Intel 64-bit).
# - StandaloneWindows # Build a Windows standalone.
- StandaloneWindows64 # Build a Windows 64-bit 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@v4
with:
fetch-depth: 0
lfs: true
- uses: actions/cache@v3
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
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 }}
# We use dirty build because we are replacing the default project settings file above
allowDirtyBuild: true
- uses: actions/upload-artifact@v3
with:
name: Build-${{ matrix.targetPlatform }}
path: build/${{ matrix.targetPlatform }}