This repository has been archived by the owner on Dec 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
86 lines (77 loc) · 2.65 KB
/
documentation.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
name: docs
on:
push:
branches:
- master
jobs:
documentation:
runs-on: ubuntu-latest
steps:
- name: Load last run details
uses: actions/cache@v3
with:
path: |
~/rustc-version.txt
~/outcome.txt
key: documentation
- name: Install Rust
uses: hecrj/setup-rust-action@v1
with:
rust-version: nightly
- name: Compare rustc versions
id: rustc-version
if: github.event_name == 'schedule'
continue-on-error: true
run: "! diff -u ~/rustc-version.txt <(rustc -V)"
- name: Save new rustc version
run: rustc -V > ~/rustc-version.txt
- name: Emit last outcome if rustc version is the same
if: steps.rustc-version.outcome == 'failure'
run: diff -u ~/outcome.txt <(echo "success")
- name: Checkout
if: steps.rustc-version.outcome != 'failure'
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Curl
if: steps.rustc-version.outcome != 'failure'
run: |
sudo apt update
sudo apt install libcurl4-openssl-dev
- name: Get sentry-native commit
id: sentry-native
if: steps.rustc-version.outcome != 'failure'
run:
echo "::set-output name=version::$(git submodule status | cut -d ' '
-f 2)"
- name: Cache sentry-native
if: steps.rustc-version.outcome != 'failure'
uses: actions/cache@v3
with:
path: ~/sentry-native
key:
${{ runner.os }}-${{ steps.sentry-native.outputs.version }}-true-${{
hashFiles('sentry-contrib-native-sys/build.rs') }}
- name: Set SENTRY_NATIVE_INSTALL
if: steps.rustc-version.outcome != 'failure'
run: echo >>$GITHUB_ENV SENTRY_NATIVE_INSTALL=$HOME/sentry-native
- name: Documentation
if: steps.rustc-version.outcome != 'failure'
env:
RUSTDOCFLAGS: -Z unstable-options --enable-index-page
run:
cargo -v doc --features transport-custom --no-deps --workspace
--exclude dylib
- name: Deploy
if: steps.rustc-version.outcome != 'failure'
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
branch: gh-pages
folder: target/doc/
git-config-name: github-actions
git-config-email: 41898282+github-actions[bot]@users.noreply.github.com
target-folder: master/doc/
clean: true
- name: Save outcome
if: always() && steps.rustc-version.outcome != 'failure'
run: echo ${{ job.status }} > ~/outcome.txt