forked from Workbench-Team/space-station-14
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
71 lines (66 loc) · 2.57 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
image: registry.git.arumoon.ru/workbench-team/space-station-14/build-image:latest
stages:
- test
- publish
test-debug:
stage: test
retry: 2
except:
- schedules
script:
- mkdir .git/hooks -p
- python3 RUN_THIS.py
- dotnet restore
- dotnet build --configuration DebugOpt --no-restore /p:WarningsAsErrors=nullable /m
- pwsh -Command "dotnet test --configuration DebugOpt --no-build Content.Tests/Content.Tests.csproj -- NUnit.ConsoleOut=0"
- export DOTNET_gcServer=1
- pwsh -Command "dotnet test --configuration DebugOpt --no-build Content.IntegrationTests/Content.IntegrationTests.csproj -- NUnit.ConsoleOut=0"
test-release:
stage: test
retry: 2
script:
- mkdir .git/hooks -p
- python3 RUN_THIS.py
- dotnet restore
- dotnet build --configuration Tools --no-restore /p:WarningsAsErrors=nullable /m
- pwsh -Command "dotnet test --configuration Tools --no-build Content.Tests/Content.Tests.csproj -- NUnit.ConsoleOut=0"
- export DOTNET_gcServer=1
- pwsh -Command "dotnet test --configuration Tools --no-build Content.IntegrationTests/Content.IntegrationTests.csproj -- NUnit.ConsoleOut=0"
publish:
stage: publish
retry: 2
interruptible: true
only:
- schedules
except:
variables:
- ($SSH_PRIVATE_KEY == null || $SSH_REMOTE_IP == null || $SSH_USER == null)
script:
- mkdir .git/hooks -p
- python3 RUN_THIS.py
- Tools/package_server_build.py -p win-x64 linux-x64 osx-x64 linux-arm64
- Tools/package_client_build.py
- Tools/gen_build_info.py
- mkdir release/$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA
- mv release/*.zip release/$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA
- eval $(ssh-agent -s)
- ssh-add - <<< "${SSH_PRIVATE_KEY}"
- mkdir -p ~/.ssh && chmod 700 ~/.ssh
- ssh-keyscan $SSH_REMOTE_IP >> ~/.ssh/known_hosts
- rsync -avz release/$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA $SSH_USER@$SSH_REMOTE_IP:~/builds/builds/
- ssh $SSH_USER@$SSH_REMOTE_IP "~/push.ps1 $CI_COMMIT_REF_NAME-$CI_COMMIT_SHA $CI_COMMIT_REF_NAME"
publish-artifact:
stage: publish
retry: 2
interruptible: true
except:
- schedules
script:
- mkdir .git/hooks -p
- python3 RUN_THIS.py
# We create artifact only for Windows and x64 Linux, because almost noone uses OSX and Linux on arm for development among our contributors. This will save for us some amount of storage. You can just add osx-x64 or linux-arm64 if you really need it.
- Tools/package_server_build.py -p win-x64 linux-x64 --hybrid-acz
artifacts:
name: "$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA"
paths:
- release/SS14.Server_*