11sudo : false
22language : csharp
33
4+ matrix :
5+ include :
6+ - dotnet : 2.1.4
7+ mono : none
8+ env : DOTNETCORE=1
9+ - mono : latest
10+
411notifications :
512 email : false
613
@@ -20,30 +27,48 @@ addons:
2027git :
2128 depth : 9999999
2229
30+ # TODO: add test runner for dotnet core too
2331install :
24- - nuget restore TS3AudioBot.sln
25- - nuget install NUnit.Runners -OutputDirectory nunit
32+ - |
33+ if [[ $DOTNETCORE = 1 ]]; then
34+ echo "dotnet core"
35+ dotnet restore TS3AudioBot.sln
36+ else
37+ echo "mono"
38+ nuget restore TS3AudioBot.sln
39+ nuget install NUnit.Runners -OutputDirectory nunit
40+ fi
2641
2742script :
28- - cfg="/p:Configuration=Release TS3AudioBot.sln"
29- - if command -v msbuild; then
30- msbuild $cfg;
31- elif command -v xbuild; then
32- xbuild $cfg;
43+ - |
44+ if [[ $DOTNETCORE = 1 ]]; then
45+ dotnet build --framework netcoreapp2.0 --configuration Release TS3AudioBot
3346 else
34- echo "No mono build tool found!";
35- false;
47+ if command -v msbuild; then
48+ buildtool="msbuild"
49+ elif command -v xbuild; then
50+ buildtool="xbuild"
51+ else
52+ echo "No mono build tool found!"
53+ false
54+ fi
55+ "${buildtool}" /p:Configuration=Release /p:TargetFramework=net46 TS3AudioBot.sln
56+ mono ./nunit/NUnit.ConsoleRunner.*.*.*/tools/nunit3-console.exe ./TS3ABotUnitTests/bin/Release/net46/TS3ABotUnitTests.dll
3657 fi
37- - mono ./nunit/NUnit.ConsoleRunner.*.*.*/tools/nunit3-console.exe ./TS3ABotUnitTests/bin/Release/TS3ABotUnitTests.dll
3858
3959after_success :
40- - export MAIN_DIR=`pwd`
41- - cd ./TS3AudioBot/bin/Release
42- - ls
43- - zip TS3AudioBot.zip NLog.config *.exe *.dll x64/* x86/*
44- - ' export version=`mono TS3AudioBot.exe --version | grep "Version: "`'
45- - " curl -I -H \" Content-Type: application/zip\" -X PUT \" https://splamy.de/api/nightly/ts3ab/${TRAVIS_BRANCH}?token=${uploadkey}&filename=TS3AudioBot.zip&commit=${TRAVIS_COMMIT}&version=${version:9}\" --upload-file ./TS3AudioBot.zip"
46- - cd "$MAIN_DIR"
60+ - |
61+ if [[ $DOTNETCORE = 1 ]]; then
62+ echo "No Task!"
63+ else
64+ export MAIN_DIR=`pwd`
65+ cd ./TS3AudioBot/bin/Release/net46
66+ ls
67+ zip TS3AudioBot.zip NLog.config *.exe *.dll x64/* x86/*
68+ export version=`mono TS3AudioBot.exe --version | grep "Version: "`
69+ curl -I -H "Content-Type: application/zip" -X PUT "https://splamy.de/api/nightly/ts3ab/${TRAVIS_BRANCH}?token=${uploadkey}&filename=TS3AudioBot.zip&commit=${TRAVIS_COMMIT}&version=${version:9}" --upload-file ./TS3AudioBot.zip
70+ cd "$MAIN_DIR"
71+ fi
4772
4873after_script :
4974 - chmod u+x ts3notify.sh
0 commit comments