Add a junky but functional helper module #74
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: [push, pull_request] | |
env: | |
RUSTFLAGS: "-Dwarnings" | |
jobs: | |
test: | |
name: Build and test (${{ matrix.version }}) | |
runs-on: ubuntu-latest | |
container: ghcr.io/verdiwm/ci-image:latest | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- "1_22" | |
- "1_23" | |
- "1_24" | |
- "1_25" | |
- "1_26" | |
- "1_27" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check clippy | |
run: cargo clippy --no-default-features --features ${{ matrix.version }},tokio,log,tracing --all-targets --workspace | |
- name: Run tests | |
run: cargo test --no-default-features --features ${{ matrix.version }},tokio,log,tracing --all-targets --workspace | |
test-multiple-versions: | |
name: Test multiple versions fail | |
runs-on: ubuntu-latest | |
container: ghcr.io/verdiwm/ci-image:latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Verify multiple versions error | |
run: | | |
set +e | |
cargo check --all-features | |
if [ $? -eq 0 ]; then | |
echo "Build succeeded when it should have failed" | |
exit 1 | |
fi | |
test-debian-stable: | |
name: Build on Debian stable | |
runs-on: ubuntu-latest | |
container: rust:slim | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
apt-get update | |
apt-get install -y pkg-config libinput-dev | |
- name: Build | |
run: cargo build --features tokio,log,tracing | |
fmt: | |
name: Check Formatting | |
runs-on: ubuntu-latest | |
container: ghcr.io/verdiwm/ci-image:latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run formatter | |
run: cargo fmt --check |