buildserver maintenance.

v0.27.3
Robin Mills 7 years ago committed by Luis Díaz Más
parent 5fdbe86712
commit 01bcb9404b

@ -1,118 +1,105 @@
#!/bin/bash #!/bin/bash
syntax() {
syntaxError() { echo "usage: $0 { --help | -? | -h | platform }+ "
echo "usage: $0 [{--help|-?}| {platform}+]" echo "platform: all | cygwin | linux | macosx | mingw | msvc "
echo "platform: all | msvc | cygwin | linux | mingw | macosx "
exit 1
} }
bomb() { announce()
echo "*** $1 requires an argument ***" 1>&2 {
exit 1 echo ++++++++++++++++++++++++++++++++
echo $*
echo ++++++++++++++++++++++++++++++++
} }
msvc=0 msvc=0
cygwin=0 cygwin=0
mingw=0 mingw=0
cygwin=0 cygwin=0
macosx=0 macosx=0
linux=0 linux=0
verbose=0 help=0
if [ "$#" == "0" ]; then syntaxError; fi if [ "$#" == "0" ]; then help=1; fi
while [ "$#" != "0" ]; do while [ "$#" != "0" ]; do
case "$1" in case "$1" in
-h|--help|-\?) syntaxError; exit 0 ;; -h|--help|-\?) help=1 ;;
-v|--verbose) verbose=1 ;; all) cygwin=1; linux=1; macosx=1; mingw=1; msvc=1; ;;
all) msvc=1; cygwin=1; linux=1; mingw=1; macosx=1 ;;
msvc) msvc=1 ;;
cygwin) cygwin=1 ;; cygwin) cygwin=1 ;;
mingw) mingw=1 ;;
macosx) macosx=1 ;;
linux) linux=1 ;; linux) linux=1 ;;
*) echo "invalid option: $1" 1>&2; syntaxError; exit 1;; macosx) macosx=1 ;;
mingw) mingw=1 ;;
msvc) msvc=1 ;;
*) echo "invalid option: $1" 1>&2; help=1; ;;
esac esac
if [ "$#" != "0" ]; then shift ; fi if [ "$#" != "0" ]; then shift ; fi
done done
if [ $help == 1 ]; then
if [ $macosx == 1 ]; then syntax;
ssh rmills@rmillsmm <<EOF exit 0;
cd ~/gnu/github/exiv2/exiv2
git pull
mkdir -p build
rm -rf build
mkdir build
cd build
cmake .. -G "Unix Makefiles"
make
make tests
EOF
fi fi
if [ $linux == 1 ]; then if [ $linux == 1 ]; then
ssh rmills@rmillsmm-ubuntu <<EOF me=Linux
cd ~/gnu/github/exiv2/exiv2 server=rmills@rmillsmm-ubuntu
git pull command=''
mkdir -p build cd=/home/rmills/gnu/github/exiv2/
rm -rf build
mkdir build
cd build
cmake .. -G "Unix Makefiles"
make
make tests
EOF
fi fi
if [ $msvc == 1 ]; then if [ $macosx == 1 ]; then
ssh rmills@rmillsmm-w7 <<EOF me=MacOS-X
cd /Users/rmills/gnu/github/exiv2/exiv2/ server=rmills@rmillsmm
git pull cd=/Users/rmills/gnu/github/exiv2/
IF EXIST build rmdir/s/q build command=''
IF EXIST dist rmdir/s/q dist
mkdir build
cd build
conan install .. --profile msvc2017Release64 --build missing
cmake .. -G "Visual Studio 15 2017 Win64" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=dist
cmake --build . --config Release
rem cd contrib/cmake/msvc
rem mkdir -p build
rem rm -rf build
rem cmd/c "vcvars 2017 64 && cmakeBuild --build --test"
EOF
fi fi
if [ $mingw == 1 ]; then
me=MinGW
server=rmills@rmillsmm-w7
command='msys64'
cd=/home/rmills/gnu/github/exiv2/
fi
if [ $cygwin == 1 ]; then if [ $cygwin == 1 ]; then
ssh rmills@rmillsmm-w7 C:\\cygwin64\\bin\\bash.exe <<EOF me=Cygwin
cd /home/rmills/gnu/github/exiv2/exiv2 server=rmills@rmillsmm-w7
git pull command='c:\\cygwin64\\bin\\bash.exe'
mkdir -p build fi
rm -rf build
mkdir build if [ ! -z $server ]; then
cd build announce $me
! ssh ${server} ${command} <<EOF
PATH="/usr/local/bin/:/usr/bin:/mingw64/bin:$PATH"
cd ${cd}
mkdir -p buildserver
rm -rf buildserver
git clone --branch RC1 https://github.com/exiv2/exiv2 buildserver
mkdir -p buildserver/build
cd buildserver/build
cmake .. -G "Unix Makefiles" cmake .. -G "Unix Makefiles"
make make
make tests make tests
make package
EOF EOF
fi fi
if [ $msvc == 1 ]; then
if [ $mingw == 1 ]; then cd=c:\\Users\\rmills\\gnu\\github\\exiv2\\
ssh rmills@rmillsmm-w7 msys64 <<EOF profile=msvc2017Release64
cd ~/gnu/github/exiv2/exiv2 config=Release
git pull generator='"Visual Studio 15 2017 Win64"'
mkdir -p build announce ${profile}
rm -rf build ! ssh rmills@rmillsmm-w7 <<EOF
mkdir build cd ${cd}
cd build IF EXIST buildserver rmdir/s/q buildserver
cmake .. -G "Unix Makefiles" git clone --branch RC1 https://github.com/exiv2/exiv2 buildserver
make mkdir buildserver\build
make tests cd buildserver\build
conan install .. --profile ${profile} --build missing
cmake .. -G ${generator} -DCMAKE_BUILD_TYPE=${config} -DCMAKE_INSTALL_PREFIX=..\\dist\\${profile}
cmake --build . --config ${config} --target install
EOF EOF
fi fi

Loading…
Cancel
Save