This repository has been archived by the owner on Sep 21, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
79 lines (72 loc) · 1.92 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
74
75
76
77
78
79
env:
global:
- DEPS_DIR=${TRAVIS_BUILD_DIR}/deps
language: c
sudo: false
cache:
directories:
- ${DEPS_DIR}/doxygen/doxygen-1.8.11/bin
matrix:
include:
- os: linux
dist: trusty
- os: osx
osx_image: xcode9.1
compiler: clang
allow_failures:
- os: osx
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-5.0
packages:
- clang-5.0
- llvm-5.0
- llvm-5.0-dev
- lld-5.0
- liblz4-dev
- graphviz
- python3
- python3-pip
- jq
install:
# Set postfix variable
- export LLVM_POSTFIX=-5.0
# Download and install recent cmake (linux only)
- |
if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
CMAKE_URL="http://www.cmake.org/files/v3.4/cmake-3.4.3-Linux-x86_64.tar.gz"
mkdir -p ${DEPS_DIR}/cmake
travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${DEPS_DIR}/cmake
export PATH=${DEPS_DIR}/cmake/bin:${PATH}
fi
# Setup Mac packages (no brew plugin) and remove -5.0 postfix
- |
if [[ ${TRAVIS_OS_NAME} == "osx" ]]; then
export LLVM_POSTFIX="";
brew install llvm qemu lz4 ;
brew upgrade python ;
export PATH="$(brew --prefix llvm)/bin:$(brew --prefix python3)/bin:$PATH";
fi
- pip3 install --user --upgrade pip setuptools wheel
before_script:
- pip3 install --user -r requirements.txt
script: make LD=ld.lld$LLVM_POSTFIX
after_success:
- cd dist/
- tar czvf ../libtransistor-base_$TRAVIS_TAG.tar.gz ./
- zip -r ../libtransistor-base_$TRAVIS_TAG.zip ./
- cd ../
deploy:
- provider: releases
api_key: $GITHUB_TOKEN
file:
- "libtransistor-base_$TRAVIS_TAG.tar.gz"
- "libtransistor-base_$TRAVIS_TAG.zip"
skip-cleanup: true
draft: true
tag_name: $TRAVIS_TAG
on:
tags: true
condition: $TRAVIS_OS_NAME = linux