Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: install cargo tools with newer toolchain #327

Merged
merged 2 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,23 @@ jobs:
toolchain: nightly-2023-12-31
override: true
components: clippy


- name: install stable rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
with:
toolchain: 1.78.0
profile: minimal
override: true

- name: Install required cargo
run: cargo install clippy-sarif sarif-fmt
run: cargo +stable-x86_64-unknown-linux-gnu install clippy-sarif sarif-fmt

- name: Preparation Work
run: bash sh_script/preparation.sh

- name: Run rust-clippy for result collection
run:
cargo clippy
cargo +nightly-2023-12-31-x86_64-unknown-linux-gnu clippy
--features stack-guard,virtio-vsock,virtio-serial,vmcall-interrupt
--message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
continue-on-error: true
Expand All @@ -62,7 +69,7 @@ jobs:
wait-for-processing: true

- name: Run rust-clippy
run: cargo clippy --features stack-guard,virtio-vsock,virtio-serial,vmcall-interrupt
run: cargo +nightly-2023-12-31-x86_64-unknown-linux-gnu clippy --features stack-guard,virtio-vsock,virtio-serial,vmcall-interrupt

rustfmt:
name: Format
Expand Down
26 changes: 14 additions & 12 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ env:
AR_x86_64_unknown_none: llvm-ar
CC_x86_64_unknown_none: clang
RUST_TOOLCHAIN: nightly-2023-12-31
RUST_STABLE_TOOLCHAIN: 1.78.0
TOOLCHAIN_PROFILE: minimal
AFL_NO_AFFINITY: 1

Expand All @@ -33,6 +34,13 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
submodules: recursive

- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
with:
toolchain: 1.78.0
profile: minimal
override: true

- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
with:
toolchain: nightly-2023-12-31
Expand All @@ -41,26 +49,20 @@ jobs:
components: rust-src, llvm-tools-preview

- name: Run cargo install cargo-xbuild
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3
with:
command: install
args: cargo-xbuild
run: cargo install cargo-xbuild

- name: install NASM
uses: ilammy/setup-nasm@13cbeb366c45c4379d3478cdcbadd8295feb5028 # v1.5.1

- name: Install AFL
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3
with:
command: install
args: cargo-afl
run: cargo install cargo-afl

- name: Install Cargo-Fuzz
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3
with:
command: install
args: cargo-fuzz
run: cargo +stable-x86_64-unknown-linux-gnu install cargo-fuzz

- name: Select default toolchain
run: rustup default nightly-2023-12-31

- name: Preparation work
run: bash sh_script/preparation.sh

Expand Down
1 change: 1 addition & 0 deletions src/crypto/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ afl = { version = "*", optional = true }
arbitrary = "=1.1.3"
der = { version = "0.7.9", features = ["oid", "alloc"] }
serde = "=1.0.198"
x86_64 = "=0.14.11"

[dependencies.crypto]
path = ".."
Expand Down
1 change: 1 addition & 0 deletions src/devices/virtio/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ bitmap-allocator = { git = "https://github.com/rcore-os/bitmap-allocator", rev =
spin = "0.9.2"
arbitrary = "=1.1.3"
serde = "=1.0.198"
x86_64 = "=0.14.11"

[features]
default = ["libfuzzer-sys"]
Expand Down
1 change: 1 addition & 0 deletions src/devices/vsock/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ libfuzzer-sys = { version = "0.4", optional = true }
afl = {version = "*", optional = true }
arbitrary = "=1.1.3"
serde = "=1.0.198"
x86_64 = "=0.14.11"

[dependencies.vsock]
path = ".."
Expand Down
1 change: 1 addition & 0 deletions src/migtd/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ afl = { version = "*", optional = true }
r-efi = "3.2.0"
arbitrary = "=1.1.3"
serde = "=1.0.198"
x86_64 = "=0.14.11"

[patch.crates-io]
ring = { path = "../../../deps/td-shim/library/ring" }
Expand Down
1 change: 1 addition & 0 deletions src/policy/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ afl = {version = "*", optional = true }
arbitrary = "=1.1.3"
log = "0.4.13"
serde = "=1.0.198"
x86_64 = "=0.14.11"

[features]
default = ["libfuzzer-sys"]
Expand Down
Loading