From e7aff62c1bdfa287ee576a518c97e0e1f4b61c20 Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Tue, 22 Oct 2019 16:36:52 +0200 Subject: [PATCH 01/40] Add .autosave to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 564fdfa..52d2fa1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ *.orig *.log .*.swp +*.autosave From e6c3f6f0168671564b6bb7d4d3057e66392aadc2 Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Sat, 5 Oct 2019 17:12:25 -0400 Subject: [PATCH 02/40] Use cache if BASE is a tag (release) --- .travis.yml.example-full | 8 ++++++ defaults.set | 1 + travis-prepare.sh | 59 ++++++++++++++++++++++++++++++---------- 3 files changed, 53 insertions(+), 15 deletions(-) create mode 100644 defaults.set diff --git a/.travis.yml.example-full b/.travis.yml.example-full index 0f31f88..442c46d 100644 --- a/.travis.yml.example-full +++ b/.travis.yml.example-full @@ -5,6 +5,14 @@ language: cpp compiler: gcc dist: xenial +cache: + directories: + - $HOME/.cache + +env: + global: + - SETUP_PATH=.ci-local:.ci + addons: apt: packages: diff --git a/defaults.set b/defaults.set new file mode 100644 index 0000000..da493e8 --- /dev/null +++ b/defaults.set @@ -0,0 +1 @@ +BASE_REPO=https://github.com/epics-base/epics-base.git diff --git a/travis-prepare.sh b/travis-prepare.sh index f5e30fd..5e0912a 100755 --- a/travis-prepare.sh +++ b/travis-prepare.sh @@ -1,23 +1,41 @@ #!/bin/sh set -e -x -CURDIR="$PWD" +SETUP_DIRS=$(echo $SETUP_PATH | tr ":" "\n") -# determine if BASE is a release or a branch -git ls-remote --quiet --exit-code --tags https://github.com/${REPOBASE:-epics-base}/epics-base.git "$BASE" && BASE_RELEASE=YES -git ls-remote --quiet --exit-code --heads https://github.com/${REPOBASE:-epics-base}/epics-base.git "$BASE" && BASE_BRANCH=YES +source_set() { + SETFILE=$1 + for set_dir in ${SETUP_DIRS} + do + if [ -e $set_dir/$SETFILE.set ] + then + source $set_dir/$SETFILE.set + fi + done +} + +source_set defaults + +CURDIR="$PWD" +CACHEDIR="$HOME/.cache" +SOURCEDIR="$HOME/.source" + +# determine if BASE points to a release or a branch +git ls-remote --quiet --exit-code --tags "$BASE_REPO" "$BASE" && BASE_RELEASE=YES +git ls-remote --quiet --exit-code --heads "$BASE_REPO" "$BASE" && BASE_BRANCH=YES if [ "$BASE_RELEASE" = "YES" ] then - # TODO: use a cached location - BASE_LOCATION=$HOME/.source/epics-base + BASE_LOCATION=$CACHEDIR/epics-base + BASE_RECURSIVE="--recursive" else if [ "$BASE_BRANCH" = "YES" ] then - BASE_LOCATION=$HOME/.source/epics-base + BASE_LOCATION=$SOURCEDIR/epics-base + BASE_RECURSIVE= else - echo $BASE is neither a tag nor a branch name for BASE - exit 1 + echo $BASE is neither a tag nor a branch name for BASE + exit 1 fi fi @@ -25,9 +43,6 @@ cat << EOF > $CURDIR/configure/RELEASE.local EPICS_BASE=$BASE_LOCATION EOF -install -d "$HOME/.source" -cd "$HOME/.source" - add_gh_flat() { MODULE=$1 REPOOWNER=$2 @@ -42,9 +57,23 @@ ${MODULE_UC}=$HOME/.source/$MODULE EOF } -# not recursive -git clone --quiet --depth 5 --branch "$BASE" https://github.com/${REPOBASE:-epics-base}/epics-base.git epics-base +if [ "$BASE_RELEASE" = "YES" ] +then + mkdir -s "$CACHEDIR" + cd "$CACHEDIR" + BASE_MODULE= +else + mkdir -s "$SOURCEDIR" + cd "$SOURCEDIR" + BASE_MODULE=epics-base +fi + +git clone --quiet --depth 5 $BASE_RECURSIVE --branch "$BASE" $BASE_REPO epics-base (cd epics-base && git log -n1 ) + +mkdir -s "$SOURCEDIR" +cd "$SOURCEDIR" + for modrepo in ${MODULES} do module=${modrepo%CPP} @@ -152,7 +181,7 @@ CROSS_COMPILER_TARGET_ARCHS += RTEMS-pc386-qemu EOF fi -for modrepo in epics-base ${MODULES} +for modrepo in ${BASE_MODULE} ${MODULES} do module=${modrepo%CPP} make -j2 -C $module $EXTRA From fe7647545dcc6094dbb514f8d3222c6109049809 Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Thu, 17 Oct 2019 14:27:34 +0200 Subject: [PATCH 03/40] Move travis scripts into travis subdirectory --- README.md | 91 ++++++++++--------- .../.travis.yml.example-full | 6 +- .../.travis.yml.example-mini | 4 +- travis/README.md | 35 +++++++ travis-build.sh => travis/build.sh | 0 travis-prepare.sh => travis/prepare.sh | 0 6 files changed, 88 insertions(+), 48 deletions(-) rename .travis.yml.example-full => travis/.travis.yml.example-full (95%) rename .travis.yml.example-mini => travis/.travis.yml.example-mini (88%) create mode 100644 travis/README.md rename travis-build.sh => travis/build.sh (100%) rename travis-prepare.sh => travis/prepare.sh (100%) diff --git a/README.md b/README.md index 4cb7568..b062b03 100644 --- a/README.md +++ b/README.md @@ -1,62 +1,67 @@ # Continuous Integration Scripts for EPICS Modules -The scripts in this repository are intended to provide a common, +The scripts inside this repository are intended to provide a common, easy-to-use and flexible way to add Continuous Integration to EPICS -software modules, e.g. Device Support modules. +software modules, e.g. Device or Driver Support modules. -By including this repository as a Git Submodule, your module will -always use an explicit commit, i.e. a fixed version of the scripts. -That ensures that further development of these scripts cannot break -your setup. +By including this repository as a Git Submodule, you will be able to +use the same flexible, powerful CI setup that EPICS Bases uses, +including a mechanism to specify sets of dependent modules +(with versions) that you want to compile your module against. -## Travis-CI +By using the submodule mechnism, your module will always use an +explicit commit, i.e. a fixed version of the scripts. +This ensures that any further development of the ci-scripts will +never break existing use. -### Features +## This Repository - - Compile against different branches or releases of EPICS Base - - Use different versions of compilers (gcc, clang) - - Cross-compile for Windows 32bit and 64bit using MinGW and WINE - - Cross-compile for RTEMS 4.9 and 4.10 - - Compile on MacOS +In addition to the scripts themselves (in the subdirectories), +this repository contains the test suite that is used to verify +functionality and features of the ci-scripts. + +You are welcome to use the test suite as a reference, but keep in +mind that in your module the path to the scripts has one level more +(e.g., `./travis/abc` here would be `./.ci/travis/abc` in your +module). +Also, a test suite might not show the same level of quality as an +example. + +## Supported CI Services + + - Travis-CI -### How to Use these Scripts +### How to Use the CI-Scripts - 1. Get an account on [Travis-CI](https://travis-ci.org/), connect - it to your GitHub account and activate your support module's - repository. For more details, please refer to the - [Travis-CI Tutorial](https://docs.travis-ci.com/user/tutorial/). - Make sure to use `travis-ci.org` and not their `.com` site. + 1. Get an account on a supported CI service provider platform. + (More details in the specific README of the subdirectory.) - 1. In your Support Module, add this respository as a Git Submodule - (name suggestion: `.ci`). + 2. In your Support Module, add this ci-scripts respository + as a Git Submodule (name suggestion: `.ci`). ``` $ git submodule add https://github.com/epics-base/ci-scripts .ci ``` - - 1. Create a Travis configuration by copying one of the examples. - ``` - $ cp .ci/.travis.yml.example-full .travis.yml - ``` - - 1. Edit the `.travis.yml` configuration to include the jobs you want - Travis to run. - - 1. Push your changes and check - [travis-ci.org](https://travis-ci.org/) for your build results. -## Releases and Numbering + 3. Create a configuration for the CI service by copying one of + the examples provided in the service specific subdirectory + and editing it to include the jobs you want the service to run. + + 4. Push your changes and check the CI service for your build results. + +## Releases and Numbering of this Module Major release numbers refer to the API, which is more or less defined -by the `.travis.yml.example-full` configuration example. -Changing this file for the existing configuration options or to add -new configurations options will usually cause a new major release. +by the full configuration examples in the service specific +subdirectories. +If one of these files has to be changed for the existing configuration +options or new options are being added, a new major release is created. -Minor release numbers refer to bugfixes that should not require a user -module (i.e., its `.travis.yml`) to be changed. +Minor release numbers refer to bugfixes that should not require the +configuration inside a user module to be changed. -Again: using git submodule to include these scripts means that user -modules always work with a fixed, frozen version of these scripts. -I.e., developments in the ci-scripts will never break an existing -application. +Again: using the git submodule mechanism to include these scripts means +that user modules always work with a fixed, frozen version. +I.e., developments in the ci-scripts repository will never break an\ +existing application. These release numbering considerations are just a hint to assess the -risk when updating the submodule. +risks when updating the submodule. diff --git a/.travis.yml.example-full b/travis/.travis.yml.example-full similarity index 95% rename from .travis.yml.example-full rename to travis/.travis.yml.example-full index 442c46d..1bb4158 100644 --- a/.travis.yml.example-full +++ b/travis/.travis.yml.example-full @@ -24,14 +24,14 @@ addons: - qemu-system-x86 install: - - ./.ci/travis-prepare.sh + - ./.ci/travis/prepare.sh script: - - ./.ci/travis-build.sh + - ./.ci/travis/build.sh # If you need to do more during install and build, # add a local directory to your module and do e.g. -# - ./.ci-local/travis-install-extras.sh +# - ./.ci-local/travis/install-extras.sh # Define build jobs diff --git a/.travis.yml.example-mini b/travis/.travis.yml.example-mini similarity index 88% rename from .travis.yml.example-mini rename to travis/.travis.yml.example-mini index 209c093..d04a9df 100644 --- a/.travis.yml.example-mini +++ b/travis/.travis.yml.example-mini @@ -15,10 +15,10 @@ addons: - perl install: - - ./.ci/travis-prepare.sh + - ./.ci/travis/prepare.sh script: - - ./.ci/travis-build.sh + - ./.ci/travis/build.sh # Build using default gcc for Base branches 7.0 and 3.15 diff --git a/travis/README.md b/travis/README.md new file mode 100644 index 0000000..632e63e --- /dev/null +++ b/travis/README.md @@ -0,0 +1,35 @@ +# Travis-CI Scripts for EPICS Modules + +## Features + + - Compile against different branches or releases of EPICS Base + - Use different versions of compilers (gcc, clang) + - Cross-compile for Windows 32bit using MinGW and WINE + - Cross-compile for RTEMS 4.9 and 4.10 + - Compile on MacOS + +## How to Use these Scripts + + 1. Get an account on [Travis-CI](https://travis-ci.org/), connect + it to your GitHub account and activate your support module's + repository. For more details, please refer to the + [Travis-CI Tutorial](https://docs.travis-ci.com/user/tutorial/). + Make sure to use `travis-ci.org` and not their `.com` site. + + 2. In your Support Module, add this respository as a Git Submodule + (name suggestion: `.ci`). + ``` + $ git submodule add https://github.com/epics-base/ci-scripts .ci + ``` + + 3. Create a Travis configuration by copying one of the examples into + the root directory of your module. + ``` + $ cp .ci/travis/.travis.yml.example-full .travis.yml + ``` + + 4. Edit the `.travis.yml` configuration to include the jobs you want + Travis to run. + + 5. Push your changes and check + [travis-ci.org](https://travis-ci.org/) for your build results. diff --git a/travis-build.sh b/travis/build.sh similarity index 100% rename from travis-build.sh rename to travis/build.sh diff --git a/travis-prepare.sh b/travis/prepare.sh similarity index 100% rename from travis-prepare.sh rename to travis/prepare.sh From 7c7f16181cf25720595aa83fc15c3bdee0d4277f Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Tue, 22 Oct 2019 14:41:58 +0200 Subject: [PATCH 04/40] travis: comment dependency packages in full example --- travis/.travis.yml.example-full | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/travis/.travis.yml.example-full b/travis/.travis.yml.example-full index 1bb4158..7f7ac45 100644 --- a/travis/.travis.yml.example-full +++ b/travis/.travis.yml.example-full @@ -16,11 +16,15 @@ env: addons: apt: packages: + # for all EPICS builds - libreadline6-dev - libncurses5-dev - perl + # for clang compiler - clang + # for mingw builds (32bit and 64bit) - g++-mingw-w64-i686 + # for RTEMS cross builds - qemu-system-x86 install: From 96ba1e2e4ad8e3094cb7b695d4be8820ac57d834 Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Wed, 23 Oct 2019 16:42:02 +0200 Subject: [PATCH 05/40] Add first set of defaults --- defaults.set | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/defaults.set b/defaults.set index da493e8..9deaf3d 100644 --- a/defaults.set +++ b/defaults.set @@ -1 +1,33 @@ -BASE_REPO=https://github.com/epics-base/epics-base.git +# EPICS Base +BASE_DIRNAME=base +BASE_REPONAME=epics-base +BASE_REPOOWNER=epics-base +BASE_VARNAME=EPICS_BASE + +PVDATA_DIRNAME=pvData +PVDATA_REPONAME=pvDataCPP +PVDATA_REPOOWNER=epics-base + +PVACCESS_DIRNAME=pvAccess +PVACCESS_REPONAME=pvAccessCPP +PVACCESS_REPOOWNER=epics-base + +NTYPES_DIRNAME=normativeTypes +NTYPES_REPONAME=normativeTypesCPP +NTYPES_REPOOWNER=epics-base + +# Sequencer +SNCSEQ_REPOURL=https://www-csr.bessy.de/control/SoftDist/sequencer/repo/branch-2-2.git +SNCSEQ_DEPTH=0 +SNCSEQ_DIRNAME=seq + +# StreamDevice +STREAM_REPONAME=StreamDevice +STREAM_REPOOWNER=paulscherrerinstitute + +# Default settings work (and are tested) for: +# asyn +# std +# calc +# autosave +# busy From 8232bccba23c861fa072d1d6311088d5746a2f3d Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Wed, 23 Oct 2019 16:09:27 +0200 Subject: [PATCH 06/40] travis: add dummy test --- .travis.yml | 55 +++++++++++++++++++++++++++++++++++++++++++++++ test01.set | 5 +++++ travis-test.sh | 4 ++++ travis/prepare.sh | 6 +++++- 4 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 .travis.yml create mode 100644 test01.set create mode 100755 travis-test.sh diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..0fa36bd --- /dev/null +++ b/.travis.yml @@ -0,0 +1,55 @@ +# .travis.xml for testing EPICS Base ci-scripts +# (see: https://github.com/epics-base/ci-scripts) + +# Note: +# Paths to scripts are different in this test configuration +# (your module has one more directory level: .ci) + +language: cpp +compiler: gcc +dist: xenial + +cache: + directories: + - $HOME/.cache + +env: + global: + - SETUP_PATH=.:.ci + +addons: + apt: + packages: + - libreadline6-dev + - libncurses5-dev + - perl + - clang + - g++-mingw-w64-i686 + - qemu-system-x86 + +install: + - ./travis/prepare.sh + +script: + - ./travis-test.sh + +# If you need to do more during install and build, +# add a local directory to your module and do e.g. +# - ./.ci-local/travis/install-extras.sh + +# Define build jobs + +# Well-known variables to use +# BASE branch or release tag name of the EPICS Base to use +# EXTRA content will be added to make command line +# STATIC set to YES for static build (default: NO) +# TEST set to NO to skip running the tests (default: YES) + +matrix: + include: + +# Different configurations of default gcc and clang + + - env: BASE=3.15 + + - env: SET=test01 diff --git a/test01.set b/test01.set new file mode 100644 index 0000000..4034f3d --- /dev/null +++ b/test01.set @@ -0,0 +1,5 @@ +MODULES="sncseq asyn" + +BASE=R3.15.6 +ASYN=master +SNCSEQ=R2-2-7 diff --git a/travis-test.sh b/travis-test.sh new file mode 100755 index 0000000..b1d502c --- /dev/null +++ b/travis-test.sh @@ -0,0 +1,4 @@ +#!/bin/sh +set -e -x + +echo Testing the dependency setup diff --git a/travis/prepare.sh b/travis/prepare.sh index 5e0912a..e816677 100755 --- a/travis/prepare.sh +++ b/travis/prepare.sh @@ -74,7 +74,11 @@ git clone --quiet --depth 5 $BASE_RECURSIVE --branch "$BASE" $BASE_REPO epics-ba mkdir -s "$SOURCEDIR" cd "$SOURCEDIR" -for modrepo in ${MODULES} + +# Check out dependencies +# ---------------------- + +for mod in BASE $MODULES do module=${modrepo%CPP} module_uc=$(echo $module | tr 'a-z' 'A-Z') From 4a418e86817aba352bfbb7ea042200d099635d8e Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Tue, 22 Oct 2019 15:21:42 +0200 Subject: [PATCH 07/40] travis: rewrite of prepare.sh --- travis/prepare.sh | 335 ++++++++++++++++++++++++++++++---------------- 1 file changed, 218 insertions(+), 117 deletions(-) diff --git a/travis/prepare.sh b/travis/prepare.sh index e816677..354140a 100755 --- a/travis/prepare.sh +++ b/travis/prepare.sh @@ -3,190 +3,291 @@ set -e -x SETUP_DIRS=$(echo $SETUP_PATH | tr ":" "\n") +# Travis log fold control +# from https://github.com/travis-ci/travis-rubies/blob/build/build.sh + +fold_start() { + echo "travis_fold:start:$1\033[33;1m$2\033[0m" +} + +fold_end() { + echo "\ntravis_fold:end:$1\r" +} + +# source_set(settings) +# +# Source a settings file (extension .set) found in the SETUP_DIRS path +# May be called recursively (from within a settings file) source_set() { - SETFILE=$1 + local set_file=$1 + local set_dir for set_dir in ${SETUP_DIRS} do - if [ -e $set_dir/$SETFILE.set ] + if [ -e $set_dir/$set_file.set ] then - source $set_dir/$SETFILE.set + echo "Loading setup file $set_dir/$set_file.set" + . $set_dir/$set_file.set + break fi done } -source_set defaults +# update_release_local(varname, place) +# varname name of the variable to set in RELEASE.local +# place place (absolute path) of where variable should point to +# +# Manipulate RELEASE.local in the cache location: +# - replace "$varname=$place" line if it exists and has changed +# - otherwise add "$varname=$place" line and possibly move EPICS_BASE=... line to the end +update_release_local() { + local var=$1 + local place=$2 + local release_local=${CACHEDIR}/RELEASE.local + local updated_line="${var}=${place}" + + local ret=0 + [ -e ${release_local} ] && grep -q "${var}=" ${release_local} || ret=$? + if [ $ret -eq 0 ] + then + existing_line=$(grep "${var}=" ${release_local}) + if [ "${existing_line}" != "${updated_line}" ] + then + sed -i "s|${var}=.*|${var}=${place}|g" ${release_local} + fi + else + echo "$var=$place" >> ${release_local} + grep -q "EPICS_BASE=" ${release_local} || ret=$? + if [ $ret -eq 0 ] + then + base_line=$(grep "EPICS_BASE=" ${release_local}) + sed -i 's|EPICS_BASE=||g' ${release_local} + echo ${base_line} >> ${release_local} + fi + fi +} + +# add_dependency(dep, tag) +# +# Add a dependency to the cache or source area: +# - if $tag is a branch name, check out flat (no submodules) in the SOURCE area +# - if $tag is a release name, check out recursive (w/ submodules) in the CACHE area +# unless it already exists +# - Defaults: +# $dep_DIRNAME = lower case ($dep) +# $dep_REPONAME = lower case ($dep) +# $dep_REPOURL = GitHub / $dep_REPOOWNER (or $REPOOWNER or epics-modules) / $dep_REPONAME .git +# $dep_VARNAME = $dep +# $dep_DEPTH = 5 +# - Add $dep_VARNAME line to the RELEASE.local file in the cache area (unless already there) +# - Add full path to $modules_to_compile +add_dependency() { + curdir="$PWD" + DEP=$1 + TAG=$2 + dep_lc=$(echo $DEP | tr 'A-Z' 'a-z') + eval dirname=\${${DEP}_DIRNAME:=${dep_lc}} + eval reponame=\${${DEP}_REPONAME:=${dep_lc}} + eval repourl=\${${DEP}_REPOURL:="https://github.com/\${${DEP}_REPOOWNER:=${REPOOWNER:-epics-modules}}/${reponame}.git"} + eval varname=\${${DEP}_VARNAME:=${DEP}} + + # determine if BASE points to a release or a branch + git ls-remote --quiet --exit-code --tags $repourl "$TAG" && tagtype=release + git ls-remote --quiet --exit-code --heads $repourl "$TAG" && tagtype=branch + + case "${tagtype}" in + "release" ) + location=${CACHEDIR} + recursive="--recursive" + ;; + "branch" ) + location=${SOURCEDIR} + recursive="" + ;; + * ) + echo "$TAG is neither a tag nor a branch name for $DEP ($repourl)" + exit 1 + ;; + esac + + if [ ! -e $location/$dirname-$TAG ] + then + cd $location + eval depth=\${${DEP}_DEPTH:-"-1"} + case ${depth} in + -1 ) + deptharg="--depth 5" + ;; + 0 ) + deptharg="" + ;; + * ) + deptharg="--depth $depth" + ;; + esac + eval git clone --quiet $deptharg $recursive --branch "$TAG" $repourl $dirname-$TAG + ( cd $dirname-$TAG && git log -n1 ) + modules_to_compile="${modules_to_compile} $location/$dirname-$TAG" + cd "$curdir" + fi + update_release_local ${varname} $location/$dirname-$TAG +} CURDIR="$PWD" CACHEDIR="$HOME/.cache" SOURCEDIR="$HOME/.source" -# determine if BASE points to a release or a branch -git ls-remote --quiet --exit-code --tags "$BASE_REPO" "$BASE" && BASE_RELEASE=YES -git ls-remote --quiet --exit-code --heads "$BASE_REPO" "$BASE" && BASE_BRANCH=YES +# Load settings +# ------------- -if [ "$BASE_RELEASE" = "YES" ] -then - BASE_LOCATION=$CACHEDIR/epics-base - BASE_RECURSIVE="--recursive" -else - if [ "$BASE_BRANCH" = "YES" ] - then - BASE_LOCATION=$SOURCEDIR/epics-base - BASE_RECURSIVE= - else - echo $BASE is neither a tag nor a branch name for BASE - exit 1 - fi -fi +fold_start load.settings "Loading settings" -cat << EOF > $CURDIR/configure/RELEASE.local -EPICS_BASE=$BASE_LOCATION -EOF +# load default settings for well-known modules +source_set defaults -add_gh_flat() { - MODULE=$1 - REPOOWNER=$2 - REPONAME=$3 - BRANCH=$4 - MODULE_UC=$5 - ( git clone --quiet --depth 5 --branch $BRANCH https://github.com/$REPOOWNER/$REPONAME.git $MODULE && \ - cd $MODULE && git log -n1 ) - cat < $CURDIR/configure/RELEASE.local > $MODULE/configure/RELEASE.local - cat << EOF >> $CURDIR/configure/RELEASE.local -${MODULE_UC}=$HOME/.source/$MODULE -EOF -} - -if [ "$BASE_RELEASE" = "YES" ] -then - mkdir -s "$CACHEDIR" - cd "$CACHEDIR" - BASE_MODULE= -else - mkdir -s "$SOURCEDIR" - cd "$SOURCEDIR" - BASE_MODULE=epics-base -fi - -git clone --quiet --depth 5 $BASE_RECURSIVE --branch "$BASE" $BASE_REPO epics-base -(cd epics-base && git log -n1 ) - -mkdir -s "$SOURCEDIR" -cd "$SOURCEDIR" +# source configured settings +[ -z "${SET+x}" ] || source_set $SET +fold_end load.settings # Check out dependencies # ---------------------- +fold_start check.out.dependencies "Checking out dependencies" + +mkdir -p $SOURCEDIR + for mod in BASE $MODULES do - module=${modrepo%CPP} - module_uc=$(echo $module | tr 'a-z' 'A-Z') - eval add_gh_flat $module \${REPO${module_uc}:-epics-base} $modrepo \${BR${module_uc}:-master} $module_uc + mod_uc=$(echo $mod | tr 'a-z' 'A-Z') + eval add_dependency $mod_uc \${${mod_uc}:-master} done +cp ${CACHEDIR}/RELEASE.local ${SOURCEDIR}/RELEASE.local +[ -e ./configure ] && cp ${CACHEDIR}/RELEASE.local ./configure/RELEASE.local -if [ -e $CURDIR/configure/RELEASE.local ] +fold_end check.out.dependencies + +# Set up compiler +# --------------- + +fold_start set.up.compiler "Setting up compiler" + +eval $(grep "EPICS_BASE=" ${CACHEDIR}/RELEASE.local) + +[ "$EPICS_HOST_ARCH" ] || EPICS_HOST_ARCH=$(sh $EPICS_BASE/startup/EpicsHostArch) + +if echo ${modules_to_compile} | grep -q "$EPICS_BASE" then - cat $CURDIR/configure/RELEASE.local -fi -[ "$EPICS_HOST_ARCH" ] || EPICS_HOST_ARCH=`sh epics-base/startup/EpicsHostArch` - -# requires wine and g++-mingw-w64-i686 -if [ "$WINE" = "32" ] -then - echo "Cross mingw32" - sed -i -e '/CMPLR_PREFIX/d' epics-base/configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw - cat << EOF >> epics-base/configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw + # requires wine and g++-mingw-w64-i686 + if [ "$WINE" = "32" ] + then + echo "Cross mingw32" + sed -i -e '/CMPLR_PREFIX/d' $EPICS_BASE/configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw + cat << EOF >> $EPICS_BASE/configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw CMPLR_PREFIX=i686-w64-mingw32- EOF - cat << EOF >> epics-base/configure/CONFIG_SITE + cat << EOF >> $EPICS_BASE/configure/CONFIG_SITE CROSS_COMPILER_TARGET_ARCHS+=win32-x86-mingw EOF -elif [ "$WINE" = "64" ] -then - echo "Cross mingw64" - sed -i -e '/CMPLR_PREFIX/d' epics-base/configure/os/CONFIG_SITE.linux-x86.windows-x64-mingw - cat << EOF >> epics-base/configure/os/CONFIG_SITE.linux-x86.windows-x64-mingw + elif [ "$WINE" = "64" ] + then + echo "Cross mingw64" + sed -i -e '/CMPLR_PREFIX/d' $EPICS_BASE/configure/os/CONFIG_SITE.linux-x86.windows-x64-mingw + cat << EOF >> $EPICS_BASE/configure/os/CONFIG_SITE.linux-x86.windows-x64-mingw CMPLR_PREFIX=x86_64-w64-mingw32- EOF - cat << EOF >> epics-base/configure/CONFIG_SITE + cat << EOF >> $EPICS_BASE/configure/CONFIG_SITE CROSS_COMPILER_TARGET_ARCHS+=windows-x64-mingw EOF -fi + fi -if [ "$STATIC" = "YES" ] -then - echo "Build static libraries/executables" - cat << EOF >> epics-base/configure/CONFIG_SITE + if [ "$STATIC" = "YES" ] + then + echo "Build static libraries/executables" + cat << EOF >> $EPICS_BASE/configure/CONFIG_SITE SHARED_LIBRARIES=NO STATIC_BUILD=YES EOF -fi + fi -HOST_CCMPLR_NAME=`echo "$TRAVIS_COMPILER" | sed -E 's/^([[:alpha:]][^-]*(-[[:alpha:]][^-]*)*)+(-[0-9\.]+)?$/\1/g'` -HOST_CMPLR_VER_SUFFIX=`echo "$TRAVIS_COMPILER" | sed -E 's/^([[:alpha:]][^-]*(-[[:alpha:]][^-]*)*)+(-[0-9\.]+)?$/\3/g'` -HOST_CMPLR_VER=`echo "$HOST_CMPLR_VER_SUFFIX" | cut -c 2-` + HOST_CCMPLR_NAME=`echo "$TRAVIS_COMPILER" | sed -E 's/^([[:alpha:]][^-]*(-[[:alpha:]][^-]*)*)+(-[0-9\.]+)?$/\1/g'` + HOST_CMPLR_VER_SUFFIX=`echo "$TRAVIS_COMPILER" | sed -E 's/^([[:alpha:]][^-]*(-[[:alpha:]][^-]*)*)+(-[0-9\.]+)?$/\3/g'` + HOST_CMPLR_VER=`echo "$HOST_CMPLR_VER_SUFFIX" | cut -c 2-` -case "$HOST_CCMPLR_NAME" in -clang) - echo "Host compiler is clang" - HOST_CPPCMPLR_NAME=$(echo "$HOST_CCMPLR_NAME" | sed 's/clang/clang++/g') - cat << EOF >> epics-base/configure/os/CONFIG_SITE.Common.$EPICS_HOST_ARCH + case "$HOST_CCMPLR_NAME" in + clang) + echo "Host compiler is clang" + HOST_CPPCMPLR_NAME=$(echo "$HOST_CCMPLR_NAME" | sed 's/clang/clang++/g') + cat << EOF >> $EPICS_BASE/configure/os/CONFIG_SITE.Common.$EPICS_HOST_ARCH GNU = NO CMPLR_CLASS = clang CC = ${HOST_CCMPLR_NAME}$HOST_CMPLR_VER_SUFFIX CCC = ${HOST_CPPCMPLR_NAME}$HOST_CMPLR_VER_SUFFIX EOF - # hack - sed -i -e 's/CMPLR_CLASS = gcc/CMPLR_CLASS = clang/' epics-base/configure/CONFIG.gnuCommon + # hack + sed -i -e 's/CMPLR_CLASS = gcc/CMPLR_CLASS = clang/' $EPICS_BASE/configure/CONFIG.gnuCommon - ${HOST_CCMPLR_NAME}$HOST_CMPLR_VER_SUFFIX --version - ;; -gcc) - echo "Host compiler is GCC" - HOST_CPPCMPLR_NAME=$(echo "$HOST_CCMPLR_NAME" | sed 's/gcc/g++/g') - cat << EOF >> epics-base/configure/os/CONFIG_SITE.Common.$EPICS_HOST_ARCH + ${HOST_CCMPLR_NAME}$HOST_CMPLR_VER_SUFFIX --version + ;; + gcc) + echo "Host compiler is GCC" + HOST_CPPCMPLR_NAME=$(echo "$HOST_CCMPLR_NAME" | sed 's/gcc/g++/g') + cat << EOF >> $EPICS_BASE/configure/os/CONFIG_SITE.Common.$EPICS_HOST_ARCH CC = ${HOST_CCMPLR_NAME}$HOST_CMPLR_VER_SUFFIX CCC = ${HOST_CPPCMPLR_NAME}$HOST_CMPLR_VER_SUFFIX EOF - ${HOST_CCMPLR_NAME}$HOST_CMPLR_VER_SUFFIX --version - ;; -*) - echo "Host compiler is default" - gcc --version - ;; -esac + ${HOST_CCMPLR_NAME}$HOST_CMPLR_VER_SUFFIX --version + ;; + *) + echo "Host compiler is default" + gcc --version + ;; + esac -cat <> epics-base/configure/CONFIG_SITE + cat <> $EPICS_BASE/configure/CONFIG_SITE USR_CPPFLAGS += $USR_CPPFLAGS USR_CFLAGS += $USR_CFLAGS USR_CXXFLAGS += $USR_CXXFLAGS EOF -# set RTEMS to eg. "4.9" or "4.10" -# requires qemu, bison, flex, texinfo, install-info -if [ -n "$RTEMS" ] -then - echo "Cross RTEMS${RTEMS} for pc386" - curl -L "https://github.com/mdavidsaver/rsb/releases/download/20171203-${RTEMS}/i386-rtems${RTEMS}-trusty-20171203-${RTEMS}.tar.bz2" \ - | tar -C / -xmj + # set RTEMS to eg. "4.9" or "4.10" + # requires qemu, bison, flex, texinfo, install-info + if [ -n "$RTEMS" ] + then + echo "Cross RTEMS${RTEMS} for pc386" + curl -L "https://github.com/mdavidsaver/rsb/releases/download/20171203-${RTEMS}/i386-rtems${RTEMS}-trusty-20171203-${RTEMS}.tar.bz2" \ + | tar -C / -xmj - sed -i -e '/^RTEMS_VERSION/d' -e '/^RTEMS_BASE/d' epics-base/configure/os/CONFIG_SITE.Common.RTEMS - cat << EOF >> epics-base/configure/os/CONFIG_SITE.Common.RTEMS + sed -i -e '/^RTEMS_VERSION/d' -e '/^RTEMS_BASE/d' $EPICS_BASE/configure/os/CONFIG_SITE.Common.RTEMS + cat << EOF >> $EPICS_BASE/configure/os/CONFIG_SITE.Common.RTEMS RTEMS_VERSION=$RTEMS RTEMS_BASE=$HOME/.rtems EOF - cat << EOF >> epics-base/configure/CONFIG_SITE + cat << EOF >> $EPICS_BASE/configure/CONFIG_SITE CROSS_COMPILER_TARGET_ARCHS += RTEMS-pc386-qemu EOF + fi + +else + echo "EPICS Base will not be recompiled - compiler setup already done" fi -for modrepo in ${BASE_MODULE} ${MODULES} +fold_end set.up.compiler + +# Build required dependencies +# --------------------------- + +fold_start build.dependencies "Rebuild missing dependencies" + +for module in ${modules_to_compile} do - module=${modrepo%CPP} + name=$(basename $module) + fold_start build.$name "Build $name" make -j2 -C $module $EXTRA + fold_end build.$name done + +fold_end build.dependencies From db93a1dfc875a28a8249b37545c143647bc1514c Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Thu, 24 Oct 2019 13:37:48 +0200 Subject: [PATCH 08/40] travis: split functions off into utils.h (for better testability) --- travis/prepare.sh | 133 ++-------------------------------------------- travis/utils.sh | 132 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 136 insertions(+), 129 deletions(-) create mode 100644 travis/utils.sh diff --git a/travis/prepare.sh b/travis/prepare.sh index 354140a..19da272 100755 --- a/travis/prepare.sh +++ b/travis/prepare.sh @@ -3,139 +3,14 @@ set -e -x SETUP_DIRS=$(echo $SETUP_PATH | tr ":" "\n") -# Travis log fold control -# from https://github.com/travis-ci/travis-rubies/blob/build/build.sh - -fold_start() { - echo "travis_fold:start:$1\033[33;1m$2\033[0m" -} - -fold_end() { - echo "\ntravis_fold:end:$1\r" -} - -# source_set(settings) -# -# Source a settings file (extension .set) found in the SETUP_DIRS path -# May be called recursively (from within a settings file) -source_set() { - local set_file=$1 - local set_dir - for set_dir in ${SETUP_DIRS} - do - if [ -e $set_dir/$set_file.set ] - then - echo "Loading setup file $set_dir/$set_file.set" - . $set_dir/$set_file.set - break - fi - done -} - -# update_release_local(varname, place) -# varname name of the variable to set in RELEASE.local -# place place (absolute path) of where variable should point to -# -# Manipulate RELEASE.local in the cache location: -# - replace "$varname=$place" line if it exists and has changed -# - otherwise add "$varname=$place" line and possibly move EPICS_BASE=... line to the end -update_release_local() { - local var=$1 - local place=$2 - local release_local=${CACHEDIR}/RELEASE.local - local updated_line="${var}=${place}" - - local ret=0 - [ -e ${release_local} ] && grep -q "${var}=" ${release_local} || ret=$? - if [ $ret -eq 0 ] - then - existing_line=$(grep "${var}=" ${release_local}) - if [ "${existing_line}" != "${updated_line}" ] - then - sed -i "s|${var}=.*|${var}=${place}|g" ${release_local} - fi - else - echo "$var=$place" >> ${release_local} - grep -q "EPICS_BASE=" ${release_local} || ret=$? - if [ $ret -eq 0 ] - then - base_line=$(grep "EPICS_BASE=" ${release_local}) - sed -i 's|EPICS_BASE=||g' ${release_local} - echo ${base_line} >> ${release_local} - fi - fi -} - -# add_dependency(dep, tag) -# -# Add a dependency to the cache or source area: -# - if $tag is a branch name, check out flat (no submodules) in the SOURCE area -# - if $tag is a release name, check out recursive (w/ submodules) in the CACHE area -# unless it already exists -# - Defaults: -# $dep_DIRNAME = lower case ($dep) -# $dep_REPONAME = lower case ($dep) -# $dep_REPOURL = GitHub / $dep_REPOOWNER (or $REPOOWNER or epics-modules) / $dep_REPONAME .git -# $dep_VARNAME = $dep -# $dep_DEPTH = 5 -# - Add $dep_VARNAME line to the RELEASE.local file in the cache area (unless already there) -# - Add full path to $modules_to_compile -add_dependency() { - curdir="$PWD" - DEP=$1 - TAG=$2 - dep_lc=$(echo $DEP | tr 'A-Z' 'a-z') - eval dirname=\${${DEP}_DIRNAME:=${dep_lc}} - eval reponame=\${${DEP}_REPONAME:=${dep_lc}} - eval repourl=\${${DEP}_REPOURL:="https://github.com/\${${DEP}_REPOOWNER:=${REPOOWNER:-epics-modules}}/${reponame}.git"} - eval varname=\${${DEP}_VARNAME:=${DEP}} - - # determine if BASE points to a release or a branch - git ls-remote --quiet --exit-code --tags $repourl "$TAG" && tagtype=release - git ls-remote --quiet --exit-code --heads $repourl "$TAG" && tagtype=branch - - case "${tagtype}" in - "release" ) - location=${CACHEDIR} - recursive="--recursive" - ;; - "branch" ) - location=${SOURCEDIR} - recursive="" - ;; - * ) - echo "$TAG is neither a tag nor a branch name for $DEP ($repourl)" - exit 1 - ;; - esac - - if [ ! -e $location/$dirname-$TAG ] - then - cd $location - eval depth=\${${DEP}_DEPTH:-"-1"} - case ${depth} in - -1 ) - deptharg="--depth 5" - ;; - 0 ) - deptharg="" - ;; - * ) - deptharg="--depth $depth" - ;; - esac - eval git clone --quiet $deptharg $recursive --branch "$TAG" $repourl $dirname-$TAG - ( cd $dirname-$TAG && git log -n1 ) - modules_to_compile="${modules_to_compile} $location/$dirname-$TAG" - cd "$curdir" - fi - update_release_local ${varname} $location/$dirname-$TAG -} - +SCRIPTDIR=$(dirname $(readlink -f $0)) CURDIR="$PWD" CACHEDIR="$HOME/.cache" SOURCEDIR="$HOME/.source" +# source functions +. $SCRIPTDIR/utils.sh + # Load settings # ------------- diff --git a/travis/utils.sh b/travis/utils.sh new file mode 100644 index 0000000..2c1d9a4 --- /dev/null +++ b/travis/utils.sh @@ -0,0 +1,132 @@ +# Utility functions for Travis scripts in ci-scripts +# +# This file is sourced by the executable scripts + +# Travis log fold control +# from https://github.com/travis-ci/travis-rubies/blob/build/build.sh + +fold_start() { + echo "travis_fold:start:$1\033[33;1m$2\033[0m" +} + +fold_end() { + echo "\ntravis_fold:end:$1\r" +} + +# source_set(settings) +# +# Source a settings file (extension .set) found in the SETUP_DIRS path +# May be called recursively (from within a settings file) +source_set() { + local set_file=$1 + local set_dir + for set_dir in ${SETUP_DIRS} + do + if [ -e $set_dir/$set_file.set ] + then + echo "Loading setup file $set_dir/$set_file.set" + . $set_dir/$set_file.set + break + fi + done +} + +# update_release_local(varname, place) +# varname name of the variable to set in RELEASE.local +# place place (absolute path) of where variable should point to +# +# Manipulate RELEASE.local in the cache location: +# - replace "$varname=$place" line if it exists and has changed +# - otherwise add "$varname=$place" line and possibly move EPICS_BASE=... line to the end +update_release_local() { + local var=$1 + local place=$2 + local release_local=${CACHEDIR}/RELEASE.local + local updated_line="${var}=${place}" + + local ret=0 + [ -e ${release_local} ] && grep -q "${var}=" ${release_local} || ret=$? + if [ $ret -eq 0 ] + then + existing_line=$(grep "${var}=" ${release_local}) + if [ "${existing_line}" != "${updated_line}" ] + then + sed -i "s|${var}=.*|${var}=${place}|g" ${release_local} + fi + else + echo "$var=$place" >> ${release_local} + grep -q "EPICS_BASE=" ${release_local} || ret=$? + if [ $ret -eq 0 ] + then + base_line=$(grep "EPICS_BASE=" ${release_local}) + sed -i 's|EPICS_BASE=||g' ${release_local} + echo ${base_line} >> ${release_local} + fi + fi +} + +# add_dependency(dep, tag) +# +# Add a dependency to the cache or source area: +# - if $tag is a branch name, check out flat (no submodules) in the SOURCE area +# - if $tag is a release name, check out recursive (w/ submodules) in the CACHE area +# unless it already exists +# - Defaults: +# $dep_DIRNAME = lower case ($dep) +# $dep_REPONAME = lower case ($dep) +# $dep_REPOURL = GitHub / $dep_REPOOWNER (or $REPOOWNER or epics-modules) / $dep_REPONAME .git +# $dep_VARNAME = $dep +# $dep_DEPTH = 5 +# - Add $dep_VARNAME line to the RELEASE.local file in the cache area (unless already there) +# - Add full path to $modules_to_compile +add_dependency() { + curdir="$PWD" + DEP=$1 + TAG=$2 + dep_lc=$(echo $DEP | tr 'A-Z' 'a-z') + eval dirname=\${${DEP}_DIRNAME:=${dep_lc}} + eval reponame=\${${DEP}_REPONAME:=${dep_lc}} + eval repourl=\${${DEP}_REPOURL:="https://github.com/\${${DEP}_REPOOWNER:=${REPOOWNER:-epics-modules}}/${reponame}.git"} + eval varname=\${${DEP}_VARNAME:=${DEP}} + + # determine if BASE points to a release or a branch + git ls-remote --quiet --exit-code --tags $repourl "$TAG" && tagtype=release + git ls-remote --quiet --exit-code --heads $repourl "$TAG" && tagtype=branch + + case "${tagtype}" in + "release" ) + location=${CACHEDIR} + recursive="--recursive" + ;; + "branch" ) + location=${SOURCEDIR} + recursive="" + ;; + * ) + echo "$TAG is neither a tag nor a branch name for $DEP ($repourl)" + exit 1 + ;; + esac + + if [ ! -e $location/$dirname-$TAG ] + then + cd $location + eval depth=\${${DEP}_DEPTH:-"-1"} + case ${depth} in + -1 ) + deptharg="--depth 5" + ;; + 0 ) + deptharg="" + ;; + * ) + deptharg="--depth $depth" + ;; + esac + eval git clone --quiet $deptharg $recursive --branch "$TAG" $repourl $dirname-$TAG + ( cd $dirname-$TAG && git log -n1 ) + modules_to_compile="${modules_to_compile} $location/$dirname-$TAG" + cd "$curdir" + fi + update_release_local ${varname} $location/$dirname-$TAG +} From f60fd0c33b8d9a740ee1cfc592c6c3f540691ee6 Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Thu, 24 Oct 2019 16:11:16 +0200 Subject: [PATCH 09/40] travis: add running defined hooks --- travis/utils.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/travis/utils.sh b/travis/utils.sh index 2c1d9a4..94bfca3 100644 --- a/travis/utils.sh +++ b/travis/utils.sh @@ -123,9 +123,21 @@ add_dependency() { deptharg="--depth $depth" ;; esac - eval git clone --quiet $deptharg $recursive --branch "$TAG" $repourl $dirname-$TAG + git clone --quiet $deptharg $recursive --branch "$TAG" $repourl $dirname-$TAG ( cd $dirname-$TAG && git log -n1 ) modules_to_compile="${modules_to_compile} $location/$dirname-$TAG" + # run hook + eval hook="\${${DEP}_HOOK}" + if [ ! -z "$hook" ] + then + if [ -x "$curdir/$hook" ] + then + ( cd $location/$dirname-$TAG; "$curdir/$hook" ) + else + echo "Hook script $hook is not executable or does not exist." + exit 1 + fi + fi cd "$curdir" fi update_release_local ${varname} $location/$dirname-$TAG From c3597fd901b8be94f255eb0ddb6a478c85052c7c Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Thu, 24 Oct 2019 15:05:40 +0200 Subject: [PATCH 10/40] Update documentation --- README.md | 101 ++++++++++++++++++++++++++++++++++++++++++++--- travis/README.md | 34 ++++++++-------- 2 files changed, 114 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index b062b03..99e4f1b 100644 --- a/README.md +++ b/README.md @@ -27,9 +27,31 @@ module). Also, a test suite might not show the same level of quality as an example. +## Features + + - Compile against different branches or releases of EPICS Base and + additional dependencies (modules like asyn, std, etc.). + + - Define settings files that declare sets of dependencies + with their versions and locations. + + - Define hook scripts for any dependency. + Hooks are run on the dependency module before it is compiled, so + the module can be patched or further configured. + + - Define static or shared builds (executables, libraries). + + - Run tests (using the EPICS unit test suite). + ## Supported CI Services - - Travis-CI +### Travis-CI + - Use different compilers (gcc, clang) + - Use different gcc versions + - Cross-compile for Windows 32bit and 64bit using MinGW and WINE + - Cross-compile for RTEMS 4.9 and 4.10 + - Compile on MacOS + - Released versions of dependencies are cached (for faster builds) ### How to Use the CI-Scripts @@ -41,20 +63,89 @@ example. ``` $ git submodule add https://github.com/epics-base/ci-scripts .ci ``` + 3. Create settings files for different sets of dependencies you + want to compile against. E.g., a settings file `foo.set` + specifying + ``` + MODULES="sncseq asyn" - 3. Create a configuration for the CI service by copying one of + BASE=R3.15.6 + ASYN=master + SNCSEQ=R2-2-7 + ``` + will compile against the EPICS Base release 3.15.6, the Sequencer + release 2.2.7 and the latest commit on the `master` branch of asyn. + + 4. Create a configuration for the CI service by copying one of the examples provided in the service specific subdirectory and editing it to include the jobs you want the service to run. + Use your dependency settings by defining e.g. `SET=foo` in your jobs. - 4. Push your changes and check the CI service for your build results. + 5. Push your changes and check the CI service for your build results. -## Releases and Numbering of this Module +## Settings File Syntax + +Settings files are sourced by the bash scripts. They are found by searching +the locations in `SETUP_PATH` (space or colon separated list of directories, +relative to your module's root directory). + +`MODULES=""` should list the dependencies (software modules) +by using their well-known slugs, separated by spaces. +EPICS Base (`BASE`) will always be a dependency and will be added and +compiled first. The other dependencies are added and compiled in the order +they are defined in `MODULES`. + +`REPOOWNER=` sets the default GitHub owner (or organization) for all +dependency modules. Useful if you want to compile against a complete set +of dependencies forked into your private GitHub area. + +For any module mentioned as `foo` in the `MODULES` setting (and for `BASE`), +the following settings can be configured: + +`FOO=` Set version of the module that should be used. Must either +be a *tag* name (in that case the module is checked out into Travis' cache +system) or a *branch* name (in that case the module is always checked out +and recompiled as part of the job). [default: `master`] + +`FOO_REPONAME=` Set the name of the remote repository as `.git`. +[default is the slug in lower case: `foo`] + +`FOO_REPOOWNER=` Set the name of the GitHub owner (or organization) +that the module repository can be found under. + +`FOO_REPOURL=""` Set the complete URL of the remote repository. + +The default URL for the repository is pointing to GitHub, under +`$FOO_REPOOWNER` else `$REPOOWNER` else `epics-modules`, +using `$FOO_REPONAME` else `foo` and the extension`.git`. + +`FOO_DEPTH=` Set the depth of the git clone operation. Use 0 for a +full clone. [default: 5] + +`FOO_DIRNAME=` Set the local directory name for the checkout. This will +be always be extended by the release or branch name as `-`. +[default is the slug in lower case: `foo`] + +`FOO_HOOK=