-
Notifications
You must be signed in to change notification settings - Fork 222
140 lines (113 loc) · 4.62 KB
/
main.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
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: CI
on:
push:
branches:
# test branches
- 'try-**'
# main branches
- main
- next
pull_request:
release:
types: [released, prereleased]
jobs:
ci:
strategy:
matrix:
version:
- 1.60.0 # MSRV
- stable
- nightly
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: setup toolchain
# `--no-self-update` is needed due to a permission issue on the GHA env.
run: |
rustup set profile minimal
rustup toolchain install ${{ matrix.version }} --no-self-update
rustup override set ${{ matrix.version }}
- name: check build serde,macos_kqueue for examples
if: matrix.version != '1.60.0' && matrix.os == 'macos-latest'
run: cargo check -p notify --features=serde,macos_kqueue --examples
- name: check build serde,macos_kqueue
if: matrix.version == '1.60.0' && matrix.os == 'macos-latest'
run: cargo check -p notify --features=serde,macos_kqueue
- name: check build serde for examples
if: matrix.version != '1.60.0' && matrix.os != 'macos-latest'
run: cargo check -p notify --features=serde --examples
- name: check build serde
if: matrix.version == '1.60.0' && matrix.os != 'macos-latest'
run: cargo check --features=serde
- name: check build without crossbeam/default features
if: matrix.version == 'stable'
run: cargo check -p notify --no-default-features --features=macos_fsevent
# -p notify required for feature selection!
- name: check build without crossbeam/default features on macos with kqueue
if: matrix.version == 'stable' && matrix.os == 'macos-latest'
run: cargo check -p notify --no-default-features --features=macos_kqueue
# -p notify required for feature selection!
- name: check notify debouncer mini without crossbeam/default features
if: matrix.version == 'stable'
run: cargo check -p notify-debouncer-mini --no-default-features --features=macos_fsevent
# -p required for feature selection to actually work!
- name: check notify debouncer mini without crossbeam/default features on macos with kqueue
if: matrix.version == 'stable' && matrix.os == 'macos-latest'
run: cargo check -p notify-debouncer-mini --no-default-features --features=macos_kqueue
# -p required for feature selection to actually work!
- name: check notify debouncer full without crossbeam/default features
if: matrix.version == 'stable'
run: cargo check -p notify-debouncer-full --no-default-features --features=macos_fsevent
# -p required for feature selection to actually work!
- name: check notify debouncer full without crossbeam/default features on macos with kqueue
if: matrix.version == 'stable' && matrix.os == 'macos-latest'
run: cargo check -p notify-debouncer-full --no-default-features --features=macos_kqueue
# -p required for feature selection to actually work!
- name: check build examples
if: matrix.version == 'stable'
run: cargo check --package examples --examples
- name: test hot_reload_tide
if: matrix.version == 'stable'
run: cargo test
working-directory: examples/hot_reload_tide
- name: test
if: matrix.version == 'stable'
shell: bash
run: tests/and-retry --features serde
bsd:
strategy:
matrix:
target:
- x86_64-unknown-netbsd
- x86_64-unknown-freebsd
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: setup toolchain
# `--no-self-update` is needed due to a permission issue on the GHA env.
run: |
rustup set profile minimal
rustup toolchain install stable --no-self-update
rustup target add ${{ matrix.target }}
- name: check build
# we can't cargo build here due to missing OS libraries
# see .cirrus.yml for full netbsd builds
run: |
rustc --version && cargo --version
cargo check --target ${{ matrix.target }}
- name: check build without crossbeam/default features
run: cargo build -p notify --no-default-features --target ${{ matrix.target }}
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install cargo-audit
run: |
rustup override set stable
cargo install cargo-audit
- name: audit check
run: cargo audit