Skip to content

Commit

Permalink
Add a CI definition
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Joruk committed Apr 5, 2023
1 parent bb1e326 commit 7837ecd
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
on: [push, pull_request]

name: CI

jobs:
check:
name: Compile check
runs-on: macOS-latest
strategy:
matrix:
target: [x86_64-apple-darwin, aarch64-apple-darwin, aarch64-apple-ios]
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
target: ${{ matrix.target }}

- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
args: --target ${{ matrix.target }}

test:
name: Test Suite
runs-on: macos-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

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

- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test

lints:
name: Lints
runs-on: macos-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

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

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings

0 comments on commit 7837ecd

Please sign in to comment.