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 37ba098
Show file tree
Hide file tree
Showing 2 changed files with 148 additions and 0 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/ci_no_std.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: no-std check
on: [push]

jobs:
format_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- 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@v2
- uses: actions-rs/toolchain@v1
with:
components: clippy
toolchain: stable
override: true
- uses: actions-rs/clippy-check@v1
name: clippy lib
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --no-default-features --features libm -- -D warnings
- uses: actions-rs/cargo@v1
name: build crate
with:
command: build
args: --no-default-features --features libm

tests:
needs: lib
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/clippy-check@v1
name: clippy tests
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --test --no-default-features --features libm -- -D warnings
- uses: actions-rs/cargo@v1
name: run tests
with:
command: test
args: --no-default-features --features libm

examples:
needs: lib
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
components: clippy
toolchain: stable
override: true
- uses: actions-rs/clippy-check@v1
name: clippy examples
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --test --no-default-features --features libm -- -D warnings
74 changes: 74 additions & 0 deletions .github/workflows/ci_std.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: std check
on: [push]

jobs:
format_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- 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@v2
- uses: actions-rs/toolchain@v1
with:
components: clippy
toolchain: stable
override: true
- uses: actions-rs/clippy-check@v1
name: clippy lib
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: -- -D warnings
- uses: actions-rs/cargo@v1
name: build crate
with:
command: build
args: --no-default-features --features libm

tests:
needs: lib
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/clippy-check@v1
name: clippy tests
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --test -- -D warnings
- uses: actions-rs/cargo@v1
name: run tests
with:
command: test
args: --no-default-features --features libm

examples:
needs: lib
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
components: clippy
toolchain: stable
override: true
- uses: actions-rs/clippy-check@v1
name: clippy examples
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --test -- -D warnings

0 comments on commit 37ba098

Please sign in to comment.