forked from pardeike/Harmony
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
83 lines (73 loc) · 3.16 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Note: Even though dotnet test works in .NET Framework 4+, it apparently still requires mono.
# dotnet test currently doesn't work for .NET Framework 3.5, because:
# 1) Microsoft.NETFramework.ReferenceAssemblies doesn't have a build for it yet: https://github.com/dotnet/core-sdk/issues/2022
# (this has been addressed using workaround mentioned in that issue).
# 2) dotnet test doesn't recognize .NET Framework 3.5 as a valid test project (does not set IsTestProject property for it).
# 3) Even if the above are worked around, dotnet test shows:
# Framework35 is not supported. For projects targeting .Net Framework 3.5, test will run in CLR 4.0 "compatibility mode".
# Also, builds that use mono are currently very slow due to https://github.com/travis-ci/travis-ci/issues/4571
language: csharp
solution: Harmony.sln
os:
- linux
- osx
env:
- netframework=net35
- netframework=net45
- netframework=net472
- netframework=net48
- netframework=netcoreapp3.0
- netframework=netcoreapp3.1
mono:
- latest
- none
# "dotnet: 3.1" works fine for linux, but osx needs the exact version for some reason.
dotnet: 3.1.101
before_install:
- if [ "$TRAVIS_COMMIT_MESSAGE" == "Update documentation" ]; then echo "Skipping documentation only commit" && exit; fi
install:
- dotnet --version
- dotnet restore
script:
- dotnet build --framework ${netframework}
- dotnet test HarmonyTests --framework ${netframework}
- Harmony/Documentation/examples/test-all.sh
jobs:
exclude:
# dotnet test (specifically, .NET Core itself) currently doesn't work with .NET Framework 3.5, so have to use mono + nunit3-console.exe (see include below)
- env: netframework=net35
# We can use dotnet test with .NET Framework 4+, but it apparently still requires mono on non-Windows machines
# (otherwise, dotnet (vs)test outputs this error: Could not find 'mono' host. Make sure that 'mono' is installed on the machine and is available in PATH environment variable.)
- env: netframework=net45
mono: none
- env: netframework=net472
mono: none
- env: netframework=net48
mono: none
# nunit3-console.exe doesn't work with netcoreapp* target frameworks, so must use dotnet test
- env: netframework=netcoreapp3.0
- env: netframework=netcoreapp3.1
mono: latest
include:
- os: linux
env: netframework=net35
mono: latest
install:
- dotnet --version
- dotnet restore
- nuget install NUnit.Console -OutputDirectory testrunner
script:
- msbuild /p:Configuration=Release /p:TargetFrameworks=${netframework}
- mono ./testrunner/NUnit.ConsoleRunner.*/tools/nunit3-console.exe HarmonyTests/bin/Release/${netframework}/HarmonyTests.dll --inprocess
- os: osx
env: netframework=net35
mono: latest
install:
- dotnet --version
- dotnet restore
- nuget install NUnit.Console -OutputDirectory testrunner
script:
- msbuild /p:Configuration=Release /p:TargetFrameworks=${netframework}
- mono ./testrunner/NUnit.ConsoleRunner.*/tools/nunit3-console.exe HarmonyTests/bin/Release/${netframework}/HarmonyTests.dll --inprocess
notifications:
email: false