-
Notifications
You must be signed in to change notification settings - Fork 6
72 lines (72 loc) · 2.17 KB
/
Copy pathci.yml
File metadata and controls
72 lines (72 loc) · 2.17 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: "CI"
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
build:
strategy:
matrix:
min-version: [true, false]
msrv:
- rust-version: 1.62.1
features: full
- rust-version: 1.62.1
features: ""
- rust-version: 1.62.1
features: "full,rand_v0_8"
- rust-version: 1.63.0
features: "full,rand_v0_9"
- rust-version: 1.85.1
features: "full,rand_v0_10"
- rust-version: 1.85.1
features: "full,rand_v0_8,rand_v0_9,rand_v0_10"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=channel:nixos-unstable
- if: ${{ matrix.min-version }}
run: nix develop .. -c cargo update -Z minimal-versions
working-directory: ./lib
- run: nix develop .. -c cargo msrv verify --rust-version ${{ matrix.msrv.rust-version }} --no-default-features --features "${{ matrix.msrv.features }}"
working-directory: ./lib
env:
CARGO_NET_GIT_FETCH_WITH_CLI: true # workaround slow index fetch: https://github.com/rust-lang/cargo/issues/11014
- run: nix flake check --keep-going --print-build-logs
test:
strategy:
matrix:
min-version: [true, false]
features:
- "default"
- ""
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=channel:nixos-unstable
- if: ${{ matrix.min-version }}
run: nix develop .. -c cargo update -Z minimal-versions
working-directory: ./simple
- run: nix develop .. -c cargo test --no-default-features --features "${{ matrix.features }}"
working-directory: ./simple
semver-check:
strategy:
matrix:
feature-flags:
- ""
- "--only-explicit-features"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: nix develop .. -c cargo semver-checks ${{ matrix.feature-flags }}
working-directory: ./lib