Build with Nix Workflow #109
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build with Nix Workflow | |
on: | |
schedule: | |
- cron: '0 0 * * 1' | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
strategy: | |
matrix: | |
flags: | |
# no flags set, default to async-std | |
- "" | |
# crates that explicitly choose async-std should keep working | |
- --cfg async_executor_impl=\"async-std\" --cfg async_channel_impl=\"async-std\" | |
- --cfg async_executor_impl=\"async-std\" --cfg async_channel_impl=\"flume\" | |
- --cfg async_executor_impl=\"tokio\" --cfg async_channel_impl=\"tokio\" | |
- --cfg async_executor_impl=\"tokio\" --cfg async_channel_impl=\"flume\" | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
steps: | |
- name: Install Nix | |
uses: cachix/install-nix-action@v26 | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Format | |
run: | | |
nix develop -c cargo fmt -- --check | |
- name: Build | |
run: | | |
nix develop -c env RUSTFLAGS="${{ matrix.flags }}" cargo build --all-targets --workspace --release --features="logging-utils" | |
- name: Test | |
run: | | |
nix develop -c env RUSTFLAGS="${{ matrix.flags }}" cargo test --all-targets --workspace --release --features="logging-utils" | |
- name: Lint | |
run: | | |
nix develop -c env RUSTFLAGS="${{ matrix.flags }}" cargo clippy --all-targets --workspace --release --bins --tests --examples --features="logging-utils" -- -D warnings |