Skip to content

Commit

Permalink
ci: update feature check with nix
Browse files Browse the repository at this point in the history
  • Loading branch information
yanganto committed Apr 23, 2024
1 parent 4b0edf1 commit 9584f00
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# NOTE: Dont use nix here else everything should be based on the ubuntu-latest
- name: Install rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Default build
- name: Latest Ubuntu build check
uses: actions-rs/cargo@v1
with:
command: check
Expand All @@ -34,21 +35,12 @@ jobs:
- serde
steps:
- uses: actions/checkout@v4
- name: Install rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Feature ${{ matrix.feature }}
uses: actions-rs/cargo@v1
with:
command: check
args: --no-default-features --features=${{ matrix.feature }}
- name: Defaults + ${{ matrix.feature }}
uses: actions-rs/cargo@v1
with:
command: check
args: --features=${{ matrix.feature }}
- name: Install Nix
uses: cachix/install-nix-action@v26
- name: Check feature ${{ matrix.feature }} ony
run: nix develop .#stable -c cargo check --no-default-features --features=${{ matrix.feature }}
- name: Check feature ${{ matrix.feature }} with defaults
run: nix develop .#stable -c cargo check --features=${{ matrix.feature }}
platforms:
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -57,6 +49,7 @@ jobs:
os: [ ubuntu-20.04, ubuntu-22.04, macos-12, macos-13, windows-2019, windows-2022 ]
steps:
- uses: actions/checkout@v4
# NOTE: Dont use nix in platform checks everything should based on the host system
- name: Install rust stable
uses: actions-rs/toolchain@v1
with:
Expand Down

0 comments on commit 9584f00

Please sign in to comment.