-
-
Notifications
You must be signed in to change notification settings - Fork 52
192 lines (149 loc) · 5.73 KB
/
ci.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
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
name: CI
on:
pull_request:
push:
branches:
- master
- release/**
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
RUSTFLAGS: -Dwarnings
jobs:
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Install libcurl-dev
run: |
sudo apt update
sudo apt-get install -y libcurl4-openssl-dev
- name: Checkout sources
uses: actions/checkout@v4
- name: Install rust stable toolchain
run: rustup toolchain install stable --profile minimal --component rustfmt --component clippy --no-self-update
- name: Cache rust cargo artifacts
uses: swatinem/rust-cache@v2
- name: Run cargo fmt
run: cargo fmt --all -- --check
- name: Run clippy
run: cargo clippy --all-features --workspace --tests --examples
test:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Install libcurl-dev
run: |
sudo apt update
sudo apt-get install -y libcurl4-openssl-dev
- name: Checkout sources
uses: actions/checkout@v4
- name: Install rust stable toolchain
run: rustup toolchain install stable --profile minimal --no-self-update
- name: Cache rust cargo artifacts
uses: swatinem/rust-cache@v2
- name: Run cargo test
run: cargo test --workspace --all-features --locked
env:
SENTRY_SYMBOLICATOR_GCS_CLIENT_EMAIL: ${{ secrets.SENTRY_SYMBOLICATOR_GCS_CLIENT_EMAIL }}
SENTRY_SYMBOLICATOR_GCS_PRIVATE_KEY: ${{ secrets.SENTRY_SYMBOLICATOR_GCS_PRIVATE_KEY }}
SENTRY_SYMBOLICATOR_TEST_AWS_ACCESS_KEY_ID: ${{ secrets.SENTRY_SYMBOLICATOR_TEST_AWS_ACCESS_KEY_ID }}
SENTRY_SYMBOLICATOR_TEST_AWS_SECRET_ACCESS_KEY: ${{ secrets.SENTRY_SYMBOLICATOR_TEST_AWS_SECRET_ACCESS_KEY }}
GOOGLE_APPLICATION_CREDENTIALS_JSON: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_JSON }}
test_against_latest_sentry:
name: Sentry-Symbolicator Tests
runs-on: ubuntu-latest
steps:
- name: Install libcurl-dev
run: |
sudo apt update
sudo apt-get install -y libcurl4-openssl-dev
- name: Checkout Symbolicator
uses: actions/checkout@v4
# Checkout Sentry and run integration tests against latest Symbolicator
- name: Checkout sentry
uses: actions/checkout@v4
with:
repository: getsentry/sentry
path: sentry
- name: Setup steps
id: setup
run: |
# We cannot execute actions that are not placed under .github of the main repo
mkdir -p .github/actions/
cp -r sentry/.github/actions/setup-sentry .github/actions/
- name: Setup Sentry
uses: ./.github/actions/setup-sentry
with:
workdir: sentry
kafka: true
snuba: true
- name: Do the localhost docker dance
run: echo "$DJANGO_LIVE_TEST_SERVER_ADDRESS host.docker.internal" | sudo tee --append /etc/hosts
- name: Install rust stable toolchain
run: rustup toolchain install stable --profile minimal --no-self-update
- name: Cache rust cargo artifacts
uses: swatinem/rust-cache@v2
- name: Build Symbolicator
run: cargo build --locked
- name: Run Symbolicator
run: ./target/debug/symbolicator run &
- name: Run Sentry's Symbolicator integration tests
working-directory: sentry
run: make test-symbolicator
doc-comments:
name: Rust doc comments
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: -Dwarnings
steps:
- name: Install libcurl-dev
run: |
sudo apt update
sudo apt-get install -y libcurl4-openssl-dev
- name: Checkout sources
uses: actions/checkout@v4
- name: Install rust stable toolchain
run: rustup toolchain install stable --profile minimal --component rust-docs --no-self-update
- name: Cache rust cargo artifacts
uses: swatinem/rust-cache@v2
- run: cargo doc --workspace --all-features --document-private-items --no-deps
docs:
name: Build docs
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Setup python dependencies
run: pip install --upgrade mkdocs mkdocs-material pygments
- name: Build Docs
run: mkdocs build
codecov:
name: Code Coverage
runs-on: ubuntu-latest
continue-on-error: true # well, its nightly and highly experimental
steps:
- name: Install libcurl-dev
run: |
sudo apt update
sudo apt-get install -y libcurl4-openssl-dev
- uses: actions/checkout@v4
- name: Install rust stable toolchain
run: rustup toolchain install stable --profile minimal --component llvm-tools-preview --no-self-update
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@cargo-llvm-cov
- run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
env:
SENTRY_SYMBOLICATOR_GCS_CLIENT_EMAIL: ${{ secrets.SENTRY_SYMBOLICATOR_GCS_CLIENT_EMAIL }}
SENTRY_SYMBOLICATOR_GCS_PRIVATE_KEY: ${{ secrets.SENTRY_SYMBOLICATOR_GCS_PRIVATE_KEY }}
SENTRY_SYMBOLICATOR_TEST_AWS_ACCESS_KEY_ID: ${{ secrets.SENTRY_SYMBOLICATOR_TEST_AWS_ACCESS_KEY_ID }}
SENTRY_SYMBOLICATOR_TEST_AWS_SECRET_ACCESS_KEY: ${{ secrets.SENTRY_SYMBOLICATOR_TEST_AWS_SECRET_ACCESS_KEY }}
GOOGLE_APPLICATION_CREDENTIALS_JSON: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_JSON }}
- uses: codecov/codecov-action@v5
with:
files: lcov.info