Use GitHub Actions instead of TravisCI
This commit is contained in:
114
.github/workflows/ci.yml
vendored
Normal file
114
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
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
|
||||||
38
.travis.yml
38
.travis.yml
@@ -1,38 +0,0 @@
|
|||||||
dist: trusty
|
|
||||||
sudo: false
|
|
||||||
|
|
||||||
language: rust
|
|
||||||
cache: cargo
|
|
||||||
rust:
|
|
||||||
- stable
|
|
||||||
- beta
|
|
||||||
- nightly
|
|
||||||
matrix:
|
|
||||||
allow_failures:
|
|
||||||
- rust: nightly
|
|
||||||
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- LIBCLANG_PATH="/usr/lib/llvm-3.9/lib"
|
|
||||||
- PKG_CONFIG_PATH="/usr/lib/*/pkgconfig/"
|
|
||||||
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
sources:
|
|
||||||
- sourceline: 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.9 main'
|
|
||||||
key_url: 'http://apt.llvm.org/llvm-snapshot.gpg.key'
|
|
||||||
|
|
||||||
packages:
|
|
||||||
- libsmbclient-dev
|
|
||||||
- pkg-config
|
|
||||||
- clang-3.9
|
|
||||||
- libclang-3.9-dev
|
|
||||||
- llvm-3.9-dev
|
|
||||||
|
|
||||||
notifications:
|
|
||||||
webhooks:
|
|
||||||
urls:
|
|
||||||
- https://webhooks.gitter.im/e/ab0b5f048023444e2080
|
|
||||||
on_success: change
|
|
||||||
on_failure: always
|
|
||||||
on_start: never
|
|
||||||
Reference in New Issue
Block a user