-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.yml
71 lines (65 loc) · 2.21 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
workflow:
rules:
- if: '$CI_COMMIT_BRANCH == "main"'
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"'
- if: '$CI_PIPELINE_SOURCE == "web"'
variables:
Cake_Settings_EnableScriptCache: "true"
Cake_Settings_ShowProcessCommandLine: "true"
DOTNET_CLI_TELEMETRY_OPTOUT: "true"
DOTNET_NOLOGO: "true"
DOTNET_ROLL_FORWARD: Major
GIT_DEPTH: 0
GIT_SUBMODULE_STRATEGY: recursive
NUGET_PACKAGES: $CI_PROJECT_DIR/.nuget/packages
stages: [ build ]
build-docker:
stage: build
tags: [ shared, linux, docker ]
image: dockfool/cake-docker:latest
cache:
paths: [ $NUGET_PACKAGES ]
key:
prefix: linux-nuget
files: [ packages.lock.json ]
script:
- dotnet tool restore && dotnet cake --verbosity=verbose
build-linux:
stage: build
tags: [ shared, linux ]
cache:
paths: [ $NUGET_PACKAGES ]
key:
prefix: linux-nuget
files: [ packages.lock.json ]
script:
# renovate: datasource=dotnet depName=dotnet-sdk
- curl -fsSL https://dot.net/v1/dotnet-install.sh | bash -s -- --version 8.0.403
- export DOTNET_ROOT=$HOME/.dotnet && export PATH=$DOTNET_ROOT:$PATH
- dotnet tool restore && dotnet cake --verbosity=verbose
# build-mac:
# stage: build
# tags: [ shared, macos ]
# cache:
# paths: [ $NUGET_PACKAGES ]
# key:
# prefix: nuget
# files: [ packages.lock.json ]
# script:
# # renovate: datasource=dotnet depName=dotnet-sdk
# - curl -fsSL https://dot.net/v1/dotnet-install.sh | bash -s -- --version 8.0.403
# - export DOTNET_ROOT=$HOME/.dotnet && export PATH=$DOTNET_ROOT:$PATH
# - dotnet tool restore && dotnet cake --verbosity=verbose
build-windows:
stage: build
tags: [ shared-windows, windows ]
cache:
paths: [ $NUGET_PACKAGES ]
key:
prefix: windows-nuget
files: [ packages.lock.json ]
script:
# renovate: datasource=dotnet depName=dotnet-sdk
- '&powershell -NoProfile -ExecutionPolicy Unrestricted -Command "&([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing https://dot.net/v1/dotnet-install.ps1))) -Version 8.0.403"'
- $env:DOTNET_ROOT="$env:LocalAppData\Microsoft\dotnet" ; $env:PATH="$env:DOTNET_ROOT;$env:PATH"
- dotnet tool restore ; dotnet cake --verbosity=verbose