1
1
language : csharp
2
+ dist : xenial
2
3
mono :
3
4
- 5.2.0
4
5
# needed to make travis run the unit tests
@@ -9,8 +10,14 @@ install:
9
10
- nuget install ./OptimizelySDK.Tests/packages.config -OutputDirectory ./packages
10
11
- nuget install NUnit.Runners -Version 2.6.4 -OutputDirectory ./testrunner
11
12
script :
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
14
21
15
22
# Integration tests need to run first to reset the PR build status to pending
16
23
stages :
@@ -20,7 +27,6 @@ stages:
20
27
jobs :
21
28
include :
22
29
- stage : ' Integration tests'
23
- merge_mode : replace
24
30
env : SDK=csharp
25
31
cache : false
26
32
language : python
32
38
script :
33
39
- " ci/trigger_fullstack-sdk-compat.sh"
34
40
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