Skip to content

Merge pull request #12 from EspressoSystems/dependabot/github_actions… #10

Merge pull request #12 from EspressoSystems/dependabot/github_actions…

Merge pull request #12 from EspressoSystems/dependabot/github_actions… #10

Workflow file for this run

name: Build
on:
push:
branches:
- main
- release-*
pull_request:
branches:
- main
- release-*
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
env:
RUST_LOG: info
steps:
- uses: actions/checkout@v4
name: Checkout Repository
- name: Install Protoc
uses: arduino/setup-protoc@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
name: Enable Rust Caching
- name: Format Check
run: cargo fmt -- --check
- name: Audit
run: cargo audit --ignore RUSTSEC-2023-0018 --ignore RUSTSEC-2023-0052 --ignore RUSTSEC-2023-0065
- name: Lint
run: |
cargo clippy --workspace --release
- name: Build
# Build in release without `testing` feature.
run: |
cargo build --workspace --release
- name: Test
# Build test binary with `testing` feature
run: |
cargo test --workspace --release --all-features --no-run
cargo test --workspace --release --all-features --verbose -- --test-threads 2
timeout-minutes: 60
- name: Generate Documentation
run: |
cargo doc --no-deps --lib --release
echo '<meta http-equiv="refresh" content="0; url=versioned-binary-serialization">' > target/doc/index.html
- name: Deploy Documentation
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/doc
cname: versioned-binary-serialization.docs.espressosys.com