Skip to content

Commit

Permalink
Update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jonlamb-gh committed Feb 9, 2024
1 parent 0306520 commit f9fb2a3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 41 deletions.
40 changes: 9 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,19 @@ jobs:
key: ${{ matrix.os }}-cargo--${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}

- name: Install toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
components: clippy, rustfmt
toolchain: ${{ matrix.rust }}
override: true

- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
run: cargo clippy --all-features -- -W clippy::all -D warnings

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

- name: Doc Generation
uses: actions-rs/cargo@v1
with:
command: doc
args: --all-features
run: cargo doc --bins --examples --all-features --no-deps

build:
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -85,23 +75,16 @@ jobs:
key: ${{ matrix.os }}-cargo--${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}

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

- name: Build debug binary
uses: actions-rs/cargo@v1
with:
command: build
run: cargo build

- name: Build release binary
uses: actions-rs/cargo@v1
with:
command: build
args: --release
run: cargo build --release

test:
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -135,15 +118,10 @@ jobs:
key: ${{ matrix.os }}-cargo--${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}

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

- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features -- --test-threads=1
run: cargo test --all-features -- --test-threads=1
13 changes: 3 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,15 @@ jobs:
uses: actions/checkout@v4

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

- name: Fetch dependencies
uses: actions-rs/cargo@v1
with:
command: fetch
run: cargo fetch

- name: Build release binaries
uses: actions-rs/cargo@v1
with:
command: build
args: --release
run: cargo build --release

- name: Create github release
id: create_release
Expand Down

0 comments on commit f9fb2a3

Please sign in to comment.