Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis: more appealing thank you message #3858

Merged
merged 11 commits into from Nov 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 25 additions & 3 deletions .ci/travis-lint.sh
Expand Up @@ -2,36 +2,58 @@

# Check formatting using clang-format
echo "Checking your code using clang-format..."

diff="$(./clangify.sh --diff --cf-version)"
err=$?

case $err in
1)
cat <<EOM

***********************************************************
*** ***
*** Your code does not comply with our styleguide. ***
*** Your code does not comply with our style guide. ***
*** ***
*** Please correct it or run the "clangify.sh" script. ***
*** Then commit and push those changes to this branch. ***
*** Check our CONTRIBUTING.md file for more details. ***
*** ***
*** Thank you ***
*** Thank you ❤️ ***
*** ***
***********************************************************

Used clang-format version:
${diff%%
*}

The following changes should be made:
${diff#*
}

Exiting...
EOM
exit 2
;;

0)
echo "Thank you for complying with our code standards."
cat <<EOM

***********************************************************
*** ***
*** Your code complies with our style guide! ***
*** ***
*** Awesome 👍 ***
*** ***
***********************************************************

Exiting...
EOM
exit 0
;;

*)
echo ""
echo "Something went wrong in our formatting checks: clangify returned $err" >&2
echo ""
;;
esac
69 changes: 57 additions & 12 deletions .travis.yml
@@ -1,10 +1,11 @@
os: linux
language: cpp
compiler: gcc

git:
depth: 15

matrix:
jobs:
include:

#Static Code Analysis
Expand All @@ -18,6 +19,7 @@ matrix:
#Ubuntu Bionic (on Docker)
- name: Ubuntu Bionic (Debug + Tests)
if: tag IS NOT present
os: linux
services: docker
env: NAME=UbuntuBionic
cache:
Expand All @@ -31,6 +33,7 @@ matrix:

- name: Ubuntu Bionic (Release)
if: (branch = master AND NOT type = pull_request) OR tag IS present
os: linux
services: docker
env: NAME=UbuntuBionic
cache:
Expand All @@ -43,11 +46,53 @@ matrix:
bash .ci/travis-compile.sh --server --package "$NAME" --release


#macOS
- name: macOS (Debug)
#macOS High Sierra
- name: macOS High Sierra (Debug)
if: tag IS NOT present
os: osx
osx_image: xcode10.1
cache:
- ccache
- directories:
- $HOME/Library/Caches/Homebrew
addons:
homebrew:
packages:
- ccache
- protobuf
- qt
- xz
update: true
script: bash ./.ci/travis-compile.sh --server --install --debug
before_cache:
- brew cleanup

- name: macOS High Sierra (Release)
if: (branch = master AND NOT type = pull_request) OR tag IS present
os: osx
osx_image: xcode10.1
env: OSX_VERSION=10.13
cache:
- ccache
- directories:
- $HOME/Library/Caches/Homebrew
addons:
homebrew:
packages:
- ccache
- protobuf
- qt
- xz
update: true
script: bash ./.ci/travis-compile.sh --server --package "macos$OSX_VERSION" --release
before_cache:
- brew cleanup

#macOS Mojave
- name: macOS Mojave (Debug)
if: tag IS NOT present
os: osx
osx_image: xcode9.2
osx_image: xcode11.1
cache:
- ccache
- directories:
Expand All @@ -64,10 +109,11 @@ matrix:
before_cache:
- brew cleanup

- name: macOS (Release)
- name: macOS Mojave (Release)
if: (branch = master AND NOT type = pull_request) OR tag IS present
os: osx
osx_image: xcode9.2
osx_image: xcode11.1
env: OSX_VERSION=10.14
cache:
- ccache
- directories:
Expand All @@ -80,7 +126,7 @@ matrix:
- qt
- xz
update: true
script: bash ./.ci/travis-compile.sh --server --package "$TRAVIS_OS_NAME" --release
script: bash ./.ci/travis-compile.sh --server --package "macos$OSX_VERSION" --release --zip
before_cache:
- brew cleanup

Expand All @@ -89,11 +135,10 @@ matrix:
deploy:
# Deploy configuration for "beta" releases
- provider: releases
api_key:
token:
secure: mLMF41q7xgOR1sjczsilEy7HQis2PkZCzhfOGbn/8FoOQnmmPOZjrsdhn06ZSl3SFsbfCLuClDYXAbFscQmdgjcGN5AmHV+JYfW650QEuQa/f4/lQFsVRtEqUA1O3FQ0OuRxdpCfJubZBdFVH8SbZ93GLC5zXJbkWQNq+xCX1fU=
skip_cleanup: true
name: "Cockatrice $TRAVIS_TAG"
body: "Beta release of Cockatrice"
release_notes: "Beta release of Cockatrice"
file_glob: true
file: "build/Cockatrice-*"
overwrite: true
Expand All @@ -106,9 +151,8 @@ deploy:

# Deploy configuration for "stable" releases
- provider: releases
api_key:
token:
secure: mLMF41q7xgOR1sjczsilEy7HQis2PkZCzhfOGbn/8FoOQnmmPOZjrsdhn06ZSl3SFsbfCLuClDYXAbFscQmdgjcGN5AmHV+JYfW650QEuQa/f4/lQFsVRtEqUA1O3FQ0OuRxdpCfJubZBdFVH8SbZ93GLC5zXJbkWQNq+xCX1fU=
skip_cleanup: true
file_glob: true
file: "build/Cockatrice-*"
overwrite: true
Expand All @@ -135,4 +179,5 @@ notifications:
# Announcements of build image updates: https://docs.travis-ci.com/user/build-environment-updates/
# For precise versions of preinstalled tools on the VM, check “Build system information” in the build log!
# Official validator for ".travis.yml" config file: https://yaml.travis-ci.org
# Official Travis CI Build Config Explorer: https://config.travis-ci.com/explore
# Travis CI config documentation: https://docs.travis-ci.com/user/customizing-the-build