name: CI on: - push - pull_request env: CARGO_TERM_COLOR: always jobs: check: runs-on: ubuntu-latest strategy: matrix: rust: - stable - 1.42 steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: ${{ matrix.rust }} override: true - uses: Swatinem/rust-cache@v1 - name: Run cargo check uses: actions-rs/cargo@v1 with: command: check 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 --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: - check - fmt strategy: matrix: rust: - stable - 1.42 - beta - nightly 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: Build uses: actions-rs/cargo@v1 with: command: build --verbose build-macos: name: Build on MacOS with Rust ${{ matrix.rust }} runs-on: macos-latest needs: - build-linux strategy: matrix: rust: - stable - 1.42 - beta - nightly 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 --verbose