diff options
| author | Maxime Dénès | 2017-06-20 08:04:42 +0200 |
|---|---|---|
| committer | Maxime Dénès | 2017-06-20 08:04:42 +0200 |
| commit | 09d958a8c608529f3e646cfb20ceb02d3e850e5e (patch) | |
| tree | 9db51acacb8069dec06afaac5eafb040fadffa7f /dev | |
| parent | 6cc617b570da186c3a80eb5219715bf244c45627 (diff) | |
| parent | d06af26e6cd93c6bb819b38573603a5e1121ed68 (diff) | |
Merge PR#779: Each user overlay goes into its own file.
Diffstat (limited to 'dev')
| -rw-r--r-- | dev/ci/ci-common.sh | 4 | ||||
| -rw-r--r-- | dev/ci/ci-user-overlay.sh | 54 | ||||
| -rw-r--r-- | dev/ci/user-overlays/00669-maximedenes-ssr-merge.sh | 4 | ||||
| -rw-r--r-- | dev/ci/user-overlays/README.md | 14 |
4 files changed, 21 insertions, 55 deletions
diff --git a/dev/ci/ci-common.sh b/dev/ci/ci-common.sh index f1e1515d41..5435e95885 100644 --- a/dev/ci/ci-common.sh +++ b/dev/ci/ci-common.sh @@ -18,7 +18,9 @@ ls "$COQBIN" # Where we clone and build external developments CI_BUILD_DIR=`pwd`/_build_ci -source ${ci_dir}/ci-user-overlay.sh +for overlay in ${ci_dir}/user-overlays/*.sh; do + source ${overlay} +done source ${ci_dir}/ci-basic-overlay.sh mathcomp_CI_DIR=${CI_BUILD_DIR}/math-comp diff --git a/dev/ci/ci-user-overlay.sh b/dev/ci/ci-user-overlay.sh deleted file mode 100644 index b242ce3bd9..0000000000 --- a/dev/ci/ci-user-overlay.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env bash - -# Add user overlays here. You can use some logic to detect if you are -# in your travis branch and conditionally enable the overlay. - -# Some useful Travis variables: -# (https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables) -# -# - TRAVIS_BRANCH: For builds not triggered by a pull request this is -# the name of the branch currently being built; whereas for builds -# triggered by a pull request this is the name of the branch -# targeted by the pull request (in many cases this will be master). -# -# - TRAVIS_COMMIT: The commit that the current build is testing. -# -# - TRAVIS_PULL_REQUEST: The pull request number if the current job is -# a pull request, “false” if it’s not a pull request. -# -# - TRAVIS_PULL_REQUEST_BRANCH: If the current job is a pull request, -# the name of the branch from which the PR originated. "" if the -# current job is a push build. - -echo $TRAVIS_PULL_REQUEST_BRANCH -echo $TRAVIS_PULL_REQUEST -echo $TRAVIS_BRANCH -echo $TRAVIS_COMMIT - -if [ $TRAVIS_PULL_REQUEST == "669" ] || [ $TRAVIS_BRANCH == "ssr-merge" ]; then - mathcomp_CI_BRANCH=ssr-merge - mathcomp_CI_GITURL=https://github.com/maximedenes/math-comp.git -fi - -echo "DEBUG: ci-user-overlay.sh 0" -if [ $TRAVIS_PULL_REQUEST = "707" ] || [ $TRAVIS_BRANCH == "trunk__API__coq_makefile" ]; then - echo "DEBUG: ci-user-overlay.sh 1" - fiat_parsers_CI_BRANCH=trunk__API - fiat_parsers_CI_GITURL=https://github.com/matejkosik/fiat.git -fi - -if [ $TRAVIS_PULL_REQUEST == "498" ] || [ $TRAVIS_BRANCH == "outsource-bignums" ]; then - math_classes_CI_BRANCH=external-bignums - math_classes_CI_GITURL=https://github.com/letouzey/math-classes.git - Corn_CI_BRANCH=external-bignums - Corn_CI_GITURL=https://github.com/letouzey/corn.git -fi - -if [ $TRAVIS_PULL_REQUEST == "220" ] || [ $TRAVIS_BRANCH == "less_init_plugins" ]; then - CompCert_CI_BRANCH=less_init_plugins - CompCert_CI_GITURL=https://github.com/letouzey/CompCert.git - VST_CI_BRANCH=less_init_plugins - VST_CI_GITURL=https://github.com/letouzey/VST.git - fiat_crypto_CI_BRANCH=less_init_plugins - fiat_crypto_CI_GITURL=https://github.com/letouzey/fiat-crypto.git -fi diff --git a/dev/ci/user-overlays/00669-maximedenes-ssr-merge.sh b/dev/ci/user-overlays/00669-maximedenes-ssr-merge.sh new file mode 100644 index 0000000000..af4a96f4ae --- /dev/null +++ b/dev/ci/user-overlays/00669-maximedenes-ssr-merge.sh @@ -0,0 +1,4 @@ +if [ "$TRAVIS_PULL_REQUEST" = "669" ] || [ "$TRAVIS_BRANCH" = "ssr-merge" ]; then + mathcomp_CI_BRANCH=ssr-merge + mathcomp_CI_GITURL=https://github.com/maximedenes/math-comp.git +fi diff --git a/dev/ci/user-overlays/README.md b/dev/ci/user-overlays/README.md new file mode 100644 index 0000000000..9146d3d521 --- /dev/null +++ b/dev/ci/user-overlays/README.md @@ -0,0 +1,14 @@ +# Add overlays for your pull requests in this directory + +An overlay is a file containing very simple logic to test whether we are currently building a specific pull request or git branch (useful so that overlays work on your own fork) and which changes some of the variables whose default can be found in [`ci-basic-overlay.sh`](/dev/ci/ci-basic-overlay.sh). + +The name of your overlay file should be of the form `five_digit_PR_number-GitHub_handle-branch_name.sh`. + +Example: `00669-maximedenes-ssr-merge.sh` containing + +``` +if [ "$TRAVIS_PULL_REQUEST" = "669" ] || [ "$TRAVIS_BRANCH" = "ssr-merge" ]; then + mathcomp_CI_BRANCH=ssr-merge + mathcomp_CI_GITURL=https://github.com/maximedenes/math-comp.git +fi +``` |
