-
Notifications
You must be signed in to change notification settings - Fork 4
173 lines (151 loc) · 4.12 KB
/
Copy pathci.yml
File metadata and controls
173 lines (151 loc) · 4.12 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
name: Main CI
on:
push:
branches:
- main
- release-*
tags:
- '*'
pull_request:
schedule:
- cron: '0 6 * * *'
concurrency:
# append event name on the off chance that a push to master
# runs at the same time as the nightlies - we want both to run
group: ${{ github.head_ref || github.run_id }}-${{ github.event_name }}
cancel-in-progress: true
jobs:
basic:
runs-on: ${{ (matrix.arch == 'arm64' && 'ubuntu-24.04-arm') || 'ubuntu-24.04' }}
strategy:
fail-fast: false
matrix:
arch:
- amd64
- arm64
rust-version:
- stable
- nightly
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libbpf-dev \
protobuf-compiler
rustup +${{ matrix.rust-version }} component add clippy
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ runner.arch }}-cargo-${{ matrix.rust-version }}-${{ hashFiles('**/Cargo.lock') }}
- name: Build
run: cargo +${{ matrix.rust-version }} build --release
- name: Lint
run: cargo +${{ matrix.rust-version }} clippy --all-targets --all-features -- -D warnings
- name: Test
run: cargo +${{ matrix.rust-version }} test
coverage:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libbpf-dev \
protobuf-compiler
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ runner.arch }}-cargo-coverage-${{ hashFiles('**/Cargo.lock') }}
- name: Install cargo-llvm-cov
run: |
rustup component add llvm-tools
cargo install --force cargo-llvm-cov
- name: Generate coverage
run: make coverage
- name: Upload to Codecov
uses: codecov/codecov-action@v5
with:
files: codecov.json
token: ${{ secrets.CODECOV_TOKEN }}
lint-tests:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-python@v5
with:
python-version: "3.14"
- name: Lint
run: |
python3 -m venv .venv
source .venv/bin/activate
pip install ruff pyright
pip install -r tests/requirements.txt
make -C tests lint
format-check:
runs-on: ubuntu-24.04
env:
CLANG_FMT: clang-format-18
steps:
- uses: actions/checkout@v4
- name: Check code format
run: |
rustup component add rustfmt
pip install ruff
make format-check
container-build:
uses: ./.github/workflows/container-build.yml
secrets: inherit
container-build-otel:
uses: ./.github/workflows/container-build.yml
secrets: inherit
with:
tag-suffix: '-otel'
make-target: 'image-otel'
unit-tests:
uses: ./.github/workflows/unit-tests.yml
secrets: inherit
integration-tests:
needs:
- container-build
uses: ./.github/workflows/integration-tests.yml
with:
tag: ${{ needs.container-build.outputs.tag }}
vms: '["fedora-coreos", "fcarm", "rhel", "rhel-arm64", "rhcos", "rhcos-arm64"]'
secrets: inherit
integration-tests-otel:
needs:
- container-build-otel
uses: ./.github/workflows/integration-tests.yml
with:
tag: ${{ needs.container-build-otel.outputs.tag }}
job-tag: otel
vms: '["fedora-coreos"]'
output-type: otlp
secrets: inherit
performance-tests:
if: github.event_name == 'schedule'
needs:
- container-build
uses: ./.github/workflows/performance-tests.yml
with:
tag: ${{ needs.container-build.outputs.tag }}
secrets: inherit