39 lines
1.0 KiB
YAML
39 lines
1.0 KiB
YAML
name: tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "*"
|
|
# not on tags
|
|
pull_request:
|
|
|
|
env:
|
|
RUSTFLAGS: "-D warnings"
|
|
RUST_BACKTRACE: "1"
|
|
|
|
jobs:
|
|
cargo_tests:
|
|
name: ${{ matrix.os }} ${{ matrix.rust_channel }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: ["ubuntu-latest", "macOS-latest"]
|
|
rust_channel:
|
|
- stable
|
|
- beta
|
|
- nightly
|
|
- 1.74 # The real MSRV is 1.63 (inherited from libc) but tests require 1.74.
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: ${{ matrix.rust_channel }}
|
|
# macOS does "timer coalescing" by default, which can add ~100ms to wakeup
|
|
# times and cause tests to fail. To be honest, I'm not exactly sure where
|
|
# this happens (child wakeup vs SIGCHLD delivery vs poll return).
|
|
- name: disable timer coalescing on macOS
|
|
run: sudo sysctl -w kern.timer.coalescing_enabled=0
|
|
if: matrix.os == 'macOS-latest'
|
|
- run: cargo test
|