buildserver maintenance and documentation update.

v0.27.3
Robin Mills 7 years ago committed by Luis Díaz Más
parent 87278e6be3
commit a72782932c

@ -48,6 +48,7 @@ Downloads: [[Source](http://exiv2.dyndns.org/0.27.0.1/bundles/exiv2-0.27.0.1-Sou
The file "ReadMe.txt" in a bundle describes how to install/link code with libraries for their respective platform. The file "ReadMe.txt" in a bundle describes how to install/link code with libraries for their respective platform.
The file [license.txt](license.txt) in a bundle describes is a copy of GPLv2 License The file [license.txt](license.txt) in a bundle describes is a copy of GPLv2 License
[TOC](#TOC)
<name id="2"></a> <name id="2"></a>
## 2 Building and Installing ## 2 Building and Installing
@ -68,19 +69,20 @@ You need CMake to build Exiv2: https://cmake.org/download/
| /usr/local/bin | for the `exiv2` utility | | /usr/local/bin | for the `exiv2` utility |
| /usr/local/include/exiv2 | for header files | | /usr/local/include/exiv2 | for header files |
[TOC](#TOC)
<name id="2-2"></a> <name id="2-2"></a>
### 2.2 Build/Install Exiv2 with Visual Studio ### 2.2 Build/Install Exiv2 with Visual Studio
We recommend that you use cocan with CMake to build Exiv2 with Visual Studio. We recommend that you use cocan with CMake to build Exiv2 with Visual Studio.
See [README-CONAN](README-CONAN.md) for more information See [README-CONAN](README-CONAN.md) for more information
[TOC](#TOC)
<name id="2-3"></a> <name id="2-3"></a>
### 2.3 Uninstall Exiv2 on a UNIX-like system: ### 2.3 Uninstall Exiv2 on a UNIX-like system:
$ sudo make uninstall $ sudo make uninstall
[TOC](#TOC) [TOC](#TOC)
<name id="2-4"></a> <name id="2-4"></a>
### 2.4 Build options ### 2.4 Build options
@ -128,7 +130,6 @@ $ cmake -DBUILD_SHARED_LIBS=On -DEXIV2_ENABLE_NLS=OFF
``` ```
[TOC](#TOC) [TOC](#TOC)
<name id="2-5"></a> <name id="2-5"></a>
### 2.5 Dependencies ### 2.5 Dependencies
@ -152,7 +153,6 @@ corresponding development packages (for the header files and static
libraries). libraries).
[TOC](#TOC) [TOC](#TOC)
<name id="2-6"></a> <name id="2-6"></a>
### 2.6 Consuming Exiv2 with CMake ### 2.6 Consuming Exiv2 with CMake
@ -182,7 +182,6 @@ To build the documentation, you will need the following products:
| pkg-config | http://pkg-config.freedesktop.org/wiki/ | | pkg-config | http://pkg-config.freedesktop.org/wiki/ |
[TOC](#TOC) [TOC](#TOC)
<name id="2-8"></a> <name id="2-8"></a>
### 2.8 Building Exiv2 Packages ### 2.8 Building Exiv2 Packages
@ -219,7 +218,6 @@ CPack: - package: /media/linuxDev/programming/exiv2/build/exiv2-0.27.0.1-Source.
You may prefer to run `$ cmake --build . --config Release --target package_source` You may prefer to run `$ cmake --build . --config Release --target package_source`
[TOC](#TOC) [TOC](#TOC)
<name id="3"></a> <name id="3"></a>
## 3 License and Support ## 3 License and Support
@ -248,13 +246,11 @@ Foundation, Inc., 51 Franklin Street, 5th Floor, Boston,
MA 02110-1301 USA. MA 02110-1301 USA.
[TOC](#TOC) [TOC](#TOC)
<name id="3-2"></a> <name id="3-2"></a>
### 3.2 Support ### 3.2 Support
For new bug reports and feature requests, please open an issue in Github. For new bug reports and feature requests, please open an issue in Github.
[TOC](#TOC) [TOC](#TOC)
<name id="4"></a> <name id="4"></a>
## 4 Platform Notes ## 4 Platform Notes
@ -278,8 +274,8 @@ $ mkdir build ; cd build ;
$ cmake .. -G "Unix Makefiles" $ cmake .. -G "Unix Makefiles"
$ make $ make
``` ```
[TOC](#TOC)
[TOC](#TOC)
<name id="4-2"></a> <name id="4-2"></a>
### 4.2 MacOS-X ### 4.2 MacOS-X
@ -290,7 +286,6 @@ You should build and install libexpat and zlib from source.
You should build and install CMake from source. You should build and install CMake from source.
[TOC](#TOC) [TOC](#TOC)
<name id="4-3"></a> <name id="4-3"></a>
### 4.3 MinGW/msys2 ### 4.3 MinGW/msys2
@ -347,7 +342,6 @@ $ make
The exiv2 command line program provides a `--grep` option which filters output. The implementation requires the header file `<regex.h>` and supporting library to be available during the build. When not available, the option degenerates to a substring match. Because there are multiple versions of `<regex.h>` available on the MinGW platform, detection of Regex is always disabled on this platform. The exiv2 command line program provides a `--grep` option which filters output. The implementation requires the header file `<regex.h>` and supporting library to be available during the build. When not available, the option degenerates to a substring match. Because there are multiple versions of `<regex.h>` available on the MinGW platform, detection of Regex is always disabled on this platform.
[TOC](#TOC) [TOC](#TOC)
<name id="4-4"></a> <name id="4-4"></a>
### 4.4 Cygwin ### 4.4 Cygwin
@ -363,7 +357,6 @@ Download and build cmake from source because I can't get the cygwin installed cm
To build cmake from source (for 3.11+), you need libncurses. To build cmake from source (for 3.11+), you need libncurses.
[TOC](#TOC) [TOC](#TOC)
<name id="4-5"></a> <name id="4-5"></a>
### 4.5 Microsoft Visual C++ ### 4.5 Microsoft Visual C++
@ -375,7 +368,6 @@ As well as Microsoft Visual Studio, you will need to install CMake, Python3, and
3) Conan can be installed using python/pip. Details in README-CONAN.md 3) Conan can be installed using python/pip. Details in README-CONAN.md
[TOC](#TOC) [TOC](#TOC)
<name id="5"></a> <name id="5"></a>
## 5 Running the test suite ## 5 Running the test suite
@ -386,41 +378,43 @@ The test suite is a mix of bash and python scripts. The python scripts are new
You can run the suite directly from the build: You can run the suite directly from the build:
```
$ make build $ make build
... ...
$ make tests $ make tests
... lots of output ... ... lots of output ...
Summary report Summary report
```
You can run individual tests in the test directory using the environment string EXIV2_BINDIR to specify the location of the build artifacts: You can run individual tests in the test directory using EXIV2\_BINDIR to specify the location of the build artifacts. For Cygwin and MinGW/msys builds, set EXIV2_EXT=.exe
```
rmills@rmillsmbp-w7 ~/gnu/github/exiv2/exiv2/build $ cd ../test rmills@rmillsmbp-w7 ~/gnu/github/exiv2/exiv2/build $ cd ../test
rmills@rmillsmbp-w7 ~/gnu/github/exiv2/exiv2/test $ env EXIV2_BINDIR=${PWD}/../build/bin ./icc-test.sh rmills@rmillsmbp-w7 ~/gnu/github/exiv2/exiv2/test $ env EXIV2_BINDIR=${PWD}/../build/bin ./icc-test.sh
ICC jpg md5 webp md5 png md5 jpg md5 ICC jpg md5 webp md5 png md5 jpg md5
all testcases passed. all testcases passed.
rmills@rmillsmbp-w7 ~/gnu/github/exiv2/exiv2/test $ env EXIV2_BINDIR=${PWD}/../build/bin make newtests rmills@rmillsmbp-w7 ~/gnu/github/exiv2/exiv2/test $ env EXIV2_BINDIR=${PWD}/../build/bin make newtests
```
[TOC](#TOC) [TOC](#TOC)
<name id="5-2"></a> <name id="5-2"></a>
### 5.2 Running tests on Visual Studio builds ### 5.2 Running tests on Visual Studio builds
Use the bash interpreter for MinGW/msys2 to run the test suite. Use the bash interpreter for MinGW/msys2 to run the test suite. It's essential to have a DOS Python3 interpreter on your path. The variables EXIV2\_BINDIR and EXIV2\_EXT enable the test suite to locate the MSVC build artifacts.
$ cd ...../build/../test ```
$ cd <exiv2dir>/build
$ cd ../test
$ PATH="/c/Python36:$PATH"
$ export EXIV2_EXT=.exe $ export EXIV2_EXT=.exe
$ export EXIV2_BINDIR=${PWD}/../build/bin $ export EXIV2_BINDIR=${PWD}/../build/bin
```
It's essential to have a DOS Python3 interpreter on your path. You can proceed to execute the components of the test suite as described for Unix type systems:
$ PATH="/c/Python36:$PATH"
These variables enables the test suite to locate the MSVC build artifacts and you can follow the guidelines for UNIX-like systems above.
``` ```
$ make tests $ make test
$ make newtests $ make newtests
$ ./icc-test.sh $ ./icc-test.sh
``` ```

@ -1,68 +1,95 @@
#!/bin/bash #!/bin/bash
syntax() { syntax() {
echo "usage: $0 { --help | -? | -h | platform | option | switch }+ " echo "usage: $0 { --help | -? | -h | platform | option | switch }+ "
echo "platform: all | cygwin | linux | macosx | mingw | msvc " echo "platform: all | cygwin | linux | macosx | mingw | msvc "
echo "switch: --32 | --64 | --2015 | --2017 --publish | --verbose | --static " echo "switch: --32 | --64 | --2015 | --2017 --publish | --verbose | --static | --status"
echo "option: --branch x | --server x | --user x" echo "option: --branch x | --server x | --user x"
} }
announce() announce()
{ {
echo ++++++++++++++++++++++++++++++++ if [ "$status" != "1" ]; then
echo $* echo ++++++++++++++++++++++++++++++++
echo ++++++++++++++++++++++++++++++++ echo $*
echo ++++++++++++++++++++++++++++++++
fi
} }
bomb() { bomb() {
echo "*** $1 requires an argument ***" >&2 echo "*** $1 requires an argument ***" >&2
exit 1 exit 1
} }
unixBuild() unixBuild()
{ {
announce $1 $2 announce $1 $2
! ssh $1 ${command} <<EOF if [ "$status" == "1" ]; then
! ssh $1 ${command} <<EOF
cd ${cd}/buildserver/build
ls -alt *.tar.gz | sed -E -e 's/\+ / /g' # remove extended attribute marker
EOF
else
! ssh $1 ${command} <<EOF
PATH="/usr/local/bin/:/usr/bin:/mingw64/bin:$PATH" PATH="/usr/local/bin/:/usr/bin:/mingw64/bin:$PATH"
cd ${cd} cd ${cd}
mkdir -p buildserver mkdir -p buildserver
rm -rf buildserver rm -rf buildserver
git clone --branch $branch https://github.com/exiv2/exiv2 buildserver git clone --branch $branch https://github.com/exiv2/exiv2 buildserver
mkdir -p buildserver/build buildserver/logs mkdir -p buildserver/build
cd buildserver/build cd buildserver/build
cmake .. -G "Unix Makefiles" | tee -a logs/build.log cmake .. -G "Unix Makefiles"
make | tee -a logs/build.log make
make tests | tee -a logs/build.log make tests
make package | tee -a logs/build.log make package
ls -alt *.tar.gz ls -alt *.tar.gz | sed -E -e 's/\+ / /g'
EOF EOF
fi
} }
msvcBuild() msvcBuild()
{ {
cd=c:\\Users\\rmills\\gnu\\github\\exiv2\\ cd=c:\\Users\\rmills\\gnu\\github\\exiv2\\
config=Release config=Release
profile=msvc2017Release64 profile=msvc2017Release64
generator='"Visual Studio 15 2017 Win64"' generator='"Visual Studio 15 2017 Win64"'
if [ "$edition" == "2015" ]; then if [ "$edition" == "2015" ]; then
profile=msvc2015Release64 profile=msvc2015Release64
generator='"Visual Studio 154 2015 Win64"' generator='"Visual Studio 14 2015 Win64"'
fi fi
announce $1 ${profile} announce $1 ${profile}
! ssh $1 <<EOF if [ "$status" == "1" ]; then
! ssh $1 msys64 <<EOF
cd ${cd}buildserver\\build
ls -alt *.zip
EOF
else
! ssh $1 <<EOF
cd ${cd} cd ${cd}
IF EXIST buildserver rmdir/s/q buildserver IF EXIST buildserver rmdir/s/q buildserver
git clone --branch ${branch} https://github.com/exiv2/exiv2 buildserver git clone --branch ${branch} https://github.com/exiv2/exiv2 buildserver
mkdir buildserver\build mkdir buildserver\build
cd buildserver\build cd buildserver\build
conan install .. --profile ${profile} --build missing conan install .. --profile ${profile} --build missing
cmake .. -G ${generator} -DCMAKE_BUILD_TYPE=${config} -DCMAKE_INSTALL_PREFIX=..\\dist\\${profile} | tee -a logs/build.log cmake .. -G ${generator} -DCMAKE_BUILD_TYPE=${config} -DCMAKE_INSTALL_PREFIX=..\\dist\\${profile}
cmake --build . --config ${config} --target install cmake --build . --config ${config} --target install
cmake --build . --config ${config} --target package cmake --build . --config ${config} --target package
ls -alt *.zip ls -alt *.zip
EOF EOF
fi
} }
publishBuild()
{
date=$(date '+%Y-%m-%d+%H-%M-%S')
builds="/mmHD/Users/Shared/Jenkins/Home/userContent/builds"
input=something.tar.gz
output="$daily/date-${date}-$input"
scp input rmills@rmillsmm:/mmHD/Users/Shared/Jenkins/Home/userContent/builds/$output
}
##
# assign defaults
msvc=0 msvc=0
cygwin=0 cygwin=0
mingw=0 mingw=0
@ -80,14 +107,19 @@ branch=RC1
dryrun=0 dryrun=0
server=rmillsmm server=rmillsmm
user=rmills user=rmills
status=0
all=0
if [ "$#" == "0" ]; then help=1; fi if [ "$#" == "0" ]; then help=1; fi
##
# parse command line
while [ "$#" != "0" ]; do while [ "$#" != "0" ]; do
case "$1" in arg="$1"
shift
case "$arg" in
-h|--help|-\?) help=1 ;; -h|--help|-\?) help=1 ;;
all) cygwin=1; linux=1; macosx=1; mingw=1; msvc=1; ;; all) all=1 ;;
cygwin) cygwin=1 ;; cygwin) cygwin=1 ;;
linux) linux=1 ;; linux) linux=1 ;;
macosx) macosx=1 ;; macosx) macosx=1 ;;
@ -101,29 +133,33 @@ while [ "$#" != "0" ]; do
--static) static=1 ;; --static) static=1 ;;
--2017) edition=2017 ;; --2017) edition=2017 ;;
--2015) edition=2015 ;; --2015) edition=2015 ;;
--server) if [ $# -gt 1 ]; then server=$2; shift 2 ; else bomb $1 ; fi ;; --status) status=1 ;;
--branch) if [ $# -gt 1 ]; then branch=$2; shift 2 ; else bomb $1 ; fi ;; --server) if [ $# -gt 0 ]; then server=$1; shift; else bomb $arg ; fi ;;
--user) if [ $# -gt 1 ]; then user=$2 ; shift 2 ; else bomb $1 ; fi ;; --branch) if [ $# -gt 0 ]; then branch=$1; shift; else bomb $arg ; fi ;;
*) echo "invalid option: $1" 1>&2; help=1; ;; --user) if [ $# -gt 0 ]; then user=$1 ; shift; else bomb $arg ; fi ;;
*) echo "invalid option: $arg" 1>&2; help=1; ;;
esac esac
if [ "$#" != "0" ]; then shift ; fi
done done
if [ $help == 1 ]; then if [ $help == 1 ]; then
syntax; syntax;
exit 0; exit 0;
fi fi
if [ "$b64" == "0" -a "$b32" == "0" ]; then b64=1; fi if [ "$all" == "1" ]; then
if [ "$b64" == "1" -a "$b32" == "1" ]; then cygwin=1; linux=1; macosx=1; mingw=1; msvc=1;
echo "*** can't specify --64 && --32 ***" >&2 if [ "$b64" == "0" -a "$b32" == "0" ]; then
exit 1 b64=1;b32=1
fi
fi fi
if [ "$b64" == "0" -a "$b32" == "0" ]; then b64=1; fi
##
# begin builds
if [ $linux == 1 ]; then if [ $linux == 1 ]; then
command='' command=''
cd=/home/rmills/gnu/github/exiv2/ cd=/home/rmills/gnu/github/exiv2/
unixBuild ${user}@${server}-ubuntu Linux unixBuild ${user}@${server}-ubuntu Linux
fi fi
if [ $macosx == 1 ]; then if [ $macosx == 1 ]; then
@ -133,10 +169,16 @@ if [ $macosx == 1 ]; then
fi fi
if [ $mingw == 1 ]; then if [ $mingw == 1 ]; then
command='msys64' if [ $b64 == 1 ]; then
if [ $b32 == 1 ]; then command='msys32' ; fi command='msys64'
cd=/home/rmills/gnu/github/exiv2/ cd=/home/rmills/gnu/github/exiv2/
unixBuild ${user}@${server}-w7 MinGW unixBuild ${user}@${server}-w7 MinGW/32
fi
if [ $b32 == 1 ]; then
command='msys32'
cd=/home/rmills/gnu/github/exiv2/
unixBuild ${user}@${server}-w7 MinGW/32
fi
fi fi
if [ $cygwin == 1 ]; then if [ $cygwin == 1 ]; then
@ -146,6 +188,7 @@ if [ $cygwin == 1 ]; then
fi fi
if [ $msvc == 1 ]; then if [ $msvc == 1 ]; then
command=''
msvcBuild ${user}@${server}-w7 msvcBuild ${user}@${server}-w7
fi fi

Loading…
Cancel
Save