90 lines
2.5 KiB
YAML
90 lines
2.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- 'master'
|
|
- 'main'
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
- 'main'
|
|
|
|
jobs:
|
|
test:
|
|
name: ${{ matrix.name }}
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- name: aarch64-unknown-linux-gnu
|
|
target: aarch64-unknown-linux-gnu
|
|
nobgt: 0
|
|
no_tests: 1
|
|
tag: arm64
|
|
- name: x86_64-unknown-linux-gnu (nightly)
|
|
target: x86_64-unknown-linux-gnu
|
|
nobgt: 0
|
|
no_tests: 0
|
|
rust: nightly
|
|
tag: ubuntu-latest
|
|
- name: x86_64-unknown-linux-gnu (stable)
|
|
target: x86_64-unknown-linux-gnu
|
|
nobgt: 0
|
|
no_tests: 0
|
|
rust: stable
|
|
tag: ubuntu-latest
|
|
- name: x86_64-unknown-linux-musl
|
|
target: x86_64-unknown-linux-musl
|
|
nobgt: 1
|
|
no_tests: 1
|
|
tag: ubuntu-latest
|
|
- name: x86_64-apple-darwin (stable)
|
|
target: x86_64-apple-darwin
|
|
nobgt: 0
|
|
no_tests: 1
|
|
tag: macos-latest
|
|
runs-on: ${{ matrix.tag }}
|
|
env:
|
|
TARGET: ${{ matrix.target }}
|
|
NO_JEMALLOC_TESTS: ${{ matrix.no_tests }}
|
|
NOBGT: ${{ matrix.nobgt }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
- name: install
|
|
run: |
|
|
if [[ "${{ matrix.rust }}" == "nightly" ]]; then
|
|
rustup default nightly
|
|
fi
|
|
rustup target add ${{ matrix.target }}
|
|
if [[ "$TARGET" == "x86_64-unknown-linux-musl" ]]; then
|
|
sudo apt install -y musl-tools
|
|
fi
|
|
- name: test
|
|
run: sh ci/run.sh
|
|
test_bench:
|
|
name: Benchmarks using x86_64-unknown-linux-gnu (nightly)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
- run: rustup default nightly
|
|
- run: cargo test --bench roundtrip
|
|
check:
|
|
name: Rustfmt and Clippy
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
- run: rustup component add rustfmt clippy
|
|
- run: cargo fmt --all -- --check
|
|
- run: cargo clippy -p tikv-jemalloc-sys -- -D clippy::all
|
|
- run: cargo clippy -p tikv-jemallocator -- -D clippy::all
|
|
- run: cargo clippy -p tikv-jemallocator-global -- -D clippy::all
|
|
- run: cargo clippy -p tikv-jemalloc-ctl -- -D clippy::all
|
|
- run: env RUSTDOCFLAGS="--cfg jemallocator_docs" cargo doc
|
|
- run: shellcheck ci/*.sh
|