-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
61 lines (46 loc) · 1.32 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
language: rust
rust:
- stable
cache: cargo
before_install:
- git submodule update --init --recursive
install:
- curl -L https://github.com/google/protobuf/releases/download/v3.3.0/protoc-3.3.0-linux-x86_64.zip -o /tmp/protoc.zip
- unzip /tmp/protoc.zip -d $HOME/protoc
env:
- PATH=$HOME/protoc/bin:$PATH
script:
- make all test
stages:
- test
- name: doc
if: branch = master
- name: deploy
if: branch =~ ^release\/.*$ AND type = push
jobs:
include:
- stage: test
script:
- rustc --version
- cargo --version
- cargo test --all --verbose
- stage: doc
script:
- rustc --version
- cargo --version
- cargo doc --no-deps
deploy:
provider: pages
skip_cleanup: true
local_dir: target/doc/
github_token: $GITHUB_TOKEN
- stage: deploy
script:
- rustc --version
- cargo --version
# Publish the crate to crates.io
- cargo publish --token $CARGO_TOKEN
# Generate a tag with the version we just deployed
- git tag `cargo pkgid | sed -E 's/.*#(.*:)?(.+)/\2/'`
# Push the tag back to the repository
- git push https://awestlake87:[email protected]/awestlake87/sc2-proto-rs.git `cargo pkgid | sed -E 's/.*#(.*:)?(.+)/\2/'`