Files
ArchiSteamFarm/.travis.yml
JustArchi 25bfbf4862 Misc optimization
I like how R# spots multiple enumerations.
2017-07-24 11:13:55 +02:00

60 lines
1.5 KiB
YAML

# 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
# This is .NET Core project, we're not building with Mono
mono: none
# ASF requires .NET Core 2.0+
# TODO: We should target stable 2.0.0 once it's released
dotnet: 2.0.0-preview2-006497
env:
global:
- DOTNET_CLI_TELEMETRY_OPTOUT: 1
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
before_script: dotnet restore
script:
- |
set -e
RUNTIMES="generic win-x64 linux-x64 linux-arm osx-x64"
dotnet build -c Release
dotnet test -c Release --no-build --no-restore ArchiSteamFarm.Tests
for RUNTIME in $RUNTIMES; do
if [ "$RUNTIME" = "generic" ]; then
dotnet publish -c Release -o "out/${RUNTIME}"
else
dotnet publish -c Release -r "$RUNTIME" -o "out/${RUNTIME}"
fi
echo "$RUNTIME" > "ArchiSteamFarm/out/${RUNTIME}/ArchiSteamFarm.version"
done
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