This repository was archived by the owner on Aug 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.travis.yml
110 lines (98 loc) · 2.61 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
dist: bionic
language: rust
cache:
directories:
- /home/travis/.cargo
before_cache:
- rm -rf /home/travis/.cargo/registry
before_install:
- nvm install 12 # needed for scripts/_scripts/markdown/validate-link-refs.js
install:
- rustup component add clippy || cargo install --git https://github.com/rust-lang/rust-clippy/ --force clippy
- rustup component add rustfmt
jobs:
fast_finish: true
include:
- name: "Stable"
if: type != pull_request
rust: stable
env: CHANNEL="stable"
- name: "Nightly"
if: type != pull_request
rust: nightly-2020-11-17
env: CHANNEL="nightly"
- name: "Linux release"
if: tag IS present
rust: stable
os: linux
env: CHANNEL="stable"
- name: "MacOS release"
if: tag IS present
rust: stable
os: osx
env: CHANNEL="stable"
# If more needs to be added here, it should be added to ladder.
script: ./ladder ensure
after_success:
- |
if [ "$TRAVIS_BRANCH" == "base" ]; then
if [ "$CHANNEL" == "stable" ]; then
export DEPLOY_UI=1
scripts/build_www
elif [ "$CHANNEL" == "nightly" ]; then
cargo doc --no-deps --target-dir docs-public
cargo doc --document-private-items --no-deps --target-dir docs-internal
export DEPLOY_DOCS=1
fi
fi
if [ ! -z "$TRAVIS_TAG" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
cargo build --release
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
mv target/release/slide slide-x86_64-linux
export DEPLOY_FILE="slide-x86_64-linux"
else
mv target/release/slide slide-x86_64-apple-darwin
export DEPLOY_FILE="slide-x86_64-apple-darwin"
fi
fi
DOCS_DEPLOY_DEFAULTS: &docs_deploy_defaults
provider: pages:git
edge: true
token: $GITHUB_TOKEN
keep_history: true
verbose: true
project_name: slide
name: slide-bot
email: [email protected]
committer_from_gh: true
deployment_file: true
deploy:
# Documentation:public
- <<: *docs_deploy_defaults
repo: yslide/docs
target_branch: base
local_dir: docs-public/doc
on:
condition: $DEPLOY_DOCS = 1
# Documentation:internal
- <<: *docs_deploy_defaults
repo: yslide/internals
target_branch: base
local_dir: docs-internal/doc
on:
condition: $DEPLOY_DOCS = 1
# Web UI
- <<: *docs_deploy_defaults
repo: yslide/yslide.github.io
target_branch: base
local_dir: www/
on:
condition: $DEPLOY_UI = 1
# Binary releases
- provider: releases
edge: true
token: $GITHUB_TOKEN
file: $DEPLOY_FILE
on:
tags: true
run: ./scripts/publish