11language : csharp
2+ dist : xenial
23mono :
34 - 5.2.0
45# needed to make travis run the unit tests
@@ -9,8 +10,14 @@ install:
910 - nuget install ./OptimizelySDK.Tests/packages.config -OutputDirectory ./packages
1011 - nuget install NUnit.Runners -Version 2.6.4 -OutputDirectory ./testrunner
1112script :
12- - xbuild /p:Configuration=Release ./OptimizelySDK.Travis.sln
13- - mono ./testrunner/NUnit.Runners.2.6.4/tools/nunit-console.exe ./OptimizelySDK.Tests/bin/Release/OptimizelySDK.Tests.dll
13+ - xbuild /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=$TRAVIS_BUILD_DIR/keypair.snk /p:Configuration=Release ./OptimizelySDK.Travis.sln
14+ - mono ./testrunner/NUnit.Runners.2.6.4/tools/nunit-console.exe ./OptimizelySDK.Tests/bin/Release/OptimizelySDK.Tests.dll
15+ # strongname signing from xbuild step needs additional re-signing with sn
16+ - find . -path './OptimizelySDK*bin/Release/OptimizelySDK*.dll' -not -regex '.*Tests.*' -print0 | while IFS= read -r -d '' file; do sn -R $file ./keypair.snk; done
17+ after_success :
18+ - pip install --user awscli
19+ # upload dll build artifacts to s3 with -unsigned suffix
20+ - ([ ${TRAVIS_BRANCH} = "master" ] && [ ${TRAVIS_EVENT_TYPE} = "push" ]) && find . -path './OptimizelySDK*bin/Release/OptimizelySDK*.dll' -not -regex '.*Tests.*' -print0 | while IFS= read -r -d '' file; do (AWS_ACCESS_KEY_ID=$OFTA_KEY AWS_SECRET_ACCESS_KEY=$OFTA_SECRET AWS_DEFAULT_REGION=$OFTA_REGION aws s3 cp $file s3://optly-fs-travisci-artifacts/${TRAVIS_REPO_SLUG}/${TRAVIS_BUILD_NUMBER}/${TRAVIS_JOB_NUMBER}/$(basename $file)-unsigned); done
1421
1522# Integration tests need to run first to reset the PR build status to pending
1623stages :
@@ -20,7 +27,6 @@ stages:
2027jobs :
2128 include :
2229 - stage : ' Integration tests'
23- merge_mode : replace
2430 env : SDK=csharp
2531 cache : false
2632 language : python
3238 script :
3339 - " ci/trigger_fullstack-sdk-compat.sh"
3440 after_success : travis_terminate 0
41+ - stage : ' NetStandard16'
42+ language : csharp
43+ # dotnet only works on trusty https://github.com/travis-ci/travis-ci/issues/5189
44+ dist : trusty
45+ mono : none
46+ dotnet : 2.1.502
47+ install :
48+ - dotnet restore OptimizelySDK.NetStandard16/OptimizelySDK.NetStandard16.csproj
49+ script :
50+ # strongname signing is taken care of in build step
51+ - dotnet build OptimizelySDK.NetStandard16/OptimizelySDK.NetStandard16.csproj /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=$TRAVIS_BUILD_DIR/keypair.snk
52+ # TODO: no dotnet test yet for NetStandard16
53+ after_success :
54+ - pip install --user awscli
55+ # upload dll build artifacts to s3 with -unsigned suffix
56+ - ([ ${TRAVIS_BRANCH} = "master" ] && [ ${TRAVIS_EVENT_TYPE} = "push" ]) && (AWS_ACCESS_KEY_ID=$OFTA_KEY AWS_SECRET_ACCESS_KEY=$OFTA_SECRET AWS_DEFAULT_REGION=$OFTA_REGION aws s3 cp ./OptimizelySDK.NetStandard16/bin/Debug/netstandard1.6/OptimizelySDK.NetStandard16.dll s3://optly-fs-travisci-artifacts/${TRAVIS_REPO_SLUG}/${TRAVIS_BUILD_NUMBER}/${TRAVIS_JOB_NUMBER}/OptimizelySDK.NetStandard16.dll-unsigned)
0 commit comments