forked from Unity-Technologies/Unity.Mathematics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
executable file
·78 lines (71 loc) · 2.72 KB
/
.gitlab-ci.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
variables:
GIT_SUBMODULE_STRATEGY: recursive
stages:
- run_tests_on_mono
- build_package
- run_package_tests
- validate_package
- publish_package
run_tests_on_mono:mac:
stage: run_tests_on_mono
tags:
- mac
script:
- cd src/
- nuget restore
- msbuild Unity.Mathematics.sln
- mono packages/NUnit.ConsoleRunner.3.9.0/tools/nunit3-console.exe Tests/bin/Debug/Unity.Mathematics.Tests.dll --process=single
build_package:mac:
stage: build_package
tags:
- mac
script:
- cd src
- npm version 0.0.1
- npm pack .
artifacts:
paths:
- src/*.tgz
run_package_tests:mac:
stage: run_package_tests
tags:
- mac
before_script:
- python Tools/CI/get_unity_launcher.py
script:
- tar xzvf src/com.unity.mathematics-0.0.1.tgz
- ./.UnityLauncher.Editor/osx.10.12-x64/publish/UnityLauncher.Editor -registryoverride https://bfartifactory.bf.unity3d.com/artifactory/api/npm/unity-upm-staging -timeout 1200 -scriptingBackend mono -unityexecutable ~/Editor/Unity.app/Contents/MacOS/Unity -projectpath Unity.Mathematics.TestProject -batchmode -silentcrashes -automated -logfile output-macOS-editmode-test.log -cleanedLogFile output-macOS-editmode-test-cleaned.log -runtests -testresults results.xml -testPlatform editmode --ignoreErrorsOnArtifactCreation
validate_package:mac:
stage: validate_package
tags:
- mac
only:
- tags
before_script:
- python Tools/CI/get_unity_launcher.py
script:
- cp Tools/CI/ValidatePackage.cs Unity.Mathematics.TestProject/Assets/Editor/ValidatePackage.cs
- tar xzvf src/com.unity.mathematics-0.0.1.tgz
- cd package
- npm version $CI_COMMIT_TAG
- jq --arg rev $CI_COMMIT_SHA '.repository.revision=$rev' package.json > temp_package && mv temp_package package.json
- cd ..
- ./.UnityLauncher.Editor/osx.10.12-x64/publish/UnityLauncher.Editor -registryoverride https://bfartifactory.bf.unity3d.com/artifactory/api/npm/unity-upm-staging -timeout 1200 -unityexecutable ~/Editor/Unity.app/Contents/MacOS/Unity -executeMethod ValidatePackage.Validate ../package -projectpath Unity.Mathematics.TestProject -batchmode -silentcrashes -automated -logfile output-linux-validation.log -cleanedLogFile output-linux-validation-cleaned.log -quit -displayResolutionDialog disabled -addPackage com.unity.package-validation-suite@0.4.0-preview.15
dependencies:
- build_package:mac
artifacts:
paths:
- package/
publish_package:mac:
stage: publish_package
tags:
- gamecode
- macOS
only:
- tags
script:
- python Tools/CI/validation.py --package-path package --commit-tag $CI_COMMIT_TAG
- cd package
- npm publish --registry https://staging-packages.unity.com
dependencies:
- validate_package:mac