Repository navigation
257 lines (235 loc) · 9.24 KB
/
Copy pathcp20-evidence.yml
File metadata and controls
257 lines (235 loc) · 9.24 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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
name: CP-20 target evidence
on:
push:
branches:
- main
- temp-dev-2.0.0
workflow_dispatch:
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
native:
name: Native evidence (${{ matrix.label }})
runs-on: ${{ matrix.runner }}
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
include:
- label: x86_64-linux
runner: ubuntu-24.04
target: x86_64-unknown-linux-gnu
tier: A
features: all
python: python3
- label: aarch64-linux
runner: ubuntu-24.04-arm
target: aarch64-unknown-linux-gnu
tier: B
features: all
python: python3
- label: x86_64-windows
runner: windows-2025
target: x86_64-pc-windows-msvc
tier: B
features: alloc,std,derive,serde,subtle-interop,zeroize-interop,memory-lock,wasm-compat,canary-check,random-canary,asm-compare,strict-compare,cache-flush,register-scrub,guard-pages,page-seal,strict-canary-check,multi-pass-clear,hardware-secrets,split-secret,profile-hardened-native,profile-guarded-native
python: python
- label: aarch64-macos
runner: macos-15
target: aarch64-apple-darwin
tier: B
features: alloc,std,derive,serde,subtle-interop,zeroize-interop,memory-lock,wasm-compat,canary-check,random-canary,asm-compare,strict-compare,cache-flush,register-scrub,guard-pages,page-seal,strict-canary-check,multi-pass-clear,hardware-secrets,split-secret,profile-hardened-native,profile-guarded-native
python: python3
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Install Rust toolchain
shell: bash
run: scripts/ci_install_rust.sh
- name: Run native functional tests
shell: bash
run: |
if [ "${{ matrix.features }}" = "all" ]; then
cargo test -p sanitization --all-targets --all-features
PYTHON="${{ matrix.python }}" SANITIZATION_CODEGEN_FEATURES=all scripts/verify-codegen.sh
else
cargo test -p sanitization --all-targets --features "${{ matrix.features }}"
PYTHON="${{ matrix.python }}" SANITIZATION_CODEGEN_FEATURES="${{ matrix.features }}" scripts/verify-codegen.sh
fi
- name: Collect performance baseline
shell: bash
run: |
cargo run --quiet --release --manifest-path tools/performance-baseline/Cargo.toml -- \
--samples 31 --inner 20 \
--output "target/cp20/${{ matrix.label }}/performance.json"
${{ matrix.python }} scripts/verify-target-evidence.py \
--performance "target/cp20/${{ matrix.label }}/performance.json"
- name: Capture native target manifest
shell: bash
run: |
${{ matrix.python }} scripts/capture-target-evidence.py \
--output "target/cp20/${{ matrix.label }}/manifest.json" \
--target "${{ matrix.target }}" \
--tier "${{ matrix.tier }}" \
--kind native-functional \
--features "${{ matrix.features }}" \
--completed-check "cargo test --all-targets" \
--completed-check "path-specific release LLVM IR and assembly scan" \
--completed-check "relative performance baseline"
${{ matrix.python }} scripts/verify-target-evidence.py \
--manifest "target/cp20/${{ matrix.label }}/manifest.json"
- name: Upload native evidence
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: cp20-native-${{ matrix.label }}
path: target/cp20/${{ matrix.label }}
if-no-files-found: error
retention-days: 30
leakage:
name: Multi-seed leakage (${{ matrix.label }})
runs-on: ${{ matrix.runner }}
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
include:
- label: x86_64-linux
runner: ubuntu-24.04
- label: aarch64-linux
runner: ubuntu-24.04-arm
- label: aarch64-macos
runner: macos-15
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Install Rust toolchain
shell: bash
run: scripts/ci_install_rust.sh
- name: Collect default and strict multi-seed evidence
shell: bash
run: |
python3 scripts/collect-leakage-evidence.py \
--output-dir "target/cp20/${{ matrix.label }}/leakage" \
--samples 50000 \
--inner 200 \
--warmup 1000 \
--threshold 4.5
python3 scripts/verify-target-evidence.py \
--leakage-summary "target/cp20/${{ matrix.label }}/leakage/summary.json"
- name: Upload leakage evidence
if: ${{ always() }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: cp20-leakage-${{ matrix.label }}
path: target/cp20/${{ matrix.label }}/leakage
if-no-files-found: error
retention-days: 30
compile-only:
name: Compile-only evidence (${{ matrix.label }})
runs-on: ${{ matrix.runner }}
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
include:
- label: freebsd-x86_64
runner: ubuntu-24.04
target: x86_64-unknown-freebsd
tier: B
kind: compile-only
features: memory-lock,guard-pages,multi-pass-clear
python: python3
- label: android-aarch64
runner: ubuntu-24.04
target: aarch64-linux-android
tier: B
kind: compile-only
features: alloc,std,memory-lock,canary-check,random-canary,asm-compare,strict-compare,cache-flush,register-scrub,guard-pages,page-seal,multi-pass-clear
python: python3
- label: ios-aarch64
runner: macos-15
target: aarch64-apple-ios
tier: B
kind: compile-only
features: alloc,std,memory-lock,canary-check,random-canary,asm-compare,strict-compare,cache-flush,register-scrub,guard-pages,page-seal,multi-pass-clear
python: python3
- label: embedded-thumbv7em
runner: ubuntu-24.04
target: thumbv7em-none-eabihf
tier: B/C
kind: compile-only
features: default
python: python3
- label: embedded-riscv32
runner: ubuntu-24.04
target: riscv32imac-unknown-none-elf
tier: B/C
kind: compile-only
features: default
python: python3
- label: wasm-unknown
runner: ubuntu-24.04
target: wasm32-unknown-unknown
tier: C
kind: wasm-compatibility
features: alloc,memory-lock,wasm-compat,random-canary,multi-pass-clear
python: python3
- label: wasip1
runner: ubuntu-24.04
target: wasm32-wasip1
tier: C
kind: wasm-compatibility
features: alloc,wasm-compat,random-canary,multi-pass-clear
python: python3
- label: wasip2
runner: ubuntu-24.04
target: wasm32-wasip2
tier: C
kind: wasm-compatibility
features: wasm-compat,random-canary
python: python3
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Install Rust toolchain
shell: bash
run: scripts/ci_install_rust.sh
- name: Install target
shell: bash
run: rustup target add "${{ matrix.target }}"
- name: Cross-check target
shell: bash
run: |
if [ "${{ matrix.features }}" = "default" ]; then
cargo check -p sanitization --lib --no-default-features --target "${{ matrix.target }}"
else
cargo check -p sanitization --lib --features "${{ matrix.features }}" --target "${{ matrix.target }}"
fi
- name: Capture compile-only target manifest
shell: bash
run: |
${{ matrix.python }} scripts/capture-target-evidence.py \
--output "target/cp20/${{ matrix.label }}/manifest.json" \
--target "${{ matrix.target }}" \
--tier "${{ matrix.tier }}" \
--kind "${{ matrix.kind }}" \
--features "${{ matrix.features }}" \
--completed-check "cargo check --lib --target ${{ matrix.target }}"
${{ matrix.python }} scripts/verify-target-evidence.py \
--manifest "target/cp20/${{ matrix.label }}/manifest.json"
- name: Upload compile-only evidence
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: cp20-compile-${{ matrix.label }}
path: target/cp20/${{ matrix.label }}
if-no-files-found: error
retention-days: 30