mirror of
https://github.com/gohugoio/hugo.git
synced 2025-03-22 18:22:04 +00:00
Update .travis.yml for arm64 support, etc.
- Add arm64 support for Linux thanks to Travis CI’s new feature, see https://blog.travis-ci.com/2019-10-07-multi-cpu-architecture-support - Force GO111MODULE=on - Cache directories - Switch to bionic (Ubuntu 18.04) environment - Use "master" instead of "tip" to match the latest Travis CI docs - Allow "mage -v check" to fail on non-AMD64 architectures because "go test -race ./..." currently fails on arm64 and ppc64le.
This commit is contained in:
parent
c6d69d0c95
commit
ae4fde0866
1 changed files with 47 additions and 17 deletions
64
.travis.yml
64
.travis.yml
|
@ -1,27 +1,59 @@
|
||||||
language: go
|
language: go
|
||||||
sudo: false
|
|
||||||
dist: xenial
|
dist: bionic
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- GOPROXY="https://proxy.golang.org"
|
- CACHE_NAME=${TRAVIS_ARCH}
|
||||||
- HUGO_BUILD_TAGS="extended"
|
- GO111MODULE=on
|
||||||
|
- GOPROXY=https://proxy.golang.org
|
||||||
|
- HUGO_BUILD_TAGS=extended
|
||||||
|
|
||||||
git:
|
git:
|
||||||
depth: false
|
depth: false
|
||||||
|
|
||||||
go:
|
go:
|
||||||
- "1.12.10"
|
- "1.12.10"
|
||||||
- "1.13.1"
|
- "1.13.1"
|
||||||
- tip
|
- master
|
||||||
|
|
||||||
|
arch:
|
||||||
|
- amd64
|
||||||
|
- arm64
|
||||||
|
|
||||||
os:
|
os:
|
||||||
- linux
|
- linux
|
||||||
- osx
|
- osx
|
||||||
- windows
|
- windows
|
||||||
matrix:
|
|
||||||
|
jobs:
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- go: tip
|
- go: master
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
exclude:
|
exclude:
|
||||||
- os: windows
|
- os: windows
|
||||||
go: tip
|
go: master
|
||||||
|
- arch: arm64
|
||||||
|
os: osx
|
||||||
|
- arch: arm64
|
||||||
|
os: windows
|
||||||
|
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- $HOME/gopath/pkg/mod
|
||||||
|
- $HOME/.cache/go-build
|
||||||
|
- $HOME/Library/Caches/go-build
|
||||||
|
- $HOME/AppData/Local/go-build
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- df -h
|
||||||
|
# https://travis-ci.community/t/go-cant-find-gcc-with-go1-11-1-on-windows/293/5
|
||||||
|
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then
|
||||||
|
choco install mingw -y;
|
||||||
|
export PATH=/c/tools/mingw64/bin:"$PATH";
|
||||||
|
fi
|
||||||
|
- gem install asciidoctor
|
||||||
|
- type asciidoctor
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- mkdir -p $HOME/src
|
- mkdir -p $HOME/src
|
||||||
|
@ -29,18 +61,16 @@ install:
|
||||||
- export TRAVIS_BUILD_DIR=$HOME/src/hugo
|
- export TRAVIS_BUILD_DIR=$HOME/src/hugo
|
||||||
- cd $HOME/src/hugo
|
- cd $HOME/src/hugo
|
||||||
- go get github.com/magefile/mage
|
- go get github.com/magefile/mage
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- go mod download || true
|
- go mod download || true
|
||||||
- mage -v test
|
- mage -v test
|
||||||
- mage -v check
|
- if [ "$TRAVIS_ARCH" = "amd64" ]; then
|
||||||
|
mage -v check;
|
||||||
|
else
|
||||||
|
mage -v check || true;
|
||||||
|
fi
|
||||||
- mage -v hugo
|
- mage -v hugo
|
||||||
- ./hugo -s docs/
|
- ./hugo -s docs/
|
||||||
- ./hugo --renderToMemory -s docs/
|
- ./hugo --renderToMemory -s docs/
|
||||||
- df -h
|
- df -h
|
||||||
|
|
||||||
before_install:
|
|
||||||
- df -h
|
|
||||||
# https://travis-ci.community/t/go-cant-find-gcc-with-go1-11-1-on-windows/293/5
|
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then choco install mingw -y; export PATH=/c/tools/mingw64/bin:"$PATH"; fi
|
|
||||||
- gem install asciidoctor
|
|
||||||
- type asciidoctor
|
|
||||||
|
|
Loading…
Reference in a new issue