2017-03-13 01:29:02 +00:00
|
|
|
# ASF is a C# project with solution named ArchiSteamFarm.sln
|
2016-03-23 12:09:17 +00:00
|
|
|
language: csharp
|
|
|
|
solution: ArchiSteamFarm.sln
|
2016-03-23 12:26:03 +00:00
|
|
|
|
2017-01-16 02:03:19 +00:00
|
|
|
# Save bandwidth by limiting git clone to only last 10 commits
|
2016-03-23 12:26:03 +00:00
|
|
|
git:
|
|
|
|
depth: 10
|
|
|
|
|
2017-01-06 12:29:53 +00:00
|
|
|
# Don't build other branches than master
|
2017-01-16 02:03:19 +00:00
|
|
|
# Sadly Travis doesn't support AppVeyor's "skip_branch_with_pr"
|
2017-01-06 12:29:53 +00:00
|
|
|
branches:
|
|
|
|
only:
|
2017-03-13 01:33:40 +00:00
|
|
|
- master
|
2016-04-20 23:02:07 +00:00
|
|
|
|
2017-06-27 16:13:53 +00:00
|
|
|
# This is .NET Core project, we're not building with Mono
|
|
|
|
mono: none
|
|
|
|
|
|
|
|
# ASF requires .NET Core 2.0+
|
2017-10-23 10:48:37 +00:00
|
|
|
dotnet: 2.0.0
|
2017-06-27 16:13:53 +00:00
|
|
|
|
2017-06-27 16:36:40 +00:00
|
|
|
env:
|
|
|
|
global:
|
2017-08-18 17:41:17 +00:00
|
|
|
- CONFIGURATION: Release
|
2017-06-27 16:36:40 +00:00
|
|
|
- DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
|
|
|
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
|
2017-08-18 17:41:17 +00:00
|
|
|
- RUNTIMES="generic win-x64 linux-x64 linux-arm osx-x64" # https://github.com/travis-ci/travis-ci/issues/1444
|
2017-06-27 16:36:40 +00:00
|
|
|
|
2017-09-26 06:54:07 +00:00
|
|
|
before_script:
|
|
|
|
- |
|
|
|
|
set -e
|
|
|
|
|
2017-10-23 20:45:32 +00:00
|
|
|
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
|
|
|
ulimit -n 1024
|
|
|
|
fi
|
|
|
|
|
2017-09-26 06:54:07 +00:00
|
|
|
dotnet restore
|
2017-07-14 14:55:34 +00:00
|
|
|
|
2017-06-27 16:36:40 +00:00
|
|
|
script:
|
2017-07-14 14:55:34 +00:00
|
|
|
- |
|
|
|
|
set -e
|
|
|
|
|
2017-08-24 18:13:03 +00:00
|
|
|
dotnet build -c "$CONFIGURATION" -o 'out/source' --no-restore /nologo
|
2017-08-18 17:41:17 +00:00
|
|
|
dotnet test ArchiSteamFarm.Tests -c "$CONFIGURATION" -o 'out/source' --no-build --no-restore
|
2017-07-14 14:55:34 +00:00
|
|
|
|
2017-08-18 17:41:17 +00:00
|
|
|
publish() {
|
|
|
|
if [ "$1" = 'generic' ]; then
|
2017-10-26 21:05:47 +00:00
|
|
|
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -o "out/${1}" --no-restore /nologo /p:LinkDuringPublish=false
|
2017-07-14 14:55:34 +00:00
|
|
|
else
|
2017-08-24 18:13:03 +00:00
|
|
|
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -o "out/${1}" -r "$1" --no-restore /nologo
|
2017-07-14 14:55:34 +00:00
|
|
|
fi
|
|
|
|
|
2017-08-18 17:41:17 +00:00
|
|
|
echo "$1" > "ArchiSteamFarm/out/${1}/ArchiSteamFarm.version"
|
2017-09-23 02:43:27 +00:00
|
|
|
|
|
|
|
if [ -d "ArchiSteamFarm/scripts/${1}" ]; then
|
|
|
|
cp "ArchiSteamFarm/scripts/${1}/"* "ArchiSteamFarm/out/${1}"
|
|
|
|
fi
|
2017-08-18 17:41:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
for RUNTIME in $RUNTIMES; do
|
|
|
|
publish "$RUNTIME" &
|
2017-07-14 14:55:34 +00:00
|
|
|
done
|
2017-08-18 17:41:17 +00:00
|
|
|
wait
|
2017-06-27 16:36:40 +00:00
|
|
|
|
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
|
2017-03-13 01:29:02 +00:00
|
|
|
- os: linux
|
2017-07-24 09:13:55 +00:00
|
|
|
# Ref: https://docs.travis-ci.com/user/reference/trusty/
|
2017-03-13 01:29:02 +00:00
|
|
|
dist: trusty
|
|
|
|
sudo: false
|
2017-06-30 06:24:20 +00:00
|
|
|
- os: osx
|
2017-07-24 09:13:55 +00:00
|
|
|
# Ref: https://docs.travis-ci.com/user/reference/osx/
|
2017-10-08 20:43:51 +00:00
|
|
|
osx_image: xcode9.1
|