From 6f7d413d88be8db1bcef85c1953933062a7fd0fc Mon Sep 17 00:00:00 2001 From: Edward Hennis Date: Wed, 9 Dec 2020 11:22:22 -0500 Subject: [PATCH] Simplify travis config: * Move all the vcpkg windows dependency installations into one step. * Move the unmodified `before_install` step above the matrix to improve readability, because this step runs before any of the matrix steps. --- .travis.yml | 38 ++++++++++++++------------------------ 1 file changed, 14 insertions(+), 24 deletions(-) diff --git a/.travis.yml b/.travis.yml index ca2521dbc..3282bf958 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,9 +21,7 @@ services: - docker stages: - - windep-ssl - - windep-grpc - - windep-libarchive + - windep-vcpkg - windep-boost - build @@ -51,6 +49,14 @@ env: - CCACHE_NOHASHDIR=true - CCACHE_DIR=${CACHE_DIR}/ccache +before_install: + - export NUM_PROCESSORS=$(nproc) + - echo "NUM PROC is ${NUM_PROCESSORS}" + - if [ "$(uname)" = "Linux" ] ; then docker pull ${DOCKER_IMAGE}; fi + - if [ "${MATRIX_EVAL}" != "" ] ; then eval "${MATRIX_EVAL}"; fi + - if [ "${CMAKE_ADD}" != "" ] ; then export CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} ${CMAKE_ADD}"; fi + - bin/ci/ubuntu/travis-cache-start.sh + matrix: fast_finish: true allow_failures: @@ -64,11 +70,10 @@ matrix: # allow the rest of the builds to continue. They may succeed if the # dependency is already cached. These do not need to be retried if # _any_ of the Windows builds succeed. - - stage: windep-ssl - - stage: windep-grpc - - stage: windep-libarchive + - stage: windep-vcpkg - stage: windep-boost + # https://docs.travis-ci.com/user/build-config-yaml#usage-of-yaml-anchors-and-aliases include: # debug builds - &linux @@ -341,23 +346,16 @@ matrix: -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_TOOLCHAIN_FILE=${VCPKG_DIR}/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static" - stage: windep-ssl - name: prereq-ssl + stage: windep-vcpkg + name: prereq-vcpkg install: - choco upgrade cmake.install - choco install ninja visualstudio2017-workload-vctools -y script: - df -h + - env - travis_wait ${MAX_TIME_MIN} bin/sh/install-vcpkg.sh openssl - - <<: *windows - stage: windep-grpc - name: prereq-grpc - script: - travis_wait ${MAX_TIME_MIN} bin/sh/install-vcpkg.sh grpc - - <<: *windows - stage: windep-libarchive - name: prereq-libarchive - script: - travis_wait ${MAX_TIME_MIN} bin/sh/install-vcpkg.sh libarchive[lz4] # TBD consider rocksdb via vcpkg if/when we can build with the # vcpkg version @@ -433,14 +431,6 @@ cache: directories: - $CACHE_DIR -before_install: - - export NUM_PROCESSORS=$(nproc) - - echo "NUM PROC is ${NUM_PROCESSORS}" - - if [ "$(uname)" = "Linux" ] ; then docker pull ${DOCKER_IMAGE}; fi - - if [ "${MATRIX_EVAL}" != "" ] ; then eval "${MATRIX_EVAL}"; fi - - if [ "${CMAKE_ADD}" != "" ] ; then export CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} ${CMAKE_ADD}"; fi - - bin/ci/ubuntu/travis-cache-start.sh - notifications: email: false