-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.51 KB
/
build_nix.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Build with Nix Workflow
on:
schedule:
- cron: '0 0 * * 1'
workflow_dispatch:
jobs:
build:
strategy:
matrix:
flags:
- --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:
- uses: styfle/[email protected]
name: Cancel Outdated Builds
with:
all_but_latest: true
access_token: ${{ github.token }}
- name: Install Nix
uses: cachix/install-nix-action@v23
- name: Checkout Repository
uses: actions/checkout@v4
- name: Format
run: |
nix develop -c cargo fmt -- --check
- name: Build
run: |
nix develop -c RUSTFLAGS="${{ matrix.flags }}" cargo build --all-targets --workspace --release --features="logging-utils"
- name: Test
run: |
nix develop -c RUSTFLAGS="${{ matrix.flags }}" cargo test --all-targets --workspace --release --features="logging-utils"
- name: Lint
run: |
nix develop -c RUSTFLAGS="${{ matrix.flags }}" cargo clippy --all-targets --workspace --release --bins --tests --examples --features="logging-utils" -- -D warnings