forked from JustArchiNET/ArchiSteamFarm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
76 lines (61 loc) · 2.05 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
# ASF is a C# project with solution named ArchiSteamFarm.sln
language: csharp
solution: ArchiSteamFarm.sln
# Save bandwidth by limiting git clone to only last 10 commits
git:
depth: 10
# Don't build other branches than master
# Sadly Travis doesn't support AppVeyor's "skip_branch_with_pr"
branches:
only:
- master
# Use latest images for building
group: travis_latest
# This is .NET Core project, we're not building with Mono
mono: none
# ASF requires .NET Core 2.0+
dotnet: 2.1.2
env:
global:
- CONFIGURATION: Release
- DOTNET_CLI_TELEMETRY_OPTOUT: 1
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
- VARIANTS="generic win-x64 linux-x64 linux-arm osx-x64" # NOTE: When modifying variants, don't forget to update ASF_VARIANT definitions in ASF.cs!
before_script:
- |
set -e
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
ulimit -n 1024
fi
dotnet restore
script:
- |
set -e
dotnet build -c "$CONFIGURATION" -o 'out/source' --no-restore /nologo
dotnet test ArchiSteamFarm.Tests -c "$CONFIGURATION" -o 'out/source' --no-build --no-restore
publish() {
if [ "$1" = 'generic' ]; then
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -o "out/${1}" --no-restore /nologo "/p:ASFVariant=$1" /p:LinkDuringPublish=false
else
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -o "out/${1}" -r "$1" --no-restore /nologo "/p:ASFVariant=$1"
fi
if [ -d "ArchiSteamFarm/scripts/${1}" ]; then
cp "ArchiSteamFarm/scripts/${1}/"* "ArchiSteamFarm/out/${1}"
fi
}
for variant in $VARIANTS; do
publish "$variant" &
done
wait
matrix:
# We can use fast finish, as we don't need to wait for allow_failures builds to mark build as success
fast_finish: true
include:
# We're building ASF with dotnet on latest versions of Linux and OS X
- os: linux
# Ref: https://docs.travis-ci.com/user/reference/trusty/
dist: trusty
sudo: false
- os: osx
# Ref: https://docs.travis-ci.com/user/reference/osx/
osx_image: xcode9.2