forked from google/jsonnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
73 lines (67 loc) · 1.88 KB
/
.travis.yml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
language: generic
matrix:
include:
- os: linux
env: COMPILER_NAME=gcc CXX=g++-4.9 CC=gcc-4.9 COMMON_OS_NAME=${TRAVIS_OS_NAME}
addons:
apt:
packages:
- g++-4.9
sources: &sources
- llvm-toolchain-precise-3.8
- ubuntu-toolchain-r-test
- os: linux
env: COMPILER_NAME=clang CXX=clang++-3.8 CC=clang-3.8 COMMON_OS_NAME=${TRAVIS_OS_NAME}
addons:
apt:
packages:
- clang-3.8
sources: *sources
- os: osx
osx_image: xcode11.3
env: CC=gcc-9 && CXX=g++-9 COMMON_OS_NAME=darwin
- os: osx
osx_image: xcode11.3
env: CC=clang && CXX=clang++ COMMON_OS_NAME=darwin
before_install:
- echo $LANG
- echo $LC_ALL
- $CXX --version
script:
# - rvm get head # Workaround 'shell_session_update: command not found'
- set -e
- make test
- python setup.py build
- python setup.py test
# Test CMake build scripts.
- cmake . -Bbuild && cmake --build build --target run_tests
# make a tarfile for the binaries and rename for os and tag
- make dist
- mv jsonnet-bin.tar.gz jsonnet-bin-${TRAVIS_TAG}-${COMMON_OS_NAME}.tar.gz
deploy:
provider: releases
api_key: $JSONNET_GITHUB_TOKEN
file: jsonnet-bin-${TRAVIS_TAG}-${TRAVIS_OS_NAME}.tar.gz
skip_cleanup: true
on:
tags: true
# no point deploying the images built with both compilers
condition: $CC =~ gcc
branches:
only:
- master
# the branch name is the tag name, so having only master means you can't
# trigger a build by just push a tag - so add in a regex to match tags that
# should trigger.
- /^v.*$/
notifications:
recipients:
email:
on_success: change
on_failure: always
irc:
channels:
- "chat.freenode.net#jsonnet"
template:
- "%{repository}/%{branch} (%{commit} - %{author}): %{message}"