Update imports to remove all std to core (#25) #44
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: "generic rust checks" | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "**.md" | |
pull_request: | |
paths-ignore: | |
- "**.md" | |
# If new code is pushed to a PR branch, then cancel in progress workflows for | |
# that PR. Ensures that we don't waste CI time, and returns results quicker. | |
concurrency: | |
group: ci-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
# Not needed in CI, should make things a bit faster | |
CARGO_INCREMENTAL: 0 | |
CARGO_TERM_COLOR: always | |
# Remove unnecessary WASM build artifacts | |
WASM_BUILD_CLEAN_TARGET: 1 | |
# stripping symbols and optimizing for binary size | |
RUSTFLAGS: -C strip=symbols -C opt-level=s | |
# Enable sscache | |
RUSTC_WRAPPER: "sccache" | |
SCCACHE_GHA_ENABLED: "true" | |
SCCACHE_CACHE_SIZE: "50GB" | |
jobs: | |
clippy-fmt-test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-22.04 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: git checkout | |
uses: actions/checkout@v4 | |
- name: Run sccache | |
uses: mozilla-actions/[email protected] | |
- name: install rust toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
components: clippy, rustfmt | |
- name: Check format | |
run: cargo fmt --all -- --check | |
- name: Run tests | |
run: cargo test --release | |
- name: Check clippy | |
run: cargo clippy --release --locked --all-targets -- -D warnings | |
- name: Check Documentation | |
run: cargo doc --release --locked --all --no-deps | |
env: | |
RUSTDOCFLAGS: "-D rustdoc::broken-intra-doc-links -D rustdoc::private_intra_doc_links" | |