forked from gnzlbg/jemallocator
-
Notifications
You must be signed in to change notification settings - Fork 67
89 lines (87 loc) · 2.46 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
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