feat(.travis.yml): deploy nightly builds to Github Pages
This commit is contained in:
parent
d68665f7a2
commit
586d355703
3 changed files with 30 additions and 8 deletions
|
|
@ -123,7 +123,8 @@ script:
|
|||
../src || exit
|
||||
- make -j2 || exit
|
||||
- if [[ $TEST != OFF ]]; then yes "A" | ctest -j2 --output-on-failure; fi
|
||||
- if [[ $UPLOAD == ON ]]; then cpack; make package; fi
|
||||
- if [[ $UPLOAD == ON ]]; then cpack; fi
|
||||
- if [[ $UPLOAD == ON && $GH_TOKEN && $TRAVIS_PULL_REQUEST == false && $TRAVIS_BRANCH == master ]]; then bash script/deploy_gh_pages.sh; fi
|
||||
- if [[ $TEST_LEANPKG_REGISTRY == ON ]]; then ../script/test_registry.py; fi
|
||||
- cd ..
|
||||
|
||||
|
|
@ -139,12 +140,11 @@ notifications:
|
|||
|
||||
deploy:
|
||||
provider: releases
|
||||
api_key:
|
||||
secure: NeTKs0tb0hM9yC1lJyc7Y8ev1rfEe9tpY8bS20hUivNKcX8S0HjJh/xtx/3LgrhcqVP0xKuDPE0YNQk3E9SO1ni2ESjIFIVXI/hpDLNjxjfaeW7rcpYcc7dy7ynEP23HnAOMr4PMHs0T/ATsJHKyDXTUi4yrQToBBTQUFvCKgo8=
|
||||
api_key: $GH_TOKEN
|
||||
file: $TARGET
|
||||
skip_cleanup: true
|
||||
overwrite: true
|
||||
on:
|
||||
condition: $UPLOAD = ON
|
||||
condition: $UPLOAD = ON && $GH_TOKEN
|
||||
repo: leanprover/lean
|
||||
tags: true
|
||||
|
|
|
|||
|
|
@ -123,7 +123,8 @@ script:
|
|||
../src || exit
|
||||
- make -j2 || exit
|
||||
- if [[ $TEST != OFF ]]; then yes "A" | ctest -j2 --output-on-failure; fi
|
||||
- if [[ $UPLOAD == ON ]]; then cpack; make package; fi
|
||||
- if [[ $UPLOAD == ON ]]; then cpack; fi
|
||||
- if [[ $UPLOAD == ON && $GH_TOKEN && $TRAVIS_PULL_REQUEST == false && $TRAVIS_BRANCH == master ]]; then bash script/deploy_gh_pages.sh; fi
|
||||
- if [[ $TEST_LEANPKG_REGISTRY == ON ]]; then ../script/test_registry.py; fi
|
||||
- cd ..
|
||||
|
||||
|
|
@ -139,12 +140,11 @@ notifications:
|
|||
|
||||
deploy:
|
||||
provider: releases
|
||||
api_key:
|
||||
secure: NeTKs0tb0hM9yC1lJyc7Y8ev1rfEe9tpY8bS20hUivNKcX8S0HjJh/xtx/3LgrhcqVP0xKuDPE0YNQk3E9SO1ni2ESjIFIVXI/hpDLNjxjfaeW7rcpYcc7dy7ynEP23HnAOMr4PMHs0T/ATsJHKyDXTUi4yrQToBBTQUFvCKgo8=
|
||||
api_key: $GH_TOKEN
|
||||
file: $TARGET
|
||||
skip_cleanup: true
|
||||
overwrite: true
|
||||
on:
|
||||
condition: $UPLOAD = ON
|
||||
condition: $UPLOAD = ON && $GH_TOKEN
|
||||
repo: leanprover/lean
|
||||
tags: true
|
||||
|
|
|
|||
22
script/deploy_gh_pages.sh
Normal file
22
script/deploy_gh_pages.sh
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
# inspired by https://github.com/steveklabnik/automatically_update_github_pages_with_travis_example
|
||||
|
||||
set -eu
|
||||
|
||||
rev=$(git rev-parse --short HEAD)
|
||||
|
||||
|
||||
git clone -b gh-pages "https://$GH_TOKEN@github.com/$TRAVIS_REPO_SLUG.git" gh-pages
|
||||
cd gh-pages
|
||||
|
||||
# "build/lean-3.2.0-linux.tar.gz" ~> "build/lean-nightly-linux.tar.gz"
|
||||
NIGHTLY_TARGET=${TARGET/-*-/-nightly-}
|
||||
mkdir -p build
|
||||
ln ../$TARGET $NIGHTLY_TARGET
|
||||
|
||||
git config user.name "Bot Botson"
|
||||
git config user.email "bot@bot.bot"
|
||||
|
||||
git add -A .
|
||||
git commit -am "nightly build at ${rev}"
|
||||
git push -fq
|
||||
Loading…
Add table
Reference in a new issue