Skip to content

Commit

Permalink
refactor: simplify ci and use setup-rust-action
Browse files Browse the repository at this point in the history
  • Loading branch information
wash2 committed Mar 1, 2024
1 parent 9e5f753 commit 5aa103d
Showing 1 changed file with 10 additions and 27 deletions.
37 changes: 10 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,18 @@ jobs:
key: cargo-${{ matrix.rust }}

- name: Rust toolchain
uses: actions-rs/toolchain@v1
uses: hecrj/setup-rust-action@v1
with:
toolchain: ${{ matrix.rust }}
override: true
rust-version: ${{ matrix.rust }}

- name: Install system dependencies
run: sudo apt-get install libxkbcommon-dev libwayland-dev

- name: Check lib no features
uses: actions-rs/cargo@v1
with:
command: check
args: --no-default-features
run: cargo check --no-default-features

- name: Check full features
uses: actions-rs/cargo@v1
with:
command: check
args: --all-features
run: cargo check --all-features

test:
strategy:
Expand All @@ -63,31 +56,21 @@ jobs:
key: cargo-${{ matrix.rust }}

- name: Rust toolchain
uses: actions-rs/toolchain@v1
uses: hecrj/setup-rust-action@v1
with:
toolchain: ${{ matrix.rust }}
override: true
rust-version: ${{ matrix.rust }}

- name: Install system dependencies
run: sudo apt-get install libxkbcommon-dev libwayland-dev

- name: Test lib no features
uses: actions-rs/cargo@v1
with:
command: test
args: --no-default-features --lib
run: cargo test --no-default-features --lib

- name: Test doc no features
uses: actions-rs/cargo@v1
with:
command: test
args: --no-default-features --doc
run: cargo test --no-default-features --doc

- name: Test full features
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features
run: cargo test --all-features

lint:
runs-on: ubuntu-latest
Expand All @@ -97,7 +80,7 @@ jobs:
uses: actions/checkout@v2

- name: Rust toolchain
uses: actions-rs/toolchain@v1
uses: hecrj/setup-rust-action@v1
with:
toolchain: stable
override: true
Expand Down

0 comments on commit 5aa103d

Please sign in to comment.