-
Notifications
You must be signed in to change notification settings - Fork 33
90 lines (83 loc) · 2.43 KB
/
Copy pathci.yml
File metadata and controls
90 lines (83 loc) · 2.43 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
name: CI
on: [pull_request, merge_group]
permissions:
contents: read
jobs:
fmt:
name: Cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check
clippy:
name: Cargo clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Run clippy check
run: cargo clippy --all-targets --all-features -- -D warnings
env:
RUSTFLAGS: "--cfg tokio_unstable"
build:
name: Build (${{ matrix.toolchain }})
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: [stable, nightly]
env:
RUST_BACKTRACE: 1
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust-build
with:
toolchain: ${{ matrix.toolchain }}
check-docs:
name: Check docs.rs
runs-on: ubuntu-latest
if: ${{ !startsWith(github.head_ref, 'release-') && !startsWith(github.ref_name, 'release-') }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rust-docs
- uses: Swatinem/rust-cache@v2
- run: sudo apt-get update && sudo apt-get install -y jq
- run: cargo install cargo-docs-rs
- run: ./scripts/check-docsrs.sh
trace-integrity:
name: Trace Integrity & Analysis
runs-on: ubuntu-latest
services:
dynamodb-local:
image: amazon/dynamodb-local
ports:
- 8000:8000
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-node@v4
with:
node-version: 24
- name: Enable perf_event_open and kallsyms for tests
run: |
sudo sysctl kernel.perf_event_paranoid=1
sudo sysctl kernel.kptr_restrict=0
- run: scripts/e2e-trace-tests.sh
ci-pass:
name: CI Pass
runs-on: ubuntu-latest
needs: [fmt, clippy, build, check-docs, trace-integrity]
if: always()
steps:
- run: |
if [[ "${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
echo "One or more required jobs failed or were cancelled"
exit 1
fi