Files
ArchiSteamFarm/.travis.yml

80 lines
2.4 KiB
YAML
Raw Normal View History

2017-03-13 02:29:02 +01:00
# ASF is a C# project with solution named ArchiSteamFarm.sln
2016-03-23 13:09:17 +01:00
language: csharp
solution: ArchiSteamFarm.sln
2016-03-23 13:26:03 +01:00
2017-01-16 03:03:19 +01:00
# Save bandwidth by limiting git clone to only last 10 commits
2016-03-23 13:26:03 +01:00
git:
depth: 10
# Don't build other branches than master
2017-01-16 03:03:19 +01:00
# Sadly Travis doesn't support AppVeyor's "skip_branch_with_pr"
branches:
only:
2017-03-13 02:33:40 +01:00
- master
2016-04-21 01:02:07 +02:00
2017-12-15 11:05:42 +01:00
# Use latest images for building
group: travis_latest
2018-05-10 21:35:03 +02:00
# ASF is based on .NET Core platform
dotnet: 2.1.300
mono: none
2017-06-27 18:36:40 +02:00
env:
global:
- CONFIGURATION: Release
2017-06-27 18:36:40 +02:00
- DOTNET_CLI_TELEMETRY_OPTOUT: 1
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
- NET_CORE_VERSION: netcoreapp2.1
2018-06-01 21:36:13 +02:00
- VARIANTS="generic linux-arm linux-x64 osx-x64 win-x64" # NOTE: When modifying variants, don't forget to update ASF_VARIANT definitions in SharedInfo.cs!
2017-06-27 18:36:40 +02:00
2017-09-26 08:54:07 +02:00
before_script:
- |
set -e
2017-10-23 22:45:32 +02:00
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
ulimit -n 1024
fi
dotnet --info
2017-07-14 16:55:34 +02:00
2017-06-27 18:36:40 +02:00
script:
2017-07-14 16:55:34 +02:00
- |
set -e
dotnet build ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o 'out/source' /nologo
dotnet test ArchiSteamFarm.Tests -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o 'out/source' /nologo
2017-07-14 16:55:34 +02:00
publish() {
if [ "$1" = 'generic' ]; then
# TODO: Workaround https://github.com/mono/linker/issues/286 until it's resolved
2018-06-04 00:25:22 +02:00
# Don't forget to remove it from docker files too
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o "out/${1}" /nologo "/p:ASFVariant=$1" "/p:LinkDuringPublish=false"
2017-07-14 16:55:34 +02:00
else
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o "out/${1}" -r "$1" /nologo "/p:ASFVariant=$1" "/p:CrossGenDuringPublish=false"
2017-07-14 16:55:34 +02:00
fi
# If we include any helper scripts for this variant, copy them to output directory
2017-09-23 04:43:27 +02:00
if [ -d "ArchiSteamFarm/scripts/${1}" ]; then
cp "ArchiSteamFarm/scripts/${1}/"* "ArchiSteamFarm/out/${1}"
fi
}
for variant in $VARIANTS; do
publish "$variant" &
2017-07-14 16:55:34 +02:00
done
wait
2017-06-27 18:36:40 +02:00
2017-01-17 00:29:47 +01:00
matrix:
2017-07-10 09:02:57 +02:00
# We can use fast finish, as we don't need to wait for allow_failures builds to mark build as success
2017-01-17 00:29:47 +01:00
fast_finish: true
2017-03-13 02:29:02 +01:00
include:
2017-07-10 09:02:57 +02:00
# We're building ASF with dotnet on latest versions of Linux and OS X
2017-03-13 02:29:02 +01:00
- os: linux
# Ref: https://docs.travis-ci.com/user/reference/trusty/
2017-03-13 02:29:02 +01:00
dist: trusty
sudo: false
2017-06-30 08:24:20 +02:00
- os: osx
# Ref: https://docs.travis-ci.com/user/reference/osx/
2018-05-10 21:35:03 +02:00
osx_image: xcode9.3