Add a simple build pipeline
Some checks failed
Rust CI / Build and Test (push) Failing after 14m12s

This commit is contained in:
Joshua Coles 2024-08-01 17:22:51 +01:00
parent d22363a20e
commit cbb1d4605f

58
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,58 @@
name: Rust CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --all-features
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features
- name: Run clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
- name: Run rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check