2018-03-17 18:26:18 +05:30
|
|
|
# This is a simple gitlab continuous integration template (compatible with the shared runner provided on gitlab.com)
|
|
|
|
# using the official mono docker image to build a visual studio project.
|
|
|
|
#
|
|
|
|
# MyProject.sln
|
|
|
|
# MyProject\
|
|
|
|
# MyProject\
|
|
|
|
# MyProject.csproj (console application)
|
|
|
|
# MyProject.Test\
|
|
|
|
# MyProject.Test.csproj (test library using nuget packages "NUnit" and "NUnit.ConsoleRunner")
|
|
|
|
#
|
|
|
|
# Please find the full example project here:
|
|
|
|
# https://gitlab.com/tobiaskoch/gitlab-ci-example-mono
|
|
|
|
|
|
|
|
# see https://hub.docker.com/_/mono/
|
|
|
|
image: mono:latest
|
|
|
|
|
|
|
|
stages:
|
2019-07-31 22:56:46 +05:30
|
|
|
- build
|
2018-03-17 18:26:18 +05:30
|
|
|
- test
|
|
|
|
- deploy
|
|
|
|
|
|
|
|
before_script:
|
|
|
|
- nuget restore -NonInteractive
|
|
|
|
|
|
|
|
release:
|
|
|
|
stage: deploy
|
2021-04-17 20:07:23 +05:30
|
|
|
rules:
|
|
|
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
2018-03-17 18:26:18 +05:30
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- build/release/MyProject.exe
|
|
|
|
script:
|
|
|
|
# The output path is relative to the position of the csproj-file
|
|
|
|
- msbuild /p:Configuration="Release" /p:Platform="Any CPU"
|
|
|
|
/p:OutputPath="./../../build/release/" "MyProject.sln"
|
2019-07-07 11:18:12 +05:30
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
debug:
|
|
|
|
stage: test
|
|
|
|
script:
|
|
|
|
# The output path is relative to the position of the csproj-file
|
|
|
|
- msbuild /p:Configuration="Debug" /p:Platform="Any CPU"
|
|
|
|
/p:OutputPath="./../../build/debug/" "MyProject.sln"
|
2019-07-07 11:18:12 +05:30
|
|
|
- mono packages/NUnit.ConsoleRunner.3.6.0/tools/nunit3-console.exe build/debug/MyProject.Test.dll
|