diff options
author | Vincent Ambo <tazjin@google.com> | 2020-05-27T00·26+0100 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-05-27T00·26+0100 |
commit | afe04691aca3f669f517adaeb5bd4a87a481fb4a (patch) | |
tree | 60ae6c91a3959b2f6486256e26ff126e598d1e5d /.travis.yml |
Squashed 'third_party/glog/' content from commit 9ef754a3023
git-subtree-dir: third_party/glog git-subtree-split: 9ef754a3023e6fd10f20fe53dfca96dd898182e3
Diffstat (limited to '.travis.yml')
-rw-r--r-- | .travis.yml | 119 |
1 files changed, 119 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000000..911fa5e0e181 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,119 @@ +sudo: required +language: bash +services: + - docker + +# define the build matrix +env: + global: + - PROJECT_DIR: . + - TOOLCHAIN: gcc-cxx11 + - BUILD_PACKAGES: cmake + - RUN_TESTS: true + +matrix: + include: + # Linux { + + # Ubuntu 14.04 + - os: linux + env: > + BUILD_FLAVOR=ubuntu + BUILD_RELEASE=trusty + BUILD_ARCH=amd64 + BUILD_PACKAGES=cmake3 + - os: linux + env: > + BUILD_FLAVOR=ubuntu + BUILD_RELEASE=trusty + BUILD_ARCH=i386 + BUILD_PACKAGES=cmake3 + # Ubuntu 16.04 + - os: linux + env: > + BUILD_FLAVOR=ubuntu + BUILD_RELEASE=xenial + BUILD_ARCH=amd64 + - os: linux + env: > + BUILD_FLAVOR=ubuntu + BUILD_RELEASE=xenial + BUILD_ARCH=i386 + # Ubuntu 18.04 + - os: linux + env: > + BUILD_FLAVOR=ubuntu + BUILD_RELEASE=bionic + BUILD_ARCH=amd64 + TOOLCHAIN=gcc-cxx98 + - os: linux + env: > + BUILD_FLAVOR=ubuntu + BUILD_RELEASE=bionic + BUILD_ARCH=amd64 + - os: linux + env: > + BUILD_FLAVOR=ubuntu + BUILD_RELEASE=bionic + BUILD_ARCH=amd64 + TOOLCHAIN=gcc-gnuxx11 + - os: linux + env: > + BUILD_FLAVOR=ubuntu + BUILD_RELEASE=bionic + BUILD_ARCH=amd64 + TOOLCHAIN=gcc-cxx17 + - os: linux + env: > + BUILD_FLAVOR=ubuntu + BUILD_RELEASE=bionic + BUILD_ARCH=amd64 + TOOLCHAIN=clang-cxx17 + BUILD_PACKAGES="cmake clang" + # } // end Linux + + # Windows build with mingw-w64 on Ubuntu 18.04 + - os: linux + env: > + BUILD_FLAVOR=ubuntu + BUILD_RELEASE=bionic + BUILD_ARCH=amd64 + TOOLCHAIN=linux-mingw-w64-cxx11 + BUILD_PACKAGES="cmake mingw-w64 wine-stable" + - os: linux + env: > + BUILD_FLAVOR=ubuntu + BUILD_RELEASE=bionic + BUILD_ARCH=amd64 + TOOLCHAIN=linux-mingw-w64-gnuxx11 + BUILD_PACKAGES="cmake mingw-w64 wine-stable" + - os: linux + env: > + BUILD_FLAVOR=ubuntu + BUILD_RELEASE=bionic + BUILD_ARCH=amd64 + TOOLCHAIN=linux-mingw-w64-cxx17 + BUILD_PACKAGES="cmake mingw-w64 wine-stable" + +before_install: + # use the Dockerfile.<distro>.template file for building the image with sed magic + - | + sed \ + -e "s/@BUILD_FLAVOR@/${BUILD_FLAVOR}/g" \ + -e "s/@BUILD_RELEASE@/${BUILD_RELEASE}/g" \ + -e "s/@BUILD_ARCH@/${BUILD_ARCH}/g" \ + -e "s/@BUILD_PACKAGES@/${BUILD_PACKAGES}/g" \ + Dockerfile.$BUILD_FLAVOR.template | tee Dockerfile.$BUILD_FLAVOR.$BUILD_RELEASE.$BUILD_ARCH + - docker build -f Dockerfile.$BUILD_FLAVOR.$BUILD_RELEASE.$BUILD_ARCH -t glog-devel . + +script: | + # run the respective .travis.<distro>.sh script + docker run \ + -e BUILD_FLAVOR="$BUILD_FLAVOR" \ + -e BUILD_RELEASE="$BUILD_RELEASE" \ + -e BUILD_ARCH="$BUILD_ARCH" \ + -e PROJECT_DIR="$PROJECT_DIR" \ + -e TOOLCHAIN="$TOOLCHAIN" \ + -e RUN_TESTS="$RUN_TESTS" \ + -it glog-devel ./.travis.$BUILD_FLAVOR.sh + |