diff options
author | Pablo Barciela <[email protected]> | 2019-12-07 22:42:44 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-12-08 17:59:44 +0100 |
commit | 8138877b8f12881deec7e40aad9ebbf39e8826a8 (patch) | |
tree | ef899e180a32edb47ee98152db9cf076afe21a19 | |
parent | 9bc9d8a857ea1cc04f074ec6a84440765492ab73 (diff) | |
download | libmatemixer-8138877b8f12881deec7e40aad9ebbf39e8826a8.tar.bz2 libmatemixer-8138877b8f12881deec7e40aad9ebbf39e8826a8.tar.xz |
Travis CI: auto deploy gh-pages
-rw-r--r-- | .travis.yml | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml index 4cc77d1..a1fb85c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,9 +5,14 @@ language: bash services: - docker +branches: + except: + - gh-pages + before_install: - curl -Ls -o docker-build https://github.com/mate-desktop/mate-dev-scripts/raw/master/travis/docker-build - - chmod +x docker-build + - curl -Ls -o gen-index https://github.com/mate-desktop/mate-dev-scripts/raw/master/travis/gen-index.sh + - chmod +x docker-build gen-index install: - sudo apt-get install -y python3-pip python3-setuptools @@ -19,6 +24,16 @@ script: - ./docker-build --name ${DISTRO} --verbose --config .travis.yml --build scripts deploy: + - provider: pages + github-token: $GITHUB_TOKEN + #keep-history: true + skip_cleanup: true + committer-from-gh: true + target-branch: gh-pages + local-dir: html-report + on: + all_branches: true + condition: ${DISTRO} =~ ^fedora.*$ - provider: script script: ./docker-build --verbose --config .travis.yml --release github skip_cleanup: true @@ -26,6 +41,18 @@ deploy: tags: true condition: "${TRAVIS_TAG} =~ ^v.*$ && ${DISTRO} =~ ^fedora.*$" + +after_success: + - 'if [[ "$TRAVIS_SECURE_ENV_VARS" == "true" && "$TRAVIS_PULL_REQUEST" != "false" && ${DISTRO} =~ ^fedora.*$ ]]; then + REPO_SLUG_ARRAY=(${TRAVIS_REPO_SLUG//\// }); + REPO_NAME=${REPO_SLUG_ARRAY[1]}; + URL="https://${REPO_NAME}.mate-desktop.dev"; + COMMENT="Code analysis completed"; + curl -H "Authorization: token $GITHUB_TOKEN" -X POST + -d "{\"state\": \"success\", \"description\": \"$COMMENT\", \"context\":\"scan-build\", \"target_url\": \"$URL\"}" + https://api.github.com/repos/${TRAVIS_REPO_SLUG}/statuses/${TRAVIS_PULL_REQUEST_SHA}; + fi' + env: - DISTRO="archlinux/base" - DISTRO="debian:testing" @@ -70,6 +97,7 @@ requires: - autoconf-archive - clang - clang-analyzer + - cppcheck-htmlreport - gcc - git - make @@ -140,6 +168,11 @@ before_scripts: - make install after_scripts: + - if [ ${DISTRO_NAME} == "fedora" ];then + - cppcheck --xml --output-file=cppcheck.xml --enable=warning,style,performance,portability,information,missingInclude . + - cppcheck-htmlreport --title=${REPO_NAME} --file=cppcheck.xml --report-dir=cppcheck-htmlreport + - ./gen-index -l 20 + - fi - make distcheck releases: |