mirror of
https://github.com/kmc7468/cs420.git
synced 2025-12-15 15:08:52 +00:00
Add rustdoc action
This commit is contained in:
2
.github/bors.toml
vendored
2
.github/bors.toml
vendored
@@ -1,2 +0,0 @@
|
|||||||
delete_merged_branches = true
|
|
||||||
status = ["ci"]
|
|
||||||
41
.github/workflows/ci.yml
vendored
41
.github/workflows/ci.yml
vendored
@@ -1,41 +0,0 @@
|
|||||||
name: CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- staging
|
|
||||||
- trying
|
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
ci:
|
|
||||||
name: ci
|
|
||||||
runs-on: [self-hosted, ubuntu-22.04]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Install Rust
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
profile: minimal
|
|
||||||
override: true
|
|
||||||
components: rust-src, rustfmt, clippy
|
|
||||||
- name: Install Clang
|
|
||||||
run: sudo apt-get update && sudo apt-get install -yy clang
|
|
||||||
- name: Install RISC-V
|
|
||||||
run: (echo 'Acquire::http { Proxy "http://10.22.0.2:3142"; }' | sudo tee -a /etc/apt/apt.conf.d/01proxy) && sudo apt-get update && sudo apt-get install -yy gcc-riscv64-linux-gnu g++-riscv64-linux-gnu qemu-user-static
|
|
||||||
- name: Check
|
|
||||||
run: cargo check --all --verbose
|
|
||||||
- name: Rustfmt
|
|
||||||
run: cargo fmt --all -- --check
|
|
||||||
- name: Clippy
|
|
||||||
run: cargo clippy --all -- -D warnings
|
|
||||||
- name: Test (Debug)
|
|
||||||
run: RUST_MIN_STACK=33554432 cargo test
|
|
||||||
- name: Test (Release)
|
|
||||||
run: RUST_MIN_STACK=33554432 cargo test --release
|
|
||||||
- name: Bench
|
|
||||||
run: cd bench; make run
|
|
||||||
37
.github/workflows/rustdoc.yaml
vendored
Normal file
37
.github/workflows/rustdoc.yaml
vendored
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
name: rustdoc
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_INCREMENTAL: 0
|
||||||
|
CARGO_NET_RETRY: 10
|
||||||
|
RUSTFLAGS: "-D warnings -W unreachable-pub"
|
||||||
|
RUSTUP_MAX_RETRIES: 10
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
rustdoc:
|
||||||
|
if: github.repository == 'kaist-cp/kecc-public'
|
||||||
|
runs-on: [self-hosted, ubuntu-22.04]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install Rustup
|
||||||
|
run: if ! command -v rustup &>/dev/null; then (curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y); fi
|
||||||
|
|
||||||
|
- name: Install Rust toolchain
|
||||||
|
run: source "$HOME/.cargo/env"; rustup update --no-self-update stable
|
||||||
|
|
||||||
|
- name: Build Documentation
|
||||||
|
run: source "$HOME/.cargo/env"; cargo doc --all
|
||||||
|
|
||||||
|
- name: Deploy Docs
|
||||||
|
uses: peaceiris/actions-gh-pages@364c31d33bb99327c77b3a5438a83a357a6729ad # v3.4.0
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
publish_branch: gh-pages
|
||||||
|
publish_dir: ./target/doc
|
||||||
|
force_orphan: true
|
||||||
Reference in New Issue
Block a user