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

Loading…
Cancel
Save