add github ci script
This commit is contained in:
parent
119f59b349
commit
ab8412ed4e
1 changed files with 65 additions and 0 deletions
65
.github/workflows/ci.yml
vendored
Normal file
65
.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
name: ci
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: Build and run tests
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
toolchain:
|
||||||
|
- "1.56"
|
||||||
|
- stable
|
||||||
|
steps:
|
||||||
|
- name: "Checkout repo"
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: "Setup toolchain"
|
||||||
|
run: |
|
||||||
|
rustup update ${{ matrix.toolchain }}
|
||||||
|
rustup default ${{ matrix.toolchain }}
|
||||||
|
- name: "Build"
|
||||||
|
run: |
|
||||||
|
make all
|
||||||
|
cargo build --workspace --no-default-features
|
||||||
|
- name: "Run tests"
|
||||||
|
env:
|
||||||
|
RUSTDOCFLAGS: -D warnings
|
||||||
|
run: |
|
||||||
|
make check
|
||||||
|
suite:
|
||||||
|
name: Build and run external tests
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: "Checkout repo"
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: "Setup toolchain"
|
||||||
|
run: |
|
||||||
|
rustup update 1.56
|
||||||
|
rustup default 1.56
|
||||||
|
- name: "Run unit tests"
|
||||||
|
run: make suite
|
||||||
|
- name: "Setup node"
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
- name: "Compare benchmark files"
|
||||||
|
run: make suite_bench
|
||||||
|
lint:
|
||||||
|
name: Lint
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: "Checkout"
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: "Setup toolchain"
|
||||||
|
run: |
|
||||||
|
rustup update 1.56
|
||||||
|
rustup default 1.56
|
||||||
|
rustup component add rustfmt
|
||||||
|
rustup component add clippy
|
||||||
|
- name: "Check linting"
|
||||||
|
run: make lint
|
Loading…
Reference in a new issue