Browse Source

CI setup

pull/1/head
Ehsan M. Kermani 4 years ago
parent
commit
0359604fc3
  1. 53
      .github/workflows/ci.yml

53
.github/workflows/ci.yml

@ -0,0 +1,53 @@
name: CI
on:
pull_request:
push:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
style:
name: Style Check
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- name: cargo fmt --check
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Install LLVM
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key 2>/dev/null | sudo apt-key add -
sudo add-apt-repository 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main' -y
sudo apt-get update -q
sudo apt-get install -y libllvm10 llvm-10 llvm-10-runtime
- name: Clippy lint
run: |
rustup component add clippy && cargo clippy -- -D warnings
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --tests --verbose
Loading…
Cancel
Save