2022-07-19 04:28:23 +03:00
|
|
|
name: Testnet3 Crates Docs
|
2021-08-11 00:35:30 +03:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2022-07-19 04:28:23 +03:00
|
|
|
- testnet3
|
2021-08-11 00:35:30 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-crates-docs:
|
|
|
|
name: Build Crates Docs
|
|
|
|
runs-on: ubuntu-latest
|
2021-08-11 05:59:27 +03:00
|
|
|
env:
|
|
|
|
RUSTC_WRAPPER: sccache
|
|
|
|
SCCACHE_CACHE_SIZE: 2G
|
|
|
|
SCCACHE_DIR: /home/runner/.cache/sccache
|
2021-08-11 00:35:30 +03:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2021-08-11 05:59:27 +03:00
|
|
|
with:
|
2022-07-19 04:28:23 +03:00
|
|
|
ref: testnet3
|
2021-08-11 05:59:27 +03:00
|
|
|
|
|
|
|
- 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
|
2021-08-11 00:35:30 +03:00
|
|
|
|
|
|
|
- name: Install Rust Stable
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
2021-08-11 05:59:27 +03:00
|
|
|
|
|
|
|
- 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
|
2021-08-11 00:35:30 +03:00
|
|
|
|
|
|
|
- name: Build Cargo Docs
|
2021-08-11 05:59:27 +03:00
|
|
|
env:
|
|
|
|
RUSTDOCFLAGS: "--enable-index-page -Zunstable-options"
|
|
|
|
RUSTC_BOOTSTRAP: "1"
|
2021-08-11 00:35:30 +03:00
|
|
|
run: |
|
2021-08-11 05:59:27 +03:00
|
|
|
cargo doc --no-deps --document-private-items --workspace
|
|
|
|
rm -rf ./tests
|
2021-08-11 00:35:30 +03:00
|
|
|
|
|
|
|
- name: Deploy
|
|
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
2021-08-11 05:59:27 +03:00
|
|
|
publish_dir: ./target/doc/
|
|
|
|
|
|
|
|
- name: Print sccache stats
|
|
|
|
run: sccache --show-stats
|
|
|
|
|
|
|
|
- name: Stop sccache server
|
|
|
|
run: sccache --stop-server || true
|