Skip to content

Commit

Permalink
chore: add github build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kriswuollett committed Dec 31, 2024
1 parent d379fab commit 72f5d07
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: build

on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
rust-toolchain: [1.82.0]
runs-on: ["ubuntu-24.04", "ubuntu-24.04-arm64", "macos-15"]
runs-on: ${{ matrix.runs-on }}
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: sccache
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Install toolchain
uses: dtolnay/rust-toolchain@315e265cd78dad1e1dcf3a5074f6d6c47029d5aa
with:
toolchain: ${{ matrix.rust-toolchain }}
components: rustfmt, clippy

- name: Run sccache-cache
uses: mozilla-actions/[email protected]

- name: Run cargo fmt
run: cargo fmt --all -- --check

- name: Run cargo test
run: cargo test --verbose --lib --bins --tests --no-fail-fast

# NOTE: Need to run doc tests separately
# SEE https://github.com/rust-lang/cargo/issues/6669
- name: Run cargo doc test
run: cargo test --verbose --doc

- name: Run cargo clippy
run: |
[[ ${{ matrix.rust-toolchain }} != 1.82.0 ]] || cargo clippy --all-targets --all -- --allow=unknown-lints --deny=warnings

0 comments on commit 72f5d07

Please sign in to comment.