Skip to content

Commit 03d7061

Browse files
committed
Merge branch 'main' of https://github.com/notify-rs/notify into filter-watch-targets
# Conflicts: # notify/src/fsevent.rs # notify/src/inotify.rs # notify/src/lib.rs
2 parents 561c4bc + 978fe71 commit 03d7061

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1952
-756
lines changed

.cirrus.yml

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,42 @@
1-
# adopted from https://github.com/tokio-rs/tokio/blob/master/.cirrus.yml
21
freebsd_instance:
3-
image_family: freebsd-13-2
2+
image_family: freebsd-14-2
3+
4+
env:
5+
CARGO_TERM_COLOR: always
6+
RUST_BACKTRACE: 1
7+
48
task:
5-
name: FreeBSD 64-bit
9+
name: FreeBSD
10+
matrix:
11+
- name: FreeBSD 14.0 - Rust stable
12+
env:
13+
RUST_VERSION: stable
14+
- name: FreeBSD 14.0 - Rust nightly
15+
env:
16+
RUST_VERSION: nightly
17+
- name: FreeBSD 14.0 - Rust 1.77.2 (MSRV)
18+
env:
19+
RUST_VERSION: 1.77.2
20+
621
setup_script:
7-
- pkg install -y bash
8-
- curl https://sh.rustup.rs -sSf --output rustup.sh
9-
- sh rustup.sh -y --profile minimal --default-toolchain stable
22+
- rm -f rust-toolchain.toml
23+
- curl https://sh.rustup.rs -sSf | sh -s -- -y --profile=minimal --default-toolchain ${RUST_VERSION}
1024
- . $HOME/.cargo/env
11-
- |
12-
echo "~~~~ rustc --version ~~~~"
13-
rustc --version
25+
- cargo --version
26+
- rustc --version
27+
28+
cargo_cache:
29+
folder: $HOME/.cargo/registry
30+
fingerprint_script: cat Cargo.lock || echo "No Cargo.lock"
31+
32+
build_script:
33+
- . $HOME/.cargo/env
34+
- cargo build --verbose
35+
36+
build_examples_script:
37+
- . $HOME/.cargo/env
38+
- cargo build --examples --verbose
39+
1440
test_script:
1541
- . $HOME/.cargo/env
16-
- cargo test --all --all-features
42+
- cargo test --verbose

