-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (101 loc) · 3.2 KB
/
pr.yml
File metadata and controls
104 lines (101 loc) · 3.2 KB
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
103
104
name: PR
on:
push:
branches:
- 'feature/ci-testing'
workflow_call:
jobs:
testAllModes:
timeout-minutes: 30
name: Tests ${{ matrix.unityVersion }} ${{ matrix.testMode }}
runs-on: ubuntu-latest
concurrency:
group: unity-tests-${{ matrix.unityVersion }}-${{ matrix.testMode }}-${{ github.head_ref }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
projectPath:
- .
testMode:
- playmode
- editmode
unityVersion:
- 2021.3.2f1
steps:
- uses: actions/checkout@v2
- name: Cache Unity Folders
uses: actions/cache@v2
with:
path: ${{ matrix.projectPath }}/Library
key: Library-${{ matrix.projectPath }}-${{ matrix.unityVersion }}
restore-keys: |
Library-${{ matrix.projectPath }}-${{ matrix.unityVersion }}
- name: Check Build Dir
run: |
ls ${{matrix.projectPath}}
- uses: game-ci/unity-test-runner@v2
id: tests
timeout-minutes: 30
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
with:
customParameters: -warnaserror+
projectPath: ${{ matrix.projectPath }}
testMode: ${{ matrix.testMode }}
unityVersion: ${{ matrix.unityVersion }}
artifactsPath: ${{ matrix.testMode }}-${{ matrix.unityVersion }}-artifacts
githubToken: ${{ secrets.GITHUB_TOKEN }}
checkName: ${{ matrix.unityVersion }} ${{ matrix.testMode }} Test Results
build:
name: Build for ${{ matrix.targetPlatform }}
runs-on: ubuntu-latest
timeout-minutes: 60
concurrency:
group: device-builds-${{ matrix.targetPlatform }}-${{ github.head_ref }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
targetPlatform:
- WebGL
- Android
- StandaloneOSX
unityVersion:
- 2021.3.2f1
projectPath:
- .
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
lfs: true
- name: Cache Unity Folders
uses: actions/cache@v2
with:
path: |
${{ matrix.projectPath }}/Library
${{ matrix.projectPath }}/Temp
${{ matrix.projectPath }}/obj
key: Library-${{ matrix.projectPath }}-${{ matrix.unityVersion }}-${{ matrix.targetPlatform }}
restore-keys: |
Library-${{ matrix.projectPath }}-${{ matrix.unityVersion }}-${{ matrix.targetPlatform }}
- name: Check Build Dir
run: |
ls ${{matrix.projectPath}}
- name: Clean the build directory
continue-on-error: true
run: |
rm -rf /github/workspace/dist
shell: bash
- uses: game-ci/unity-builder@v2
timeout-minutes: 30
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
with:
targetPlatform: ${{ matrix.targetPlatform }}
unityVersion: ${{ matrix.unityVersion }}