Skip to content

Commit 3bc33c7

Browse files
committed
Auto merge of #14010 - silvergasp:ci, r=lnicola
fuzz: Fixes broken Cargo.toml for fuzz tests Fixes broken Cargo.toml for fuzz tests and adds building of fuzz tests to the CI.
2 parents 10891ef + 05d7d33 commit 3bc33c7

File tree

2 files changed

+47
-8
lines changed

2 files changed

+47
-8
lines changed

.github/workflows/fuzz.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Fuzz
2+
on:
3+
schedule:
4+
# Once a week
5+
- cron: '0 0 * * 0'
6+
push:
7+
paths:
8+
- '.github/workflows/fuzz.yml'
9+
# Allow manual trigger
10+
workflow_dispatch:
11+
12+
env:
13+
CARGO_INCREMENTAL: 0
14+
CARGO_NET_RETRY: 10
15+
CI: 1
16+
RUST_BACKTRACE: short
17+
RUSTFLAGS: "-D warnings -W unreachable-pub -W bare-trait-objects"
18+
RUSTUP_MAX_RETRIES: 10
19+
20+
jobs:
21+
rust:
22+
if: ${{ github.repository == 'rust-lang/rust-analyzer' || github.event.action == 'workflow_dispatch' }}
23+
name: Rust
24+
runs-on: ubuntu-latest
25+
env:
26+
CC: deny_c
27+
28+
steps:
29+
- name: Checkout repository
30+
uses: actions/checkout@v3
31+
with:
32+
ref: ${{ github.event.pull_request.head.sha }}
33+
fetch-depth: 1
34+
35+
- name: Install Rust toolchain
36+
run: |
37+
rustup install --profile minimal nightly
38+
39+
- name: Build fuzzers
40+
run: |
41+
cargo install cargo-fuzz
42+
cd crates/syntax
43+
cargo +nightly fuzz build

crates/syntax/fuzz/Cargo.toml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
1-
21
[package]
32
name = "syntax-fuzz"
43
version = "0.0.1"
54
publish = false
6-
7-
authors.workspace = true
8-
edition.workspace = true
9-
license.workspace = true
10-
rust-version.workspace = true
5+
edition = "2021"
6+
rust-version = "1.66.1"
117

128
[package.metadata]
139
cargo-fuzz = true
1410

1511
[dependencies]
1612
syntax = { path = "..", version = "0.0.0" }
17-
text_edit = { path = "../../text_edit", version = "0.0.0" }
18-
libfuzzer-sys = { git = "https://github.com/rust-fuzz/libfuzzer-sys.git" }
13+
text-edit = { path = "../../text-edit", version = "0.0.0" }
14+
libfuzzer-sys = "0.4.5"
1915

2016
# Prevent this from interfering with workspaces
2117
[workspace]

0 commit comments

Comments
 (0)