99 lines
2.8 KiB
YAML
99 lines
2.8 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- 'master'
|
|
- 'main'
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
- 'main'
|
|
|
|
jobs:
|
|
test:
|
|
name: ${{ matrix.name }}
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- name: x86_64-apple-darwin
|
|
target: x86_64-apple-darwin
|
|
nobgt: 0
|
|
no_tests: 1
|
|
tag: macos-13
|
|
- 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: aarch64-apple-darwin (stable)
|
|
target: aarch64-apple-darwin
|
|
nobgt: 0
|
|
no_tests: 1
|
|
tag: macos-latest
|
|
- name: x86_64-unknown-linux-gnu (msrv)
|
|
target: x86_64-unknown-linux-gnu
|
|
nobgt: 0
|
|
no_tests: 0
|
|
rust: msrv
|
|
tag: ubuntu-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
|
|
if [[ "${{ matrix.rust }}" == "msrv" ]]; then
|
|
rustup default `grep rust-version jemalloc-sys/Cargo.toml | cut -d '"' -f 2`
|
|
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 --features stats,profiling,use_std
|
|
- run: shellcheck ci/*.sh
|