Skip to content

Commit

Permalink
Update rust-clippy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Bounti committed Jun 10, 2024
1 parent 5c2b3e3 commit a773b5c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/rust-clippy.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
name: rust-clippy analyze
permissions: read-all
on:
push:
branches:
- main
- 'bugfix/**'
- 'feature/**'
pull_request:
types:
- opened
Expand All @@ -18,6 +19,8 @@ on:
jobs:
rust-clippy-analyze:
name: Run rust-clippy analyzing
env:
PRESIFUZZ_DUMMY: 1
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -31,9 +34,8 @@ jobs:
- name: rust-toolchain
uses: actions-rs/[email protected]
with:
toolchain: nightly
toolchain: stable
components: clippy
override: true
- name: rust-cargo
uses: actions-rs/[email protected]
with:
Expand Down
19 changes: 11 additions & 8 deletions libpresifuzz_observers/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ use std::env;

fn main() {

if Ok("test".to_owned()) == env::var("PROFILE") {
println!("Compiling using profile {:?}. Please condiser using test profile to fake LibNPI.so", env::var("PROFILE"));

if env::var("PRESIFUZZ_DUMMY").is_ok() {
cc::Build::new()
.cpp(true) // Switch to C++ library compilation.
.file("./src/npi_c.c")
Expand Down Expand Up @@ -42,14 +44,15 @@ fn main() {
.include(npi_library_path)
.compile("npi_c");
println!("cargo:rustc-link-lib=NPI");
}

let key = "VERDI_HOME";
let verdi_home = match env::var(key) {
Ok(val) => val,
Err(_e) => "".to_string(),
};

println!("cargo:rustc-link-search=native={}/share/NPI/lib/linux64", verdi_home);
let key = "VERDI_HOME";
let verdi_home = match env::var(key) {
Ok(val) => val,
Err(_e) => "".to_string(),
};

println!("cargo:rustc-link-search=native={}/share/NPI/lib/linux64", verdi_home);
}
}

0 comments on commit a773b5c

Please sign in to comment.