From 20698404acbad9c5f1365315dfe08d3c84f9b67f Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sun, 30 Aug 2015 14:52:16 -0400 Subject: [PATCH] Build and upload tagged releases to GitHub Releases from CI. --- .travis.yml | 28 ++++++++++++++++++++-------- fabfile.py | 5 +++-- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 30e98f0ba..45e223968 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,26 @@ language: c compiler: - - clang +- clang script: PLATFORM=TESTING make test_long install: - - gem install coveralls-lcov +- gem install coveralls-lcov before_install: - - sudo apt-get update -qq - - if [ `uname -m` = x86_64 ]; then sudo apt-get install -qq -y libgd2-xpm ia32-libs ia32-libs-multiarch; fi - - script/bootstrap.sh - - cd src +- sudo apt-get update -qq +- if [ `uname -m` = x86_64 ]; then sudo apt-get install -qq -y libgd2-xpm ia32-libs + ia32-libs-multiarch; fi +- script/bootstrap.sh +- cd src after_success: - - PLATFORM=TESTING make coverage - - coveralls-lcov build/tests/coverage.info +- PLATFORM=TESTING make coverage +- coveralls-lcov build/tests/coverage.info +deploy: + provider: releases + api_key: + secure: NOSHkTeRCfYcfW6ft8/5xOsEmn0DFrfvJL0UFsDQ9f0dBPoXPMJpgbXr+0i4wbMvwIgAKmJ2SfgvIBcm8IWXhLSMsZiaaTvrbomNgqI8ZIghBdSe6GARaiF/9V/A5l/8zCVMs65Kpo1BssC0BiESpIgoOR/aeF5J6TmCIbUe03k= + before_deploy: echo "n" | fab release:skip_tests=True + skip_cleanup: true + file_glob: true + file: "./release/openxc-vi-firmware-v*.*.*.zip" + on: + repo: openxc/vi-firmware + tags: true diff --git a/fabfile.py b/fabfile.py index 4f51566e5..05ee7aa81 100644 --- a/fabfile.py +++ b/fabfile.py @@ -289,9 +289,10 @@ def current_branch(): return local("git rev-parse --abbrev-ref HEAD", capture=True) @task -def release(): +def release(skip_tests=False): with lcd(env.root_dir): - test() + if not skip_tests: + test() # Make sure this happens after test(), so we move aside and test # signals.cpp