File: ci-travis

package info (click to toggle)
xalan 1.12-12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,368 kB
  • sloc: cpp: 145,645; xml: 1,523; ansic: 434; sh: 27; makefile: 17
file content (36 lines) | stat: -rwxr-xr-x 890 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
# This script is used for testing the build, primarily for use
# with travis, but may be used by hand as well.

set -e
set -x

# Test autoconf build
cmake_build()
{
    opts=""
    if [ -n "$3" ]; then
        opts="$opts -Dmessage-loader=$3"
    fi
    if [ -n "$4" ]; then
        opts="$opts -Dtranscoder=$4"
    fi

    PATH="$(pwd)/tools/bin:$PATH"
    if [ "$(uname -s)" = "Darwin" ]; then
        PATH="$(pwd)/tools/CMake.app/Contents/bin:$PATH"
        opts="$opts -DICU_ROOT=/usr/local/opt/icu4c"
    fi
    mkdir cmake-build
    cd cmake-build
    echo "Running cmake -G "$1" -DCMAKE_BUILD_TYPE="$2" -DCMAKE_INSTALL_PREFIX=../cmake-install ${opts} .."
    cmake -G "$1" -DCMAKE_BUILD_TYPE="$2" -DCMAKE_INSTALL_PREFIX=../cmake-install ${opts} ..
    cmake --build .
    cmake --build . --target install
    ctest -V
}

echo "Testing CMake build"
cmake_build "$@"

exit 0