-
Notifications
You must be signed in to change notification settings - Fork 659
69 lines (60 loc) · 1.92 KB
/
docs.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
name: Testnet3 Crates Docs
on:
push:
branches:
- testnet3
jobs:
build-crates-docs:
name: Build Crates Docs
runs-on: ubuntu-latest
env:
RUSTC_WRAPPER: sccache
SCCACHE_CACHE_SIZE: 2G
SCCACHE_DIR: /home/runner/.cache/sccache
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: testnet3
- name: Install sccache
env:
LINK: https://github.com/mozilla/sccache/releases/download
SCCACHE_VERSION: v0.2.15
run: |
SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl
mkdir -p $HOME/.local/bin
curl -L "$LINK/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz
mv -f $SCCACHE_FILE/sccache $HOME/.local/bin/sccache
chmod +x $HOME/.local/bin/sccache
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install Rust Stable
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Save sccache
uses: actions/cache@v2
continue-on-error: false
with:
path: /home/runner/.cache/sccache
key: ubuntu-sccache-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ubuntu-sccache-
- name: Start sccache server
run: sccache --start-server
- name: Build Cargo Docs
env:
RUSTDOCFLAGS: "--enable-index-page -Zunstable-options"
RUSTC_BOOTSTRAP: "1"
run: |
cargo doc --no-deps --document-private-items --workspace
rm -rf ./tests
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/doc/
- name: Print sccache stats
run: sccache --show-stats
- name: Stop sccache server
run: sccache --stop-server || true