Skip to content

Commit 6be667d

Browse files
authored
ci: Craft support along with docs deployment to GH-pages (getsentry#84)
* ci: Craft support along with docs deployment to GH-pages * docs: Remove name from travis.yml for consistency
1 parent 8ea59c8 commit 6be667d

File tree

6 files changed

+50
-4
lines changed

6 files changed

+50
-4
lines changed

appveyor.yml renamed to .appveyor.yml

+13
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ cache:
77
branches:
88
only:
99
- master
10+
- /^release\/.+$/
1011

1112
environment:
1213
fast_finish: true
1314
DIST_DIR: '.'
1415
CARGO_HTTP_CHECK_REVOKE: false
16+
ZEUS_HOOK_BASE:
17+
secure: dcqtt6sxxBV0tDkXmPZOy6GJWwOsnexYCBqoT9RB/MyqwhhOhUgL9bOJgcYxpmzuWj6Oegku7usLQe2xceislPGSIXfrUz3iTD00ufTZqcI0T/8fNDagxNjVNpr5zj+DA/JjLgkqUyQ2+hIIAGtbpHnL0C+pjfuM2iHNNDOepyY=
1518

1619
matrix:
1720
- channel: stable
@@ -20,6 +23,10 @@ environment:
2023
target: x86_64-pc-windows-msvc
2124

2225
install:
26+
# Push job information to Zeus
27+
- npm install -g @zeus-ci/cli
28+
- zeus job update --status=pending
29+
# Install rust
2330
- appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
2431
- rustup-init -yv --default-toolchain %channel% --default-host %target%
2532
- set PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%;%USERPROFILE%\.cargo\bin
@@ -30,3 +37,9 @@ build: false
3037

3138
test_script:
3239
- make test
40+
41+
on_success:
42+
- zeus job update --status=passed
43+
44+
on_failure:
45+
- zeus job update --status=failed

.craft.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
# Configuration for sentry-craft (https://github.com/getsentry/craft)
3+
github:
4+
owner: getsentry
5+
repo: sentry-rust
6+
targets:
7+
- name: crates
8+
- name: gh-pages
9+
- name: github
10+
changelogPolicy: simple

.github/release.yml

-4
This file was deleted.

.travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ git:
99
branches:
1010
only:
1111
- master
12+
- /^release\/.+$/
1213

1314
script: make $SUITE
1415

@@ -28,6 +29,7 @@ matrix:
2829
env: SUITE=checkall
2930
- os: osx
3031
env: SUITE=cargotestall
32+
- env: SUITE=travis-push-docs
3133

3234
notifications:
3335
webhooks:

Makefile

+9
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,12 @@ lint:
8181
@rustup component add clippy-preview 2> /dev/null
8282
@cargo clippy --all-features --tests -- -D clippy
8383
.PHONY: lint
84+
85+
travis-push-docs:
86+
@# Intentionally allow command output
87+
cargo doc --no-deps
88+
cp misc/docs/index.html target/doc/
89+
cd target/ && zip -r gh-pages ./doc
90+
npm install -g @zeus-ci/cli
91+
zeus upload -t "application/zip+docs" target/gh-pages.zip
92+
.PHONY: travis-push-docs

misc/docs/index.html

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<!-- "cargo run" doesn't create index.html in target/doc directory, so we should redirect -->
3+
<html>
4+
5+
<head>
6+
<title>Sentry Rust</title>
7+
</head>
8+
9+
<body>
10+
Redirecting to <a href="./sentry/">./sentry/</a>...
11+
<script>
12+
window.location = './sentry/';
13+
</script>
14+
</body>
15+
16+
</html>

0 commit comments

Comments
 (0)