diff options
Diffstat (limited to '')
-rw-r--r-- | .travis.yml | 47 | ||||
-rw-r--r-- | .travis/Dockerfile | 39 | ||||
-rw-r--r-- | .travis/docker-compose.yml | 6 |
3 files changed, 92 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..c97f832 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,47 @@ +language: minimal +os: linux +dist: bionic + +services: + - docker + +env: + global: + travis_boost_version: 1.65.0 + jobs: + - configuration=Debug platform=x86 + - configuration=Release platform=x86 + - configuration=Debug platform=x64 + - configuration=Release platform=x64 + +script: + # MinGW-w64 7.0 or higher is required, which is only available on Focal. + # I tried building it manually, but failed miserably, which is why I opted + # for a Docker build. + - cd .travis + - >- + docker-compose build + --build-arg travis_boost_version="$travis_boost_version" + --build-arg platform="$platform" + --build-arg configuration="$configuration" + mingw_build + +jobs: + fast_finish: true + + include: + - name: Run clang-format + if: branch = master + addons: + apt: + update: true + packages: + - clang-format-9 + sources: + - sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main' + key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key' + # Clear before_script: + before_script: + - true + script: + - ./cmake/tools/clang-format.py --clang-format clang-format-9 diff --git a/.travis/Dockerfile b/.travis/Dockerfile new file mode 100644 index 0000000..fe5af2f --- /dev/null +++ b/.travis/Dockerfile @@ -0,0 +1,39 @@ +FROM ubuntu:focal + +RUN apt-get update -yq && \ + apt-get install -yq --no-install-recommends \ + # Used to download Boost: + ca-certificates \ + # Used to bootstrap Boost: + g++ \ + # Build scripts: + python3 \ + # Build tools: + cmake \ + make \ + mingw-w64 + +ARG travis_boost_version=1.65.0 +ARG platform=x86 +ARG configuration=Debug + +# We're on Travis, that's right. +ENV TRAVIS=1 +ENV TRAVIS_BUILD_DIR=/usr/src +COPY [".", "$TRAVIS_BUILD_DIR"] +WORKDIR "$TRAVIS_BUILD_DIR" + +RUN ./cmake/boost/build/ci/travis.py \ + --link static \ + -- \ + target-os=windows \ + --user-config="$TRAVIS_BUILD_DIR/cmake/boost/toolchains/mingw-w64-$platform.jam" \ + --with-filesystem \ + --with-program_options && \ + ./cmake/cmake/build/ci/travis.py \ + --install "$HOME/install" \ + -- \ + -D CMAKE_SYSTEM_NAME=Windows \ + -D "CMAKE_TOOLCHAIN_FILE=$TRAVIS_BUILD_DIR/cmake/cmake/toolchains/mingw-w64-$platform.cmake" \ + -D "BOOST_ROOT=$HOME/boost_1_65_0" \ + -D "BOOST_LIBRARYDIR=$HOME/boost_1_65_0/stage/$platform/$configuration/lib" diff --git a/.travis/docker-compose.yml b/.travis/docker-compose.yml new file mode 100644 index 0000000..71fbbca --- /dev/null +++ b/.travis/docker-compose.yml @@ -0,0 +1,6 @@ +version: '3' +services: + mingw_build: + build: + context: .. + dockerfile: .travis/Dockerfile |