File: .travis.yml

package info (click to toggle)
jsonnet 0.20.0%2Bds-3.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,376 kB
  • sloc: cpp: 66,583; ansic: 8,227; python: 2,833; sh: 1,948; javascript: 1,417; makefile: 196; java: 140
file content (76 lines) | stat: -rw-r--r-- 2,089 bytes parent folder | download | duplicates (3)
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
74
75
76
language: generic
dist: bionic

matrix:
  include:
    - os: linux
      env: COMPILER_NAME=gcc CXX=g++-5 CC=gcc-5 COMMON_OS_NAME=${TRAVIS_OS_NAME}
      addons:
        apt:
          packages:
            - g++-5
          sources: &sources
            - llvm-toolchain-bionic-11
            - sourceline: 'deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-11 main'
              key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
            - ubuntu-toolchain-r-test    
    - os: linux
      env: COMPILER_NAME=clang CXX=clang++-11 CC=clang-11 COMMON_OS_NAME=${TRAVIS_OS_NAME}
      addons:
        apt:
          packages:
            - clang-11
          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:
    - sparkprime@gmail.com
  email:
    on_success: change
    on_failure: always
  irc:
    channels:
      - "chat.freenode.net#jsonnet"
    template:
      - "%{repository}/%{branch} (%{commit} - %{author}): %{message}"