ArchiSteamFarm/.travis.yml

89 lines
3.1 KiB
YAML
Raw Normal View History

2018-08-12 15:06:38 +00:00
# ASF is a C# project with a solution file named ArchiSteamFarm.sln
2016-03-23 12:09:17 +00:00
language: csharp
solution: ArchiSteamFarm.sln
2016-03-23 12:26:03 +00:00
2018-08-12 15:06:38 +00:00
# We can save bandwidth by limiting git clone to only last 10 commits
2016-03-23 12:26:03 +00:00
git:
depth: 10
2018-08-12 15:06:38 +00:00
# Use latest images for building: https://blog.travis-ci.com/2017-12-01-new-update-schedule-for-linux-build-images
2017-12-15 10:05:42 +00:00
group: travis_latest
2018-08-12 15:06:38 +00:00
# ASF is based on .NET Core platform, we're not building with Mono
dotnet: 2.2
mono: none
2017-06-27 16:36:40 +00:00
env:
global:
- CONFIGURATION: Release
2017-06-27 16:36:40 +00:00
- DOTNET_CLI_TELEMETRY_OPTOUT: 1
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
- NET_CORE_VERSION: netcoreapp2.2
2018-06-01 19:36:13 +00: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-09-26 06:54:07 +00:00
before_script:
- |
set -eu
2017-09-26 06:54:07 +00:00
2017-10-23 20:45:32 +00:00
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
ulimit -n 1024
fi
dotnet --info
set +u # This is needed to continue Travis build
2017-06-27 16:36:40 +00:00
script:
2017-07-14 14:55:34 +00:00
- |
set -eu
2017-07-14 14:55:34 +00:00
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
set +eu # This is needed to run below npm block on OSX
fi
cd ASF-ui
2018-11-13 17:22:35 +00:00
npm ci
npm run-script deploy
cd ..
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
set -eu # We no longer need +eu on OSX
fi
dotnet build ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o 'out/source' /nologo
dotnet build ArchiSteamFarm.CustomPlugins.ExamplePlugin -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 14:55:34 +00:00
publish() {
if [ "$1" = 'generic' ]; then
2018-09-16 14:24:44 +00:00
# TODO: Workaround https://github.com/mono/linker/issues/286 (don't forget to remove it from docker files too)
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o "out/${1}" --no-restore /nologo "/p:ASFVariant=$1" "/p:LinkDuringPublish=false"
2017-07-14 14:55:34 +00:00
else
2019-01-11 15:48:40 +00:00
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o "out/${1}" -r "$1" --no-restore /nologo "/p:ASFVariant=$1"
2017-07-14 14:55:34 +00:00
fi
2019-01-12 01:00:19 +00:00
# If we include any overlay for this variant, copy it to output directory
if [ -d "ArchiSteamFarm/overlay/${1}" ]; then
cp "ArchiSteamFarm/overlay/${1}/"* "ArchiSteamFarm/out/${1}"
2017-09-23 02:43:27 +00:00
fi
}
dotnet restore ArchiSteamFarm
for variant in $VARIANTS; do
publish "$variant" &
2017-07-14 14:55:34 +00:00
done
wait
set +u # This is needed to continue Travis build
2017-01-16 23:29:47 +00:00
matrix:
2017-07-10 07:02:57 +00:00
# We can use fast finish, as we don't need to wait for allow_failures builds to mark build as success
2017-01-16 23:29:47 +00:00
fast_finish: true
2017-03-13 01:29:02 +00:00
include:
2017-07-10 07:02:57 +00:00
# We're building ASF with dotnet on latest versions of Linux and OS X
2018-08-12 15:06:38 +00:00
# Sadly, travis is still missing support for selecting latest images: https://github.com/travis-ci/travis-ci/issues/8922
2017-03-13 01:29:02 +00:00
- os: linux
2018-11-13 17:04:22 +00:00
# Ref: https://docs.travis-ci.com/user/reference/xenial
dist: xenial
2017-06-30 06:24:20 +00:00
- os: osx
2018-08-12 15:06:38 +00:00
# Ref: https://docs.travis-ci.com/user/reference/osx
2019-01-19 03:18:54 +00:00
dotnet: 2.2.103 # For OSX, we need absolute dotnet version until https://github.com/dotnet/core-setup/issues/4187 is resolved
2018-11-13 17:04:22 +00:00
osx_image: xcode10.1