gitlab-org--gitlab-foss/lib/gitlab/ci/templates/Mono.gitlab-ci.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
1.6 KiB
YAML
Raw Normal View History

# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Mono.gitlab-ci.yml
2018-01-06 09:58:42 -05:00
# 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:
- build
2018-01-06 09:58:42 -05:00
- test
- deploy
before_script:
- nuget restore -NonInteractive
release:
stage: deploy
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
2018-01-06 09:58:42 -05:00
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"
2018-01-06 09:58:42 -05:00
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"
- mono packages/NUnit.ConsoleRunner.3.6.0/tools/nunit3-console.exe build/debug/MyProject.Test.dll