Skip to content

Commit

Permalink
ci: Craft support along with docs deployment to GH-pages (getsentry#84)
Browse files Browse the repository at this point in the history
* ci: Craft support along with docs deployment to GH-pages

* docs: Remove name from travis.yml for consistency
  • Loading branch information
tonyo authored Sep 14, 2018
1 parent 8ea59c8 commit 6be667d
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 4 deletions.
13 changes: 13 additions & 0 deletions appveyor.yml → .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ cache:
branches:
only:
- master
- /^release\/.+$/

environment:
fast_finish: true
DIST_DIR: '.'
CARGO_HTTP_CHECK_REVOKE: false
ZEUS_HOOK_BASE:
secure: dcqtt6sxxBV0tDkXmPZOy6GJWwOsnexYCBqoT9RB/MyqwhhOhUgL9bOJgcYxpmzuWj6Oegku7usLQe2xceislPGSIXfrUz3iTD00ufTZqcI0T/8fNDagxNjVNpr5zj+DA/JjLgkqUyQ2+hIIAGtbpHnL0C+pjfuM2iHNNDOepyY=

matrix:
- channel: stable
Expand All @@ -20,6 +23,10 @@ environment:
target: x86_64-pc-windows-msvc

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

test_script:
- make test

on_success:
- zeus job update --status=passed

on_failure:
- zeus job update --status=failed
10 changes: 10 additions & 0 deletions .craft.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
# Configuration for sentry-craft (https://github.com/getsentry/craft)
github:
owner: getsentry
repo: sentry-rust
targets:
- name: crates
- name: gh-pages
- name: github
changelogPolicy: simple
4 changes: 0 additions & 4 deletions .github/release.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ git:
branches:
only:
- master
- /^release\/.+$/

script: make $SUITE

Expand All @@ -28,6 +29,7 @@ matrix:
env: SUITE=checkall
- os: osx
env: SUITE=cargotestall
- env: SUITE=travis-push-docs

notifications:
webhooks:
Expand Down
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,12 @@ lint:
@rustup component add clippy-preview 2> /dev/null
@cargo clippy --all-features --tests -- -D clippy
.PHONY: lint

travis-push-docs:
@# Intentionally allow command output
cargo doc --no-deps
cp misc/docs/index.html target/doc/
cd target/ && zip -r gh-pages ./doc
npm install -g @zeus-ci/cli
zeus upload -t "application/zip+docs" target/gh-pages.zip
.PHONY: travis-push-docs
16 changes: 16 additions & 0 deletions misc/docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<!-- "cargo run" doesn't create index.html in target/doc directory, so we should redirect -->
<html>

<head>
<title>Sentry Rust</title>
</head>

<body>
Redirecting to <a href="./sentry/">./sentry/</a>...
<script>
window.location = './sentry/';
</script>
</body>

</html>

0 comments on commit 6be667d

Please sign in to comment.