Skip to content

Commit

Permalink
Merge pull request #51 from mkroening/ci-actions
Browse files Browse the repository at this point in the history
ci: migrate away from unmaintained actions
  • Loading branch information
phil-opp authored Apr 21, 2024
2 parents 4100da0 + 7afbc49 commit 279d80c
Showing 1 changed file with 17 additions and 85 deletions.
102 changes: 17 additions & 85 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# Based on https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md
#
# While our "example" application has the platform-specific code,
# for simplicity we are compiling and testing everything on the Ubuntu environment only.
# For multi-OS testing see the `cross.yml` workflow.

on: [push, pull_request]

name: Build
Expand All @@ -16,103 +10,41 @@ jobs:
name: Check
runs-on: ubuntu-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 check
uses: actions-rs/cargo@v1
with:
command: check
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo check --workspace

test:
name: Test Suite
runs-on: ubuntu-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
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --workspace

unstable:
name: Test Suite (unstable)
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

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

- name: Run cargo test --features unstable
uses: actions-rs/cargo@v1
with:
command: test
args: --features unstable
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- run: cargo test --workspace --features unstable

very_unstable:
name: Test Suite (very_unstable)
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

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

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

- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- run: cargo test --workspace --features very_unstable

lints:
name: Lints
runs-on: ubuntu-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
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
command: clippy
components: clippy, rustfmt
- run: cargo fmt --all --check
- run: cargo clippy --workspace

0 comments on commit 279d80c

Please sign in to comment.