aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.travis
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2019-12-10 11:30:27 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2019-12-10 16:44:54 +0300
commitcf15b237108360ee92f35898e35fa5a52cfc889a (patch)
tree9c95f527c25b9c14d14018e156a9fad6b286ded3 /.travis
parentREADME: update (diff)
downloadmath-server-cf15b237108360ee92f35898e35fa5a52cfc889a.tar.gz
math-server-cf15b237108360ee92f35898e35fa5a52cfc889a.zip
AppVeyor/Travis: switch to cmake/build
Diffstat (limited to '')
-rw-r--r--.travis.yml17
-rw-r--r--.travis/.gitattributes1
-rwxr-xr-x.travis/build.sh26
-rwxr-xr-x.travis/build_boost.sh49
4 files changed, 12 insertions, 81 deletions
diff --git a/.travis.yml b/.travis.yml
index 66ba91c..9ce761a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,13 +4,20 @@ dist: bionic
env:
global:
- - boost_version=1.71.0
+ - travis_boost_version=1.71.0
matrix:
- - build_type=debug arch=x64
- - build_type=release arch=x64
+ - configuration=Debug platform=x64
+ - configuration=Release platform=x64
before_script:
- - ./.travis/build_boost.sh
+ - ./cmake/build/boost/build_travis.sh --with-filesystem --with-program_options --with-test
script:
- - ./.travis/build.sh
+ - |-
+ ./cmake/build/build_travis.py \
+ --configuration "$configuration" \
+ --install "$HOME/install" \
+ --boost "$HOME/boost_1_71_0" \
+ --boost-librarydir "$HOME/boost_1_71_0/stage/$platform/${configuration,,}/lib" \
+ -- -DENABLE_TESTS=ON
+ - "$HOME/install/bin/unit_tests"
diff --git a/.travis/.gitattributes b/.travis/.gitattributes
deleted file mode 100644
index dfdb8b7..0000000
--- a/.travis/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
-*.sh text eol=lf
diff --git a/.travis/build.sh b/.travis/build.sh
deleted file mode 100755
index eeeec17..0000000
--- a/.travis/build.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env bash
-
-set -o errexit -o nounset -o pipefail -o xtrace
-
-readonly boost_fs="boost_${boost_version//\./_}"
-readonly boost_dir="$HOME/$boost_fs"
-readonly boost_librarydir="$boost_dir/stage/$arch/$build_type/lib"
-
-readonly build_dir="$HOME/build"
-readonly install_dir="$HOME/install"
-
-main() {
- mkdir -p -- "$build_dir"
- cd -- "$build_dir"
- cmake \
- -D "CMAKE_BUILD_TYPE=$build_type" \
- -D "CMAKE_INSTALL_PREFIX=$install_dir" \
- -D "BOOST_ROOT=$boost_dir" \
- -D "BOOST_LIBRARYDIR=$boost_librarydir" \
- -D ENABLE_TESTS=ON \
- "$TRAVIS_BUILD_DIR"
- cmake --build . --config "$build_type" --target install -- -j
- "$install_dir/bin/unit_tests" --log_level=all
-}
-
-main
diff --git a/.travis/build_boost.sh b/.travis/build_boost.sh
deleted file mode 100755
index 94869ef..0000000
--- a/.travis/build_boost.sh
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/env bash
-
-set -o errexit -o nounset -o pipefail -o xtrace
-
-readonly boost_fs="boost_${boost_version//\./_}"
-readonly boost_url="https://dl.bintray.com/boostorg/release/$boost_version/source/$boost_fs.tar.gz"
-readonly boost_dir="$HOME/$boost_fs"
-
-address_model=32
-[ "$arch" = x64 ] && address_model=64
-readonly address_model
-
-clean() {
- cd -- "$HOME/"
-}
-
-download() {
- trap clean RETURN
- wget -- "$boost_url"
- tar xzvf "$boost_fs.tar.gz" > /dev/null
-}
-
-bootstrap() {
- trap clean RETURN
- cd -- "$boost_dir"
- ./bootstrap.sh
-}
-
-build() {
- trap clean RETURN
- cd -- "$boost_dir"
- ./b2 \
- "address-model=$address_model" \
- link=static \
- variant="$build_type" \
- "--stagedir=stage/$arch/$build_type" \
- --with-filesystem \
- --with-program_options \
- --with-test
-}
-
-main() {
- clean
- download
- bootstrap
- build
-}
-
-main