Skip to content

Commit

Permalink
add GitHub Actions CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbepop committed Jul 6, 2024
1 parent 12809a9 commit d34fa53
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Continuous Integration

on:
push:
branches: [main]
pull_request:
branches: [main]

# disable running jobs on earlier commits
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
check:
name: Build Cases
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown, x86_64-unknown-none
- name: Set up Rust cache
uses: Swatinem/rust-cache@v2
- name: Build (default features)
run: cargo run --package build_benches --locked --verbose

fmt:
name: Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: Foramtting
run: cargo fmt --all -- --check

doc:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: dtolnay/rust-toolchain@stable
with:
components: rust-docs, rust-src
- name: Set up Rust cache
uses: Swatinem/rust-cache@v2
- name: Check Docs
env:
RUSTDOCFLAGS: "-D warnings"
run: cargo doc --workspace --locked --all-features --no-deps --document-private-items

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
- name: Set up Rust cache
uses: Swatinem/rust-cache@v2
- name: Checkout Submodules
run: git submodule update --init --recursive
- name: Clippy (default features)
run: cargo clippy --workspace --locked -- -D warnings

0 comments on commit d34fa53

Please sign in to comment.