Skip to content

Commit

Permalink
Add a basic CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ElouanPetereau committed Nov 17, 2023
1 parent db7b712 commit f7e2a0b
Show file tree
Hide file tree
Showing 2 changed files with 134 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/ci_no_std.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: no-std check
on: [push]

jobs:
format_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all --check
lib:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --no-default-features --features libm -- -D warnings
- uses: actions-rs/cargo@v1
with:
command: build
args: --no-default-features --features libm

tests:
needs: lib
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --tests --no-default-features --features libm -- -D warnings
- uses: actions-rs/cargo@v1
with:
command: test
args: --no-default-features --features libm

examples:
needs: lib
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --examples --no-default-features --features libm -- -D warnings
67 changes: 67 additions & 0 deletions .github/workflows/ci_std.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: std check
on: [push]

jobs:
format_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all --check
lib:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
- uses: actions-rs/cargo@v1
with:
command: build
args: --no-default-features --features libm

tests:
needs: lib
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --tests -- -D warnings
- uses: actions-rs/cargo@v1
with:
command: test
args: --no-default-features --features libm

examples:
needs: lib
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --examples -- -D warnings

0 comments on commit f7e2a0b

Please sign in to comment.