Skip to content

Commit

Permalink
Add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jackTabsCode committed Mar 6, 2024
1 parent 1f2f0d5 commit e36f6f0
Showing 1 changed file with 97 additions and 0 deletions.
97 changes: 97 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: CI

on:
push:
branches:
- master

pull_request:
branches:
- master

jobs:
build:
name: Build and Test
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal

- name: Rust cache
uses: Swatinem/rust-cache@v2

- name: Setup Aftman
uses: ok-nick/setup-aftman@v0.3.0
with:
version: "v0.2.7"

- name: Build
run: cargo build --locked --verbose

- name: Test
run: cargo test --locked --verbose

msrv:
name: Check MSRV
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.70.0
override: true
profile: minimal

- name: Rust cache
uses: Swatinem/rust-cache@v2

- name: Setup Aftman
uses: ok-nick/setup-aftman@v0.3.0
with:
version: "v0.2.7"

- name: Build
run: cargo build --locked --verbose

lint:
name: Rustfmt & Clippy
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy

- name: Rust cache
uses: Swatinem/rust-cache@v2

- name: Rustfmt
run: cargo fmt -- --check

- name: Clippy
run: cargo clippy

0 comments on commit e36f6f0

Please sign in to comment.