-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
97 lines (90 loc) · 3.2 KB
/
.gitlab-ci.yml
File metadata and controls
97 lines (90 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
stages:
- clang-format
- build_linux
- build_windows
- build_macOS
- unit-tests
image: unityci/editor:ubuntu-2020.3.18f1-base-0.15.0
build_linux:
stage: build_linux
retry:
max: 2
when: runner_system_failure
before_script:
- apt-get -qq update && apt-get -qq install zip
- echo "$UNITY_CERT" > ./Unity_v2020.x.ulf
- unity-editor -nographics -quit -batchmode -quit -manualLicenseFile ./Unity_v2020.x.ulf || true
script:
- mkdir -p $CI_PROJECT_DIR/linux_build
- unity-editor -nographics -quit -batchmode -projectPath $CI_PROJECT_DIR -buildLinux64Player $CI_PROJECT_DIR/linux_build/build.x86_64
- zip -r linux_build.zip $CI_PROJECT_DIR/linux_build/
artifacts:
paths:
- $CI_PROJECT_DIR/linux_build/
expire_in: 1 week
build_windows:
image: unityci/editor:ubuntu-2020.3.18f1-windows-mono-0.15.0
stage: build_windows
retry:
max: 2
when: runner_system_failure
before_script:
- apt-get -qq update && apt-get -qq install zip
- echo "$UNITY_CERT" > ./Unity_v2020.x.ulf
- unity-editor -nographics -quit -batchmode -quit -manualLicenseFile ./Unity_v2020.x.ulf || true
script:
- mkdir -p $CI_PROJECT_DIR/windows_build
- unity-editor -nographics -quit -batchmode -projectPath $CI_PROJECT_DIR -buildWindows64Player $CI_PROJECT_DIR/windows_build/build.exe
artifacts:
paths:
- $CI_PROJECT_DIR/windows_build/
expire_in: 1 week
build_macOS:
image: unityci/editor:ubuntu-2020.3.18f1-mac-mono-0.15.0
stage: build_macOS
retry:
max: 2
when: runner_system_failure
before_script:
- apt-get -qq update && apt-get -qq install zip
- echo "$UNITY_CERT" > ./Unity_v2020.x.ulf
- unity-editor -nographics -quit -batchmode -quit -manualLicenseFile ./Unity_v2020.x.ulf || true
script:
- mkdir -p $CI_PROJECT_DIR/mac_build
- unity-editor -nographics -quit -batchmode -projectPath $CI_PROJECT_DIR -buildOSXUniversalPlayer $CI_PROJECT_DIR/mac_build/build.app
artifacts:
paths:
- $CI_PROJECT_DIR/mac_build/
expire_in: 1 week
unit-tests:
stage: unit-tests
retry:
max: 2
when: runner_system_failure
before_script:
- apt-get -qq update && apt-get -qq install xsltproc
- echo "$UNITY_CERT" > ./Unity_v2020.x.ulf
- unity-editor -nographics -quit -batchmode -quit -manualLicenseFile ./Unity_v2020.x.ulf || true
script:
- unity-editor -runTests -nographics -batchmode -projectPath $CI_PROJECT_DIR -testPlatform PlayMode -testResults $CI_PROJECT_DIR/results.txt
after_script:
# Grab nunit to junit converter of github all credit goes to @pavio-liapota for this converter
- wget https://raw.githubusercontent.com/nunit/nunit-transforms/master/nunit3-junit/nunit3-junit.xslt
- xsltproc -o $CI_PROJECT_DIR/junit.xml nunit3-junit.xslt $CI_PROJECT_DIR/results.txt | true
artifacts:
when: always
paths:
- $CI_PROJECT_DIR/junit.xml
reports:
junit: junit.xml
clang-format:
image: ubuntu:latest
retry:
max: 2
when: runner_system_failure
before_script:
- apt-get -qq update && apt-get -qq install clang-format-12
stage: clang-format
needs: []
script:
- clang-format-12 -i --dry-run `find -type f -name "*.cs" | grep -v Library` -Werror -style=file