forked from samizdatco/skia-canvas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
39 lines (39 loc) · 1.16 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
branches:
only:
- /^v.*$/
env:
- RUST_SKIA_TAG="0.33.0"
os:
- osx
- linux
# - windows
dist: bionic
language: node_js
node_js:
- lts/*
- node
cache:
- cargo
- npm
before_install:
# Install Rust and Cargo
- curl https://sh.rustup.rs -sSf > /tmp/rustup.sh
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then export RUSTUP_OPTIONS="--default-host x86_64-pc-windows-msvc --default-toolchain stable-x86_64-pc-windows-msvc"; fi
- sh /tmp/rustup.sh -y
- export PATH="$HOME/.cargo/bin:$PATH"
- source "$HOME/.cargo/env" || true
- rustc --version
- cargo --version
- node -v
- npm -v
# Clone the rust-skia repo with the proper tag
- git clone --depth 1 --branch $RUST_SKIA_TAG https://github.com/rust-skia/rust-skia.git ../rust-skia
- npm install -g neon-cli
# Build rust-skia from source on linux (use downloaded binaries on mac)
- if [ "$TRAVIS_OS_NAME" != "osx" ]; then sed -i.bak 's/^skia-safe.*/skia-safe = { path = "..\/..\/rust-skia\/skia-safe", features = ["textlayout"] }/' native/Cargo.toml; fi
install:
- travis_wait 25 npm ci
script:
- npm test
- npm run package
- if [ -n "$TRAVIS_TAG" ]; then npm run upload-binary || exit 0; fi