100 lines
2.2 KiB
YAML
100 lines
2.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
- push
|
|
- pull_request
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
fmt:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
components: rustfmt
|
|
- uses: Swatinem/rust-cache@v1
|
|
- name: Run cargo fmt
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: fmt
|
|
args: --all -- --check
|
|
|
|
clippy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
components: clippy
|
|
- uses: Swatinem/rust-cache@v1
|
|
- name: Run cargo clippy
|
|
uses: actions-rs/clippy@master
|
|
with:
|
|
args: --all-features
|
|
|
|
build-linux:
|
|
name: Build on Linux with Rust ${{ matrix.rust }}
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- fmt
|
|
- clippy
|
|
strategy:
|
|
matrix:
|
|
rust:
|
|
- stable
|
|
- beta
|
|
- 1.42 # MSRV
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: ${{ matrix.rust }}
|
|
override: true
|
|
- uses: Swatinem/rust-cache@v1
|
|
- name: Install libsmbclient-dev & pkg-config
|
|
run: sudo apt -y install libsmbclient-dev pkg-config
|
|
- name: Run cargo check
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: check
|
|
- name: Run cargo build
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: build
|
|
args: --verbose
|
|
|
|
build-macos:
|
|
name: Build on MacOS with Rust ${{ matrix.rust }}
|
|
runs-on: macos-latest
|
|
needs:
|
|
- build-linux
|
|
strategy:
|
|
matrix:
|
|
rust:
|
|
- stable
|
|
- beta
|
|
- 1.42 # MSRV
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: ${{ matrix.rust }}
|
|
override: true
|
|
- uses: Swatinem/rust-cache@v1
|
|
- name: Build
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: build
|
|
args: --verbose
|