Add preliminary support for using Base releases

- shorten BASE variable name (takes tag or branch name)
 - determine existence and type of BASE before cloning
This commit is contained in:
Ralph Lange
2019-10-05 10:26:02 -04:00
parent 45dba66437
commit 698e6b00e8
4 changed files with 48 additions and 22 deletions

View File

@@ -27,58 +27,66 @@ script:
# 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_BRANCH=7.0
- env: BASE=7.0
- env: BASE_BRANCH=7.0
- env: BASE=7.0
compiler: clang
- env: BASE_BRANCH=7.0 EXTRA="CMD_CXXFLAGS=-std=c++11"
- env: BASE=7.0 EXTRA="CMD_CXXFLAGS=-std=c++11"
- env: BASE_BRANCH=7.0 EXTRA="CMD_CXXFLAGS=-std=c++11"
- env: BASE=7.0 EXTRA="CMD_CXXFLAGS=-std=c++11"
compiler: clang
# Trusty: compiler versions very close to RHEL 7
- env: BASE_BRANCH=7.0
- env: BASE=7.0
dist: trusty
- env: BASE_BRANCH=7.0 EXTRA="CMD_CXXFLAGS=-std=c++11"
- env: BASE=7.0 EXTRA="CMD_CXXFLAGS=-std=c++11"
dist: trusty
# Cross-compilation to Windows using MinGW and WINE
- env: BASE_BRANCH=7.0 WINE=32 TEST=NO STATIC=YES
- env: BASE=7.0 WINE=32 TEST=NO STATIC=YES
compiler: mingw
- env: BASE_BRANCH=7.0 WINE=32 TEST=NO STATIC=NO
- env: BASE=7.0 WINE=32 TEST=NO STATIC=NO
compiler: mingw
# Cross-compilation to RTEMS
- env: BASE_BRANCH=7.0 RTEMS=4.10 TEST=NO
- env: BASE=7.0 RTEMS=4.10 TEST=NO
- env: BASE_BRANCH=7.0 RTEMS=4.9 TEST=NO
- env: BASE=7.0 RTEMS=4.9 TEST=NO
# Other gcc versions (adding as an extra package)
- env: BASE_BRANCH=7.0
- env: BASE=7.0
compiler: gcc-6
addons: { apt: { packages: ["g++-6"], sources: ["ubuntu-toolchain-r-test"] } }
- env: BASE_BRANCH=7.0
- env: BASE=7.0
compiler: gcc-7
addons: { apt: { packages: ["g++-7"], sources: ["ubuntu-toolchain-r-test"] } }
# MacOS build
- env: BASE_BRANCH=7.0
- env: BASE=7.0
os: osx
compiler: clang
# All above jobs can be defined for other branches of EPICS Base
# by setting BASE_BRANCH to the branch name, e.g. 3.15
# All above jobs can be defined for other branches or releases of EPICS Base
# by setting BASE to the branch name or release tag name, e.g.
# BASE=3.15 (to use the 3.15 branch of Base)
# BASE=R7.0.3 (to use the 7.0.3 release of Base)

View File

@@ -20,9 +20,9 @@ install:
script:
- ./.ci/travis-build.sh
# Build using default gcc for Base 7.0 and 3.15
# Build using default gcc for Base branches 7.0 and 3.15
matrix:
include:
- env: BASE_BRANCH=7.0
- env: BASE_BRANCH=3.15
- env: BASE=7.0
- env: BASE=3.15

View File

@@ -6,14 +6,14 @@ software modules, e.g. Device 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 way, further development of these scripts cannot break
That ensures that further development of these scripts cannot break
your setup.
## Travis-CI
### Features
- Compile against different version of EPICS Base
- 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

View File

@@ -3,8 +3,26 @@ set -e -x
CURDIR="$PWD"
# 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
if [ "$BASE_RELEASE" = "YES" ]
then
# TODO: use a cached location
BASE_LOCATION=$HOME/.source/epics-base
else
if [ "$BASE_BRANCH" = "YES" ]
then
BASE_LOCATION=$HOME/.source/epics-base
else
echo $BASE is neither a tag nor a branch name for BASE
exit 1
fi
fi
cat << EOF > $CURDIR/configure/RELEASE.local
EPICS_BASE=$HOME/.source/epics-base
EPICS_BASE=$BASE_LOCATION
EOF
install -d "$HOME/.source"
@@ -25,7 +43,7 @@ EOF
}
# not recursive
git clone --quiet --depth 5 --branch "$BASE_BRANCH" https://github.com/${REPOBASE:-epics-base}/epics-base.git epics-base
git clone --quiet --depth 5 --branch "$BASE" https://github.com/${REPOBASE:-epics-base}/epics-base.git epics-base
(cd epics-base && git log -n1 )
for modrepo in ${MODULES}
do