include examples folder in crate #189
Workflow file for this run
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: | |
branches: | |
- '*' | |
pull_request: | |
branches: | |
- '*' | |
env: | |
CARGO_TERM_COLOR: always | |
# Linters inspired from here: https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md | |
jobs: | |
rust: | |
name: ${{ matrix.os }}-latest | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu | |
- os: macos | |
- os: windows | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt, clippy | |
# - name: Launch sshd (Linux) | |
# if: matrix.os == 'ubuntu' | |
# run: sudo systemctl start ssh | |
# | |
# - name: Launch sshd (macOS) | |
# if: matrix.os == 'macos' | |
# run: sudo systemsetup -setremotelogin on | |
# | |
# - name: Launch sshd (Windows) | |
# if: matrix.os == 'windows' | |
# run: | | |
# Get-Service -Name ssh-agent | Set-Service -StartupType Manual | |
# Start-Service ssh-agent | |
- name: fmt | |
run: cargo fmt --all -- --check | |
- name: build | |
run: cargo build --verbose | |
- name: clippy | |
run: cargo clippy -- -D warnings | |
- name: test (macOS) | |
if: matrix.os == 'macos' | |
run: sudo cargo test --verbose -- --nocapture | |
- name: test (Linux & Windows) | |
if: matrix.os == 'ubuntu' || matrix.os == 'windows' | |
run: cargo test --verbose -- --nocapture |