mirror of
https://github.com/JustArchiNET/ArchiSteamFarm
synced 2024-11-10 15:14:41 +00:00
149a0423ec
And while I'm at it, bump OSX image to see if it helps.
74 lines
2 KiB
YAML
74 lines
2 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+
|
|
dotnet: 2.0.0
|
|
|
|
env:
|
|
global:
|
|
- CONFIGURATION: Release
|
|
- DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
|
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
|
|
- RUNTIMES="generic win-x64 linux-x64 linux-arm osx-x64" # https://github.com/travis-ci/travis-ci/issues/1444
|
|
|
|
before_script:
|
|
- |
|
|
set -e
|
|
|
|
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
|
|
else
|
|
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -o "out/${1}" -r "$1" --no-restore /nologo
|
|
fi
|
|
|
|
echo "$1" > "ArchiSteamFarm/out/${1}/ArchiSteamFarm.version"
|
|
|
|
if [ -d "ArchiSteamFarm/scripts/${1}" ]; then
|
|
cp "ArchiSteamFarm/scripts/${1}/"* "ArchiSteamFarm/out/${1}"
|
|
fi
|
|
}
|
|
|
|
for RUNTIME in $RUNTIMES; do
|
|
publish "$RUNTIME" &
|
|
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
|
|
allow_failures:
|
|
# TODO: Remove me once https://github.com/travis-ci/travis-ci/issues/8552 is fixed
|
|
- os: osx
|
|
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.1
|