Skip to content

Commit

Permalink
Merge pull request #29 from h7x4/update-pipeline-structure
Browse files Browse the repository at this point in the history
Update main workflow with several changes
  • Loading branch information
jiegec authored Oct 29, 2023
2 parents 5fe58fb + db56238 commit f567e8d
Showing 1 changed file with 36 additions and 16 deletions.
52 changes: 36 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,43 @@
name: CI

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --all-features --verbose

check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt, clippy
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- name: Check code format
run: cargo fmt -- --check
- name: Check clippy
run: cargo clippy -- --deny warnings
- name: Build
run: cargo build --verbose
- uses: actions-rs/cargo@v1
with:
command: test
run: cargo clippy --all-features -- --deny warnings

test:
runs-on: '${{ matrix.os }}'
strategy:
matrix:
include:
- os: macos-latest
- os: ubuntu-latest
- os: windows-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test --all-features
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort'
Expand All @@ -34,7 +48,13 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ${{ steps.coverage.outputs.report }}
- name: Run benchmarks
run: cargo bench --verbose
if: github.event_name == 'pull_request'

docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
- name: Build docs
run: cargo doc --verbose

0 comments on commit f567e8d

Please sign in to comment.