From f25cfe277d9fc5515a6e12c20bce4c88a77b2228 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 10 May 2021 09:43:08 -0400 Subject: [PATCH] travis: Install hugo binary from github It currently takes 4 minutes to install hugo with homebrew. Using a faster way to install hugo could speed up the Travis CI build by as much as 42%. --- .travis.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8c7acfc3e..59814f5aa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,16 +41,11 @@ install: - node --version - npm --version -# linuxbrew (for hugo) -- git clone https://github.com/Homebrew/brew ~/.linuxbrew/Homebrew -- mkdir ~/.linuxbrew/bin -- ln -s ~/.linuxbrew/Homebrew/bin/brew ~/.linuxbrew/bin -- eval $(~/.linuxbrew/bin/brew shellenv) - # hugo (for documentation) -- brew install hugo +- curl --output - -L https://api.github.com/repos/gohugoio/hugo/releases/latest | grep --color=never "browser_download_url.*Linux-64bit.tar.gz" | grep -v extended | cut -d ':' -f2,3 | tr -d '"' | xargs -n 1 curl -L --output hugo.tar.gz # print hugo version (useful for debugging documentation build errors) -- hugo version +- tar -zxf hugo.tar.gz +- ./hugo version script: # Check Python code @@ -79,7 +74,7 @@ script: # Build documentation - cd $TRAVIS_BUILD_DIR/docs -- hugo --verbose --environment staging +- ../hugo --verbose --environment staging # verify swimm - cd $TRAVIS_BUILD_DIR