diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2019-08-20 21:45:04 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2019-08-21 01:03:39 +0300 |
commit | 0a3d5dba32d02221fe253eb09ba687f249f8d982 (patch) | |
tree | 5dd02ff2601944ed503222aba69a97b64fbcb5b5 | |
parent | Windows.h > windows.h (diff) | |
download | aes-tools-0a3d5dba32d02221fe253eb09ba687f249f8d982.tar.gz aes-tools-0a3d5dba32d02221fe253eb09ba687f249f8d982.zip |
add Travis configuration
Diffstat (limited to '')
-rw-r--r-- | .travis.yml | 24 | ||||
-rwxr-xr-x | .travis/build.sh | 30 | ||||
-rwxr-xr-x | .travis/build_boost.sh | 35 |
3 files changed, 89 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..3c43745 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,24 @@ +language: cpp +os: linux +dist: bionic + +env: + global: + - boost_version=1.71.0 + matrix: + - build_type=debug arch=x86 + - build_type=release arch=x86 + - build_type=debug arch=x64 + - build_type=release arch=x64 + +addons: + apt: + update: true + packages: + - mingw-w64 + +before_script: + - ./.travis/build_boost.sh + +script: + - ./.travis/build.sh diff --git a/.travis/build.sh b/.travis/build.sh new file mode 100755 index 0000000..5cc8f35 --- /dev/null +++ b/.travis/build.sh @@ -0,0 +1,30 @@ +#!/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" + +compiler_prefix=i686 +[ "$arch" = x64 ] && compiler_prefix=x86_64 + +readonly cc="$compiler_prefix-w64-mingw32-gcc" +readonly cxx="$compiler_prefix-w64-mingw32-g++" + +cd -- "$HOME" +mkdir -- cmake +cd -- cmake/ + +cmake \ + -D "CMAKE_BUILD_TYPE=$build_type" \ + -D "CMAKE_C_COMPILER=$cc" \ + -D "CMAKE_CXX_COMPILER=$cxx" \ + -D "BOOST_ROOT=$boost_dir" \ + -D "BOOST_LIBRARYDIR=$boost_librarydir" \ + -D Boost_USE_STATIC_LIBS=ON \ + -D CMAKE_SYSTEM_NAME=Windows \ + "$TRAVIS_BUILD_DIR" + +cmake --build . diff --git a/.travis/build_boost.sh b/.travis/build_boost.sh new file mode 100755 index 0000000..2d12dc8 --- /dev/null +++ b/.travis/build_boost.sh @@ -0,0 +1,35 @@ +#!/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 + +cd -- "$HOME/" + +wget -- "$boost_url" +tar xzvf "$boost_fs.tar.gz" > /dev/null +cd -- "$boost_fs/" +./bootstrap.sh + +compiler_prefix=i686 +[ "$arch" = x64 ] && compiler_prefix=x86_64 + +readonly cxx="$compiler_prefix-w64-mingw32-g++" + +echo "using gcc : : $cxx ;" > "user-config-$arch.jam" + +address_model=32 +[ "$arch" = x64 ] && address_model=64 + +./b2 \ + toolset=gcc \ + "address-model=$address_model" \ + target-os=windows \ + link=static \ + variant="$build_type" \ + "--stagedir=stage/$arch/$build_type" \ + "--user-config=user-config-$arch.jam" \ + --with-filesystem \ + --with-program_options \ + --with-system |