summaryrefslogtreecommitdiffstats
path: root/.travis.yml
blob: b613fdbfbd963f992d55f2afcb7f64a4566640dd (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# .travis.yml
#
# This is the configuration file to drive Travis CI for Slang.

language: cpp

env:
  - SLANG_TEST_FLAGS=-travis

# Build and test (clang, gcc) x (debug, release)
#
# We customize the set of tests run per-target to
# avoid having the build take too long.
matrix:
  include:
    - os: linux
      compiler: gcc
      env:
        - CONFIGURATION=debug
        - SLANG_TEST_CATEGORY=smoke
    - os: linux
      compiler: clang
      env:
        - CONFIGURATION=debug
        - SLANG_TEST_CATEGORY=smoke
    - os: linux
      compiler: clang
      env:
        - CONFIGURATION=release
        - SLANG_TEST_CATEGORY=smoke
    - os: linux
      compiler: gcc
      env:
        - CONFIGURATION=release
        - SLANG_TEST_CATEGORY=full
        - SLANG_DEPLOY=true

# Travis wants to default to a build script that invokes
# `./configure && make && make test` which is appropriate
# for autoconf, but I don't want to get into that mess..
#
script: bash ./travis_build.sh && bash ./travis_test.sh
        
before_deploy: |
  export SLANG_OS_NAME=${TRAVIS_OS_NAME}
  export SLANG_ARCH_NAME=`uname -p`
  export SLANG_TAG=${TRAVIS_TAG#v}
  export SLANG_BINARY_ARCHIVE=slang-${SLANG_TAG}-${SLANG_OS_NAME}-${SLANG_ARCH_NAME}.zip
  zip -r ${SLANG_BINARY_ARCHIVE} bin/*/*/slangc bin/*/*/libslang.so bin/*/*/libslang-glslang.so docs/*.md README.md LICENSE slang.h slang-com-helper.h slang-com-ptr.h slang-tag-version.h prelude/*.h

# We are going to deploy to GitHub Releases
# on a successful build from a tag, but only
# on the one target in the build matrix that set
# `SLANG_DEPLOY`
deploy:
  provider: releases
  api_key: "$GITHUB_RELEASE_TOKEN"
  file: "$SLANG_BINARY_ARCHIVE"
  skip_cleanup: true
  on:
    condition: "$SLANG_DEPLOY =  true"
    tags: true