Skip to content

Commit

Permalink
Update travis
Browse files Browse the repository at this point in the history
  • Loading branch information
keenanlang committed Sep 17, 2018
1 parent f57930f commit 3ec680c
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 71 deletions.
139 changes: 75 additions & 64 deletions .ci/assemble_synApps.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
shopt -s expand_aliases
set -x

# This file is intended to gather everything in or used in synApps.
# The version numbers in this file are not guaranteed to be up to date,
Expand All @@ -18,7 +19,7 @@ shallow_repo()
echo "Grabbing $MODULE_NAME at tag: $TAG"
echo

if [ ! -e "$FOLDER_NAME" ]
if [ ! -d "$FOLDER_NAME" ]
then
git clone --branch $TAG --depth 1 git://github.com/$PROJECT/$MODULE_NAME.git $FOLDER_NAME
fi
Expand All @@ -30,102 +31,111 @@ shallow_repo()

shallow_support()
{
git clone --branch $2 --depth 1 git://github.com/EPICS-synApps/$1.git
if [ ! -d "$1" ]
then
git clone --branch $2 --depth 1 git://github.com/EPICS-synApps/$1.git
fi
}

cd $HOME/.cache

EPICS_BASE=$HOME/.cache/base-$BASE

if [ ! -e "$EPICS_BASE" ]
if [ ! -d "$EPICS_BASE" ]
then
git clone --branch $BASE --depth 1 git://github.com/epics-base/epics-base.git base-$BASE

EPICS_HOST_ARCH=`sh $EPICS_BASE/startup/EpicsHostArch`
git clone --branch $BASE --depth 1 git://github.com/epics-base/epics-base.git base-$BASE

case "$STATIC" in
static)
cat << EOF >> "$EPICS_BASE/configure/CONFIG_SITE"
EPICS_HOST_ARCH=`sh $EPICS_BASE/startup/EpicsHostArch`

case "$STATIC" in
static)
cat << EOF >> "$EPICS_BASE/configure/CONFIG_SITE"
SHARED_LIBRARIES=NO
STATIC_BUILD=YES
EOF
;;
*) ;;
esac

case "$CMPLR" in
clang)
echo "Host compiler is clang"
cat << EOF >> $EPICS_BASE/configure/os/CONFIG_SITE.Common.$EPICS_HOST_ARCH
;;
*) ;;
esac

case "$CMPLR" in
clang)
echo "Host compiler is clang"

cat << EOF >> "$EPICS_BASE/configure/os/CONFIG_SITE.Common.$EPICS_HOST_ARCH"
GNU = NO
CMPLR_CLASS = clang
CC = clang
CCC = clang++
EOF
;;
*) echo "Host compiler is default";;
esac

# 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
;;
*) echo "Host compiler is default";;
esac
# 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
fi

# set RTEMS to eg. "4.9" or "4.10"
if [ -n "$RTEMS" ]
then
echo "Cross RTEMS${RTEMS} for pc386"
install -d /home/travis/.cache
curl -L "https://github.com/mdavidsaver/rsb/releases/download/travis-20160306-2/rtems${RTEMS}-i386-trusty-20190306-2.tar.gz" \
| tar -C /home/travis/.cache -xj

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
fi
# set RTEMS to eg. "4.9" or "4.10"
if [ -n "$RTEMS" ]
then
echo "Cross RTEMS${RTEMS} for pc386"
install -d /home/travis/.cache
curl -L "https://github.com/mdavidsaver/rsb/releases/download/travis-20160306-2/rtems${RTEMS}-i386-trusty-20190306-2.tar.gz" \
| tar -C /home/travis/.cache -xj
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/travis/.cache/rtems${RTEMS}-i386
EOF
cat << EOF >> $EPICS_BASE/configure/CONFIG_SITE
cat << EOF >> $EPICS_BASE/configure/CONFIG_SITE
CROSS_COMPILER_TARGET_ARCHS+=RTEMS-pc386
EOF

fi

make -C "$EPICS_BASE" -j2

fi

make -C "$EPICS_BASE" -j2


# get MSI for 3.14
case "$BASE" in
3.14*)
echo "Build MSI"
install -d "$HOME/msi/extensions/src"
curl https://www.aps.anl.gov/epics/download/extensions/extensionsTop_20120904.tar.gz | tar -C "$HOME/msi" -xvz
curl https://www.aps.anl.gov/epics/download/extensions/msi1-7.tar.gz | tar -C "$HOME/msi/extensions/src" -xvz
mv "$HOME/msi/extensions/src/msi1-7" "$HOME/msi/extensions/src/msi"

cat << EOF > "$HOME/msi/extensions/configure/RELEASE"
case "$BASE" in
3.14*)
if [ ! -d "$HOME/msi/extensions/src" ]
then
echo "Build MSI"
install -d "$HOME/msi/extensions/src"
curl https://epics.anl.gov/download/extensions/extensionsTop_20120904.tar.gz | tar -C "$HOME/msi" -xvz
curl https://epics.anl.gov/download/extensions/msi1-7.tar.gz | tar -C "$HOME/msi/extensions/src" -xvz
mv "$HOME/msi/extensions/src/msi1-7" "$HOME/msi/extensions/src/msi"

cat << EOF > "$HOME/msi/extensions/configure/RELEASE"
EPICS_BASE=$EPICS_BASE
EPICS_EXTENSIONS=\$(TOP)
EOF
make -C "$HOME/msi/extensions"
cp "$HOME/msi/extensions/bin/$EPICS_HOST_ARCH/msi" "$EPICS_BASE/bin/$EPICS_HOST_ARCH/"
echo 'MSI:=$(EPICS_BASE)/bin/$(EPICS_HOST_ARCH)/msi' >> "$EPICS_BASE/configure/CONFIG_SITE"

cat <<EOF >> configure/CONFIG_SITE

fi

make -C "$HOME/msi/extensions"
cp "$HOME/msi/extensions/bin/$EPICS_HOST_ARCH/msi" "$EPICS_BASE/bin/$EPICS_HOST_ARCH/"
echo 'MSI:=$(EPICS_BASE)/bin/$(EPICS_HOST_ARCH)/msi' >> "$EPICS_BASE/configure/CONFIG_SITE"

cat <<EOF >> configure/CONFIG_SITE
MSI = \$(EPICS_BASE)/bin/\$(EPICS_HOST_ARCH)/msi
EOF

;;
*) echo "Use MSI from Base"
;;
esac
;;
*) echo "Use MSI from Base"
;;
esac
fi

alias get_support='shallow_support'
Expand All @@ -144,6 +154,7 @@ echo "EPICS_BASE=$EPICS_BASE" >> configure/RELEASE
#get_repo Git Project Git Repo RELEASE Name Tag
if [[ $ASYN ]]; then get_repo epics-modules asyn ASYN $ASYN ; fi


make release
make

Expand Down
28 changes: 21 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,30 @@ addons:
- clang
- g++-mingw-w64-i686
- re2c
env:
- BASE=R3.15.5 STATIC=shared ASYN=R4-31
- BASE=R3.14.12.6 STATIC=shared ASYN=R4-31
matrix:
include:
- name: "3.16 master"
env: BASE=3.16 STATIC=shared ASYN=master

- name: "3.15 master"
env: BASE=3.15 STATIC=shared ASYN=master

- name: "3.14 master"
env: BASE=3.14 STATIC=shared ASYN=master

- name: "Windows Shared"
env: BASE=3.16 STATIC=shared CMPLR=clang WINE=32 ASYN=master

- name: "Windows Static"
env: BASE=3.16 STATIC=static CMPLR=clang WINE=32 ASYN=master



before_install: chmod +x ./.ci/assemble_synApps.sh

install: ./.ci/assemble_synApps.sh



script:
# Build the module
- make
# Build the module
- make

0 comments on commit 3ec680c

Please sign in to comment.