blob: 2d9fa80a1a62bfd986df630f5811afcc45394c44 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
language: shell
dist: xenial
git:
clone: false # Clone manually in before_install
before_install:
- set -e -o pipefail
- |
if [ "${TRAVIS_PULL_REQUEST}" = false ]; then
# This is not a PR build, fetch and checkout the commit being tested
git clone -q --depth 1 "https://github.com/${TRAVIS_REPO_SLUG}.git" "${TRAVIS_REPO_SLUG}"
cd "${TRAVIS_REPO_SLUG}"
git fetch origin "${TRAVIS_COMMIT}" --depth 1
git checkout -qf "${TRAVIS_COMMIT}"
else
# This is a PR build, simulate +refs/pull/{num}/merge.
# We can do that by fetching +refs/pull/{num}/head and cherry picking it
# onto the target branch.
git clone -q --branch "${TRAVIS_BRANCH}" --depth 1 "https://github.com/${TRAVIS_REPO_SLUG}.git" "${TRAVIS_REPO_SLUG}"
cd "${TRAVIS_REPO_SLUG}"
git fetch origin "+refs/pull/${TRAVIS_PULL_REQUEST}/head" --depth 1
git config --global user.email "$(git log -1 FETCH_HEAD --pretty="%cE")"
git config --global user.name "$(git log -1 FETCH_HEAD --pretty="%aN")"
git cherry-pick --strategy=recursive -X theirs --keep-redundant-commits FETCH_HEAD
fi
cache:
directories:
- /home/travis/.cache/bazel/
os: linux
services:
- docker
jobs:
include:
# AMD64 builds are tested on kokoro, so don't run them in travis to save
# capacity for arm64 builds.
# - os: linux
# arch: amd64
- os: linux
arch: arm64
script:
# On arm64, we need to create our own pipes for stderr and stdout,
# otherwise we will not be able to open /dev/stderr. This is probably
# due to AppArmor rules.
- bash -xeo pipefail -c 'uname -a && make smoke-tests 2>&1 | cat'
branches:
except:
# Skip copybara branches.
- /^test\/cl.*$/
|