Repository navigation
206 lines (200 loc) · 9.34 KB
/
Copy pathci.yml
File metadata and controls
206 lines (200 loc) · 9.34 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
name: CI
on:
push:
pull_request:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-unknown-linux-gnu,riscv64gc-unknown-linux-gnu,x86_64-pc-windows-gnu
- run: |
sudo apt-get update
sudo apt-get install --yes bubblewrap
- run: cargo fmt --check
- run: cargo clippy --workspace --all-targets --all-features -- -D warnings
- run: cargo test --workspace --all-features
# Library consumers build these crates without serde_json's global
# arbitrary_precision; test that configuration and keep it out of their graph.
- run: cargo test -p octoscript-schema -p octoscript-capabilities -p octoscript-workflow
- run: >
! cargo tree -e normal,features -i serde_json
-p octoscript-schema -p octoscript-capabilities -p octoscript-workflow
| grep arbitrary_precision
- run: cargo check --locked -p octoscript-sandbox --tests --target aarch64-unknown-linux-gnu
- run: cargo check --locked -p octoscript-sandbox --tests --target riscv64gc-unknown-linux-gnu
- run: cargo check --locked -p octoscript-sandbox --tests --target x86_64-pc-windows-gnu
# The VM is a pinned git dependency (OctoSense-org/makepad, branch octoscript);
# -p resolves it from Cargo.lock so no separate checkout or second pin is needed.
- run: cargo test -p makepad-script
- run: cargo test -p makepad-regex
# The project-quota positive-path test requires an explicitly provisioned host fixture.
- run: >
sudo -E env RUSTUP_HOME="$HOME/.rustup"
"$CARGO_HOME/bin/cargo" test --locked -p octoscript-sandbox --lib -- --ignored
- run: >
sudo -E env RUSTUP_HOME="$HOME/.rustup"
"$CARGO_HOME/bin/cargo" test --locked -p octoscript-sandbox --test cgroup_v2 -- --ignored
fuzz-target:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- run: cargo install cargo-fuzz --version 0.13.2 --locked
- run: cargo +nightly fmt --manifest-path fuzz/Cargo.toml --check
- run: RUSTFLAGS='--cfg fuzzing' cargo +nightly check --locked --manifest-path fuzz/Cargo.toml
- run: >
RUSTFLAGS='--cfg fuzzing' cargo +nightly fuzz run --sanitizer none syntax --
-runs=128 -max_len=16384 -dict=$GITHUB_WORKSPACE/fuzz/dictionaries/syntax.dict
working-directory: fuzz
- run: >
RUSTFLAGS='--cfg fuzzing' cargo +nightly fuzz run --sanitizer none lsp_document --
-runs=128 -max_len=16384 -dict=$GITHUB_WORKSPACE/fuzz/dictionaries/syntax.dict
working-directory: fuzz
- run: >
RUSTFLAGS='--cfg fuzzing' cargo +nightly fuzz run --sanitizer none mobile_dataflow --
-runs=128 -max_len=16384 -dict=$GITHUB_WORKSPACE/fuzz/dictionaries/syntax.dict
working-directory: fuzz
- run: >
RUSTFLAGS='--cfg fuzzing' cargo +nightly fuzz run --sanitizer none mobile_workflow --
-runs=128 -max_len=16384 -dict=$GITHUB_WORKSPACE/fuzz/dictionaries/syntax.dict
working-directory: fuzz
- run: >
RUSTFLAGS='--cfg fuzzing' cargo +nightly fuzz run --sanitizer none execution --
-runs=128 -max_len=8192 -dict=$GITHUB_WORKSPACE/fuzz/dictionaries/syntax.dict
working-directory: fuzz
- run: >
RUSTFLAGS='--cfg fuzzing' cargo +nightly fuzz run --sanitizer none execution_replay --
-runs=128 -max_len=8192 -dict=$GITHUB_WORKSPACE/fuzz/dictionaries/syntax.dict
working-directory: fuzz
- run: >
RUSTFLAGS='--cfg fuzzing' cargo +nightly fuzz run --sanitizer none execution_limits --
-runs=128 -max_len=8192 -dict=$GITHUB_WORKSPACE/fuzz/dictionaries/syntax.dict
working-directory: fuzz
- run: >
RUSTFLAGS='--cfg fuzzing' cargo +nightly fuzz run --sanitizer none bubblewrap_policy --
-runs=128 -max_len=64
working-directory: fuzz
- run: >
RUSTFLAGS='--cfg fuzzing' cargo +nightly fuzz run --sanitizer none http_origin_policy --
-runs=128 -max_len=4096
working-directory: fuzz
- run: >
RUSTFLAGS='--cfg fuzzing' cargo +nightly fuzz run --sanitizer none secret_broker --
-runs=128 -max_len=1024
working-directory: fuzz
- run: >
RUSTFLAGS='--cfg fuzzing' cargo +nightly fuzz run --sanitizer none rollback_anchor_service --
-runs=128 -max_len=8192
working-directory: fuzz
- run: >
RUSTFLAGS='--cfg fuzzing' cargo +nightly fuzz run --sanitizer none workflow_draft --
-runs=128 -max_len=65536
working-directory: fuzz
- run: >
RUSTFLAGS='--cfg fuzzing' cargo +nightly fuzz run --sanitizer none capability_lease --
-runs=128 -max_len=8192
working-directory: fuzz
- run: >
RUSTFLAGS='--cfg fuzzing' cargo +nightly fuzz run --sanitizer none workflow_external_operation --
-runs=128 -max_len=65536
working-directory: fuzz
- run: >
RUSTFLAGS='--cfg fuzzing' cargo +nightly fuzz run --sanitizer none workflow_event_journal --
-runs=128 -max_len=196608
working-directory: fuzz
- run: >
RUSTFLAGS='--cfg fuzzing' cargo +nightly fuzz run --sanitizer none capability_audit_journal --
-runs=128 -max_len=196608
working-directory: fuzz
- run: >
RUSTFLAGS='--cfg fuzzing' cargo +nightly fuzz run --sanitizer none cross_stream_telemetry --
-runs=128 -max_len=4096
working-directory: fuzz
- run: >
RUSTFLAGS='--cfg fuzzing' cargo +nightly fuzz run --sanitizer none durable_cross_stream_telemetry --
-runs=128 -max_len=196608
working-directory: fuzz
- run: >
RUSTFLAGS='--cfg fuzzing' cargo +nightly fuzz run --sanitizer none json_line_worker --
-runs=128 -max_len=1048578
working-directory: fuzz
fuzz-memory-safety:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- run: cargo install cargo-fuzz --version 0.13.2 --locked
- name: AddressSanitizer evaluator fuzzing
run: >
RUSTFLAGS='--cfg fuzzing' cargo +nightly fuzz run execution --
-runs=128 -max_len=8192 -dict=$GITHUB_WORKSPACE/fuzz/dictionaries/syntax.dict
working-directory: fuzz
- name: AddressSanitizer evaluator replay fuzzing
run: >
RUSTFLAGS='--cfg fuzzing' cargo +nightly fuzz run execution_replay --
-runs=128 -max_len=8192 -dict=$GITHUB_WORKSPACE/fuzz/dictionaries/syntax.dict
working-directory: fuzz
- name: AddressSanitizer LSP document fuzzing
run: >
RUSTFLAGS='--cfg fuzzing' cargo +nightly fuzz run lsp_document --
-runs=128 -max_len=16384 -dict=$GITHUB_WORKSPACE/fuzz/dictionaries/syntax.dict
working-directory: fuzz
- name: AddressSanitizer sealed mobile dataflow fuzzing
run: >
RUSTFLAGS='--cfg fuzzing' cargo +nightly fuzz run mobile_dataflow --
-runs=128 -max_len=16384 -dict=$GITHUB_WORKSPACE/fuzz/dictionaries/syntax.dict
working-directory: fuzz
- name: AddressSanitizer sealed mobile workflow fuzzing
run: >
RUSTFLAGS='--cfg fuzzing' cargo +nightly fuzz run mobile_workflow --
-runs=128 -max_len=16384 -dict=$GITHUB_WORKSPACE/fuzz/dictionaries/syntax.dict
working-directory: fuzz
- name: AddressSanitizer variable-limit evaluator fuzzing
run: >
RUSTFLAGS='--cfg fuzzing' cargo +nightly fuzz run execution_limits --
-runs=128 -max_len=8192 -dict=$GITHUB_WORKSPACE/fuzz/dictionaries/syntax.dict
working-directory: fuzz
- name: AddressSanitizer Bubblewrap policy compiler fuzzing
run: >
RUSTFLAGS='--cfg fuzzing' cargo +nightly fuzz run bubblewrap_policy --
-runs=128 -max_len=64
working-directory: fuzz
- name: AddressSanitizer exact-origin HTTP policy fuzzing
run: >
RUSTFLAGS='--cfg fuzzing' cargo +nightly fuzz run http_origin_policy --
-runs=128 -max_len=4096
working-directory: fuzz
- name: AddressSanitizer capability secret-broker fuzzing
run: >
RUSTFLAGS='--cfg fuzzing' cargo +nightly fuzz run secret_broker --
-runs=128 -max_len=1024
working-directory: fuzz
- name: AddressSanitizer rollback-anchor service fuzzing
run: >
RUSTFLAGS='--cfg fuzzing' cargo +nightly fuzz run rollback_anchor_service --
-runs=128 -max_len=8192
working-directory: fuzz
- name: AddressSanitizer capability-lease fuzzing
run: >
RUSTFLAGS='--cfg fuzzing' cargo +nightly fuzz run capability_lease --
-runs=128 -max_len=8192
working-directory: fuzz
miri-vm-regression:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: miri
- run: cargo +nightly miri setup
- name: Check re-entrant VM body reload under Miri
run: >
cargo +nightly miri test -p makepad-script
reentrant_reload_of_the_active_body_does_not_keep_an_opcode_pointer