Files
termscp/.github/workflows/ci.yml
Christian Visintin 1ca8abbfe8 ci: rename ci workflow
2026-06-08 10:16:00 +02:00

69 lines
1.8 KiB
YAML

name: CI
on:
pull_request:
branches: [main]
paths-ignore:
- "*.md"
- "./site/**/*"
push:
branches: [main]
paths-ignore:
- "*.md"
- "./site/**/*"
env:
CARGO_TERM_COLOR: always
permissions:
contents: read
jobs:
build:
name: build-(${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
persist-credentials: false
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: sudo apt update && sudo apt install -y libdbus-1-dev libsmbclient-dev
- name: Install macOS dependencies
if: runner.os == 'macOS'
run: |
brew update
brew install \
pkg-config \
samba
brew link --force samba
- name: Install nightly toolchain
if: runner.os == 'Linux'
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
with:
toolchain: nightly
components: rustfmt
- name: Format
if: runner.os == 'Linux'
run: cargo +nightly fmt --all -- --check
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
with:
toolchain: stable
components: clippy
- name: Build
if: runner.os != 'Linux'
run: cargo build
- name: Run tests (Linux)
if: runner.os == 'Linux'
run: cargo test --no-default-features --features github-actions --no-fail-fast
- name: Run tests
if: runner.os != 'Linux'
run: cargo test --verbose --features github-actions
- name: Clippy
run: cargo clippy -- -Dwarnings