forked from msteinbeck/tinyspline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
113 lines (109 loc) · 3.68 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
if: tag IS blank
branches:
except:
- travis-storage
language: cpp
dist: bionic
sudo: true
osx_image: xcode11
os:
- linux
- osx
- windows
compiler:
- gcc
- clang
env:
- TINYSPLINE_FLOAT_PRECISION=OFF
- TINYSPLINE_FLOAT_PRECISION=ON
install:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get -qq update && sudo apt-get install -y cmake; fi;
- if [ "$TRAVIS_OS_NAME" == "windows" ]; then choco install cmake; fi;
script:
- if [ "$TRAVIS_OS_NAME" == "windows" ] && [ "$CC" == "gcc" ]; then cmake -G "Visual Studio 15 2017" -A Win32 .; fi;
- if [ "$TRAVIS_OS_NAME" == "windows" ] && [ "$CC" == "clang" ]; then cmake -G "Visual Studio 15 2017" -A x64 .; fi;
- if [ "$TRAVIS_OS_NAME" != "windows" ]; then cmake .; fi;
- cmake --build .
- cmake --build . --target tests
jobs:
include:
- stage: Deploy Binaries (Windows VM)
os: windows
install:
- choco install cmake
- choco install swig
- choco install python2
- C:\\Python27\\python -m pip install -U pip setuptools
- C:\\Python27\\python -m pip install wheel
- choco install python3
- C:\\Python38\\python -m pip install -U pip setuptools
- C:\\Python38\\python -m pip install wheel
script:
- mkdir python2
- pushd python2
- cmake -G "Visual Studio 15 2017" -A x64 -DTINYSPLINE_ENABLE_PYTHON=True -DTINYSPLINE_PYTHON_VERSION=2 ..
- C:\\Python27\\python setup.py bdist_wheel
- popd
- mkdir python3
- pushd python3
- cmake -G "Visual Studio 15 2017" -A x64 -DTINYSPLINE_ENABLE_PYTHON=True -DTINYSPLINE_PYTHON_VERSION=3 ..
- C:\\Python38\\python setup.py bdist_wheel
- popd
- git config user.name "Travis CI"
- git config user.email "travis@tinyspline.org"
- git remote add gh https://${TRAVIS_REPO_SLUG%/*}:${GITHUB_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git
- git branch -D travis-storage >/dev/null 2>&1 || true
- git checkout --orphan travis-storage
- cp python2/dist/tinyspline*.whl ./
- cp python3/dist/tinyspline*.whl ./
- git add tinyspline*.whl
- git commit tinyspline*.whl -m "Windows build for ${TRAVIS_COMMIT}"
- git push -f gh travis-storage >/dev/null 2>&1
- git remote remove gh
- stage: Deploy Binaries (Linux Docker)
os: linux
sudo: true
services: docker
install:
- sudo apt-get -qq update && sudo apt-get install -y luarocks
script:
- pushd tools/ci
- ./build.linux-x86_64.sh
- ./build.macosx-x86_64.sh
- ./build.windows-x86_64.sh
- ./bundle.sh
- popd
before_deploy:
- git tag -f snapshot
- git remote add gh https://${TRAVIS_REPO_SLUG%/*}:${GITHUB_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git
- git push -f gh snapshot >/dev/null 2>&1
- git fetch gh >/dev/null 2>&1
- git checkout gh/travis-storage tinyspline*.whl
- mv tinyspline*.whl tools/ci/tinyspline
- git remote remove gh
deploy:
- provider: releases
api-key: $GITHUB_TOKEN
skip_cleanup: true
file_glob: true
file: tools/ci/tinyspline/*
name: Snapshot build
prerelease: true
overwrite: true
target_commitish: $TRAVIS_COMMIT
on:
branch: master
- stage: Deploy Website
service: docker
install: skip
script:
- pushd tools/ci
- ./build.docs.sh
- popd
deploy:
- provider: pages
github_token: $GITHUB_TOKEN
skip_cleanup: true
local_dir: tools/ci/build.docs/html
on:
branch: master