From 8c36c59cadf2e232df58c2b1b8861ee9bc56d415 Mon Sep 17 00:00:00 2001 From: Derek Bruening Date: Sat, 15 Feb 2020 15:02:37 -0500 Subject: [PATCH] i#2255 Travis pkgs: Support scheduled or manual package builds (#2258) We need to check for both "type" and the TRAVIS_EVENT_TYPE env var in the jobs matrix to support both scheduled and manually-triggered package builds. Issue: #2255 --- .travis.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9a2b0cc37..c8ce802a2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,26 +43,30 @@ language: # We use a jobs include approach rather than an os, compiler, env matrix # with exludes so we can use conditional builds (plus it's clearer this way). +# For packages, "type = cron" is for the real cron builds, and the env var +# TRAVIS_EVENT_TYPE is set for manually-triggered package builds (that +# same env var is set by Travis for "type = cron" but the env var is not +# set during job matrix setup: only once a job starts). jobs: include: ####################################################################### # Regular test jobs - - if: type != cron + - if: type != cron AND env(TRAVIS_EVENT_TYPE) != cron os: linux compiler: gcc - - if: type != cron + - if: type != cron AND env(TRAVIS_EVENT_TYPE) != cron os: linux compiler: clang - - if: type != cron + - if: type != cron AND env(TRAVIS_EVENT_TYPE) != cron os: osx compiler: clang ####################################################################### # Package jobs - - if: type = cron + - if: type = cron OR env(TRAVIS_EVENT_TYPE) = cron os: linux compiler: gcc env: DEPLOY=yes - - if: type = cron + - if: type = cron OR env(TRAVIS_EVENT_TYPE) = cron os: osx compiler: clang env: DEPLOY=yes