.github/workflows/ci.yml

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
env:
11+
CARGO_TERM_COLOR: always
12+
RUST_BACKTRACE: 1
13+
14+
jobs:
15+
# Code quality checks
16+
quality:
17+
name: Quality Checks
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Cache dependencies
23+
uses: Swatinem/rust-cache@v2
24+
25+
- name: Check formatting
26+
run: cargo fmt --all -- --check
27+
28+
- name: Clippy
29+
run: cargo clippy --all-targets --all-features -- -D warnings
30+
31+
- name: Install typos-cli
32+
uses: taiki-e/install-action@v2
33+
with:
34+
tool: typos-cli
35+
36+
- name: Check for typos
37+
run: typos
38+
39+
- name: Install cargo-deny
40+
uses: taiki-e/install-action@v2
41+
with:
42+
tool: cargo-deny
43+
44+
- name: Run cargo-deny
45+
run: cargo deny check
46+
47+
- name: Install cargo-machete
48+
uses: taiki-e/install-action@v2
49+
with:
50+
tool: cargo-machete
51+
52+
- name: Run cargo-machete
53+
run: cargo machete
54+
55+
# Test on multiple platforms with different Rust versions
56+
test:
57+
name: Test ${{ matrix.os }} - ${{ matrix.rust }} ${{ matrix.features != '' && format('({0})', matrix.features) || '' }}
58+
runs-on: ${{ matrix.os }}
59+
needs: quality
60+
strategy:
61+
fail-fast: false
62+
matrix:
63+
os: [ubuntu-latest, windows-latest]
64+
rust: [stable, nightly, 1.77.2]
65+
features: [""]
66+
include:
67+
# MacOS with fsevent
68+
- os: macos-latest
69+
rust: stable
70+
features: "--no-default-features --features macos_fsevent"
71+
- os: macos-latest
72+
rust: nightly
73+
features: "--no-default-features --features macos_fsevent"
74+
- os: macos-latest
75+
rust: 1.77.2
76+
features: "--no-default-features --features macos_fsevent"
77+
# MacOS with kqueue
78+
- os: macos-latest
79+
rust: stable
80+
features: "--no-default-features --features macos_kqueue"
81+
- os: macos-latest
82+
rust: nightly
83+
features: "--no-default-features --features macos_kqueue"
84+
- os: macos-latest
85+
rust: 1.77.2
86+
features: "--no-default-features --features macos_kqueue"
87+
88+
steps:
89+
- uses: actions/checkout@v4
90+
91+
- name: Remove rust-toolchain.toml (Unix)
92+
if: runner.os != 'Windows'
93+
run: rm -f rust-toolchain.toml
94+
95+
- name: Remove rust-toolchain.toml (Windows)
96+
if: runner.os == 'Windows'
97+
run: |
98+
if (Test-Path rust-toolchain.toml) {
99+
Remove-Item -Path rust-toolchain.toml
100+
}
101+
102+
- name: Install Rust ${{ matrix.rust }}
103+
uses: dtolnay/rust-toolchain@master
104+
with:
105+
toolchain: ${{ matrix.rust }}
106+
107+
- name: Cache dependencies
108+
uses: Swatinem/rust-cache@v2
109+
110+
- name: Build
111+
run: cargo build --verbose ${{ matrix.features }}
112+
113+
- name: Build examples
114+
run: cargo build --examples --verbose ${{ matrix.features }}
115+
116+
- name: Run tests
117+
run: cargo test --verbose ${{ matrix.features }}
118+
119+
# Android cross-compilation
120+
android:
121+
name: Android
122+
runs-on: ubuntu-latest
123+
needs: quality
124+
steps:
125+
- uses: actions/checkout@v4
126+
127+
- name: Remove rust-toolchain.toml
128+
run: rm -f rust-toolchain.toml
129+
130+
- name: Install Rust
131+
uses: dtolnay/rust-toolchain@stable
132+
with:
133+
targets: armv7-linux-androideabi, aarch64-linux-android
134+
135+
- name: Cache dependencies
136+
uses: Swatinem/rust-cache@v2
137+
138+
- name: Install cargo-ndk
139+
uses: taiki-e/install-action@v2
140+
with:
141+
tool: cargo-ndk
142+
143+
- name: Build for Android (arm64)
144+
run: cargo ndk --target aarch64-linux-android build --verbose
145+
146+
- name: Build for Android (arm)
147+
run: cargo ndk --target armv7-linux-androideabi build --verbose
148+
149+
# # WebAssembly System Interface (WASI)
150+
# wasi:
151+
# name: WASI
152+
# runs-on: ubuntu-latest
153+
# needs: quality
154+
# steps:
155+
# - uses: actions/checkout@v4
156+
157+
# - name: Remove rust-toolchain.toml
158+
# run: rm -f rust-toolchain.toml
159+
160+
# - name: Install Rust
161+
# uses: dtolnay/rust-toolchain@nightly
162+
# with:
163+
# targets: wasm32-wasip2
164+
165+
# - name: Cache dependencies
166+
# uses: Swatinem/rust-cache@v2
167+
168+
# - name: Build for WASI
169+
# run: cargo build --target wasm32-wasip2 --verbose
170+
171+
# - name: Build examples for WASI
172+
# run: cargo build --examples --target wasm32-wasip2 --verbose

.github/workflows/main.yml

Lines changed: 0 additions & 140 deletions
This file was deleted.

.typos.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# See the configuration reference at
2+
# https://github.com/crate-ci/typos/blob/master/docs/reference.md
3+
4+
# Corrections take the form of a key/value pair. The key is the incorrect word
5+
# and the value is the correct word. If the key and value are the same, the
6+
# word is treated as always correct. If the value is an empty string, the word
7+
# is treated as always incorrect.
8+
9+
# Match Identifier - Case Sensitive
10+
[default.extend-identifiers]
11+
ecd686ba = "ecd686ba" # In the CHANGELOG.md
12+
waitres = "waitres"
13+
14+
# Match Inside a Word - Case Insensitive
15+
[default.extend-words]
16+
17+
[files]
18+
# Include .github, .cargo, etc.
19+
ignore-hidden = false
20+
# /.git isn't in .gitignore, because git never tracks it.
21+
# Typos doesn't know that, though.
22+
extend-exclude = ["/.git"]

0 commit comments

Comments
 (0)