Make all chip records serde (#1195) #144
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: Build and Serve Crate Docs | |
on: | |
push: | |
branches: [main] | |
tags: | |
- v*.*.* | |
pull_request: | |
branches: [main] | |
paths: | |
- ".github/workflows/docs.yml" | |
env: | |
CARGO_NET_GIT_FETCH_WITH_CLI: true | |
jobs: | |
docs: | |
permissions: | |
contents: write | |
packages: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
runs-on: | |
- runs-on=${{ github.run_id }} | |
- runner=8cpu-linux-arm64 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Rust toolchain | |
uses: dtolnay/rust-toolchain@nightly | |
- name: Cargo check | |
run: cargo check | |
- name: Build documentation | |
run: cargo doc --workspace --exclude "openvm-benchmarks" --exclude "*-tests" --exclude "*-test" | |
# We only want the index page to display workspace crates, so we build | |
# separately and copy over the index as a hack | |
- name: Build index page | |
run: | | |
cargo doc --workspace --no-deps --exclude "openvm-benchmarks" --exclude "*-tests" --exclude "*-test" --target-dir target/doc-nodeps | |
cp target/doc-nodeps/doc/index.html target/doc/ | |
cp target/doc-nodeps/doc/crates.js target/doc/ | |
env: | |
RUSTDOCFLAGS: --enable-index-page -Zunstable-options | |
- name: Install s5cmd | |
run: | | |
source ci/scripts/utils.sh | |
install_s5cmd | |
# TODO: store versioned copy of docs when new v*.*.* tag is pushed | |
- name: Sync static S3 bucket | |
env: | |
S3_BUCKET: ${{ vars.CRATE_DOCS_S3_BUCKET }} | |
run: | | |
cd target/doc | |
s5cmd sync . s3://${S3_BUCKET%/}/static/ |