-
Notifications
You must be signed in to change notification settings - Fork 0
109 lines (84 loc) · 2.58 KB
/
ci.yml
File metadata and controls
109 lines (84 loc) · 2.58 KB
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: CI
on:
push:
branches:
- main
pull_request:
permissions:
contents: write
deployments: write
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl]
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: ${{ matrix.target }}
- name: Setup cargo deny
run: cargo install cargo-deny
- name: Run checks
run: make check-all
- name: Run tests
run: make test
build:
name: Try building the binary and docs
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl]
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: ${{ matrix.target }}
- name: Install librdkafka
if: ${{ matrix.needs-librdkafka }}
run: sudo apt-get update -y && sudo apt-get -y install librdkafka-dev
- name: Install musl-tools
if: ${{ matrix.needs-musl }}
run: |
sudo apt-get update -y && sudo apt-get -y install musl-tools g++
# HACK to resolve musl build - will probably cause an issue in the future
sudo ln -s /bin/g++ /bin/musl-g++
- name: Install scdoc
run: sudo apt-get update -y && sudo apt-get -y install scdoc
- name: Build docs
run: make doc
- name: Build basic binary
run: make basic
- name: Build full binary
run: make all
bench:
name: Run all benchmarks
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl]
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: ${{ matrix.target }}
- name: Run benchmarks
run: cargo bench -- --output-format bencher | tee benchmark.txt
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
tool: 'cargo'
output-file-path: benchmark.txt
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: ${{ github.event_name != 'pull_request' }}
comment-on-alert: true
fail-on-alert: true
summary-always: true