Skip to content

Instantly share code, notes, and snippets.

@Olympic1
Created November 26, 2019 16:47
Show Gist options
  • Save Olympic1/d9ee74e29ebf7b42d9ec77a97f694e2d to your computer and use it in GitHub Desktop.
Save Olympic1/d9ee74e29ebf7b42d9ec77a97f694e2d to your computer and use it in GitHub Desktop.
dist: xenial
language: csharp
sudo: required
services:
- docker
# XVFB simulates having a graphical display, which is needed for our GUI tests.
- xvfb
env:
global:
- BUILD_RELEASE_MONO_VERSION=5.16.0
- DOCKERHUB_USERNAME=kspckanbuilder
- secure: "UGXJG9jB9tGwjJXxG0Beu4Poz0leuiCBItnfTTKRm1a/NxXf1eoOH9p9icY5Ur2xHwqh0uWSznuL2aNr58CXtzTcMpXrcUhRsO63FB3Cz6tSdZEb+pKQJ23zmC9929DklKRGUT2D/eBcJcnV+/eAtkarrfLBU1avUQAVJgqXvMI="
- AWS_DEFAULT_REGION=us-west-2
- AWS_ACCESS_KEY_ID=AKIAZA4K6RW77XSCAMI2
- secure: "F4Ee6zQoAjG8a7n7c+wbeWMMzx00bQ/ci5rhKE7EZeMTYsvuiMSorUb4ShvRqbnuLKQH7NxOibnsQHXuQqUw6ZYyESU1xnFAYwhDRQrTdwPOrAOOiUzOhjB4yp3mdzMa8VOcFUUzk+QyrYpds3EUQAqE1a3Ht9Aji586QgK+sY8="
matrix:
- BUILD_CONFIGURATION=Debug
- BUILD_CONFIGURATION=Release
mono:
- 5.20.1
- 5.16.0
- 5.14.0
- 5.12.0
matrix:
include:
- env: BUILD_CONFIGURATION=Debug_NetCore
mono: latest
dotnet: 2.1
- env: BUILD_CONFIGURATION=Release_NetCore
mono: latest
dotnet: 2.1
addons:
apt:
packages:
- git
- mono-devel
- ca-certificates
# Stuff for building OSX DMGs
- make
- sed
- libplist-utils
- xorriso
# Stuff for building .deb files
- gzip
- fakeroot
- dpkg
- lintian
# Stuff for building .rpm files
- rpm
script:
- ./build --configuration=$BUILD_CONFIGURATION
- ./build test+only --configuration=$BUILD_CONFIGURATION --where="Category!=FlakyNetwork"
# We run ~10 builds, but only the one that deploys needs a .app bundle or .deb file
before_deploy:
- ./build osx
- ./build deb
- ./build rpm
- echo "$DOCKERHUB_PASSWORD" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
deploy:
# Releases (which are tagged) go to github
- provider: releases
skip_cleanup: true
api_key:
secure: AjwbRLStNJZb9hAOLfRLK85KlFo2q2Dr1NKCoDS4elek1nqSiOjL1hH0kDgUMx/PJqQVnFU8tbJPL30t9Pj7jcJhp0LhbbPipQE3TCSpafTneSEbdz5HT+OdghWCZhUhfs07wGNTFUwcAO4WBZ7wv1AnfdfogHdA5RMdykiIl38=
file_glob: true
file:
- _build/repack/$BUILD_CONFIGURATION/ckan.exe
- _build/osx/CKAN.dmg
- _build/deb/ckan_*.deb
- _build/rpm/RPMS/noarch/ckan*.rpm
- _build/out/AutoUpdater/$BUILD_CONFIGURATION/bin/AutoUpdater.exe
on:
repo: KSP-CKAN/CKAN
tags: true
condition: $BUILD_CONFIGURATION = Release && $(mono --version | perl -ne'/version (\d+\.\d+\.\d+)/ and print $1') = $BUILD_RELEASE_MONO_VERSION
# all_branches needed as a workaround for travis-ci#1675
all_branches: true
# Any merge to master gets sent to
# http://ckan-travis.s3-website-us-east-1.amazonaws.com/
- provider: s3
skip_cleanup: true
access_key_id: AKIAI5JWAEFPFK6GH3XA
secret_access_key:
secure: b0PPlD7auqysK2LHA8N1US03dE/VKH2rOTwIqpIh50l/gURuXEl7Nd8S7qlf2dpEmz+8D5pIWD+J9scfrdD8Uuakhi3sQbqcV26UiR6+Ye06eGQfmIzqzAECt2naqEy7VJ/xrqq5aaaf8QhcOQMba3qVvwDSzkB2fJeh7+D6EY8=
bucket: ckan-travis
acl: public_read
local_dir: _build/repack/$BUILD_CONFIGURATION
on:
repo: KSP-CKAN/CKAN
branch: master
condition: $BUILD_CONFIGURATION = Release && $(mono --version | perl -ne'/version (\d+\.\d+\.\d+)/ and print $1') = $BUILD_RELEASE_MONO_VERSION
# Rebuild + Publish Netkan on every merge to master
- provider: script
skip_cleanup: true
script: ./build docker-inflator
on:
repo: KSP-CKAN/CKAN
branch: master
condition: $BUILD_CONFIGURATION = Release && $(mono --version | perl -ne'/version (\d+\.\d+\.\d+)/ and print $1') = $BUILD_RELEASE_MONO_VERSION
after_success:
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
- chmod +x send.sh
- if [ "$BUILD_CONFIGURATION" = "Release" ] && [ "$(mono --version | perl -ne'/version (\d+\.\d+\.\d+)/ and print $1')" = "$BUILD_RELEASE_MONO_VERSION" ] && [ "$TRAVIS_BRANCH" = "master" ]; then ./send.sh success $WEBHOOK_URL; fi
after_failure:
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
- chmod +x send.sh
- ./send.sh failure $WEBHOOK_URL
notifications:
irc:
channels:
- "irc.esper.net#ckan-ci"
template:
- "%{repository_name}#%{build_number} (%{branch} - %{commit} : %{author}): %{message}"
- "Change view : %{compare_url}"
- "Build details : %{build_url}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment