Merge pull request #28233 from ProvableHQ/fix/self-update #724
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Mainnet Crates Docs | |
on: | |
push: | |
branches: | |
- mainnet | |
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 | |
# SCCACHE_RECACHE: 1 # Uncomment this to clear cache, then comment it back out | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
ref: mainnet | |
- name: Install sccache | |
env: | |
LINK: https://github.com/mozilla/sccache/releases/download | |
SCCACHE_VERSION: v0.7.6 | |
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 |