Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 26 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,38 @@
name: CI

permissions:
contents: read

on:
pull_request:
push:
branches:
- master
schedule:
- cron: '0 2 * * *'
- cron: '0 2 * * 0'

env:
RUSTFLAGS: -D warnings
CARGO_INCREMENTAL: 0
CARGO_NET_GIT_FETCH_WITH_CLI: true
CARGO_NET_RETRY: 10
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
RUSTFLAGS: -D warnings
RUSTDOCFLAGS: -D warnings
RUSTUP_MAX_RETRIES: 10

defaults:
run:
shell: bash

jobs:
fmt:
uses: smol-rs/.github/.github/workflows/fmt.yml@main
clippy:
uses: smol-rs/.github/.github/workflows/clippy.yml@main
with:
# Windows for channel module.
additional-targets: x86_64-pc-windows-msvc
security_audit:
uses: smol-rs/.github/.github/workflows/security_audit.yml@main
permissions:
Expand All @@ -34,10 +52,13 @@ jobs:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
- name: Install cargo-hack and cargo-minimal-versions
uses: taiki-e/install-action@v2
with:
tool: cargo-hack,cargo-minimal-versions
- run: cargo build --all --all-features --all-targets
- name: Run cargo check (without dev-dependencies to catch missing feature flags)
if: startsWith(matrix.rust, 'nightly')
run: cargo check -Z features=dev_dep
- run: cargo hack build --feature-powerset --no-dev-deps
- run: cargo minimal-versions build --all --all-features
- run: cargo test
if: >
!contains(matrix.os, 'windows')
Expand All @@ -55,11 +76,3 @@ jobs:
- name: Install Rust
run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
- run: cargo build

clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update stable
- run: cargo clippy --all-features --all-targets
2 changes: 1 addition & 1 deletion examples/print.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
signals
.for_each(|signal| {
// Print the signal.
eprintln!("Received signal {:?}", signal);
eprintln!("Received signal {signal:?}");

// After printing it, do whatever the signal was supposed to do in the first place.
low_level::emulate_default_handler(signal.unwrap() as i32).unwrap();
Expand Down
Loading