Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
zetanumbers committed Sep 22, 2023
1 parent 773eb7d commit c9b4b0f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ jobs:
override: true

- name: Run clippy
env:
VITASDK: /opt/vitasdk
run: |
cargo clippy --tests --workspace -- -Dclippy::all -Dwarnings
Expand Down
35 changes: 22 additions & 13 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,28 @@ fn main() {
env_logger::init();

println!("cargo:rerun-if-env-changed=VITASDK");
let vitasdk = Utf8PathBuf::from(env::var("VITASDK").expect(
"Vitasdk isn't installed or VITASDK environment variable isn't set to a valid unicode",
));
let sysroot = vitasdk.join("arm-vita-eabi");

assert!(
sysroot.exists(),
"VITASDK's sysroot does not exist, please install or update vitasdk first"
);

let lib = sysroot.join("lib");
assert!(lib.exists(), "VITASDK's `lib` directory does not exist");
println!("cargo:rustc-link-search=native={lib}");
match env::var("VITASDK") {
Ok(vitasdk) => {
let sysroot = Utf8PathBuf::from(vitasdk).join("arm-vita-eabi");

assert!(
sysroot.exists(),
"VITASDK's sysroot does not exist, please install or update vitasdk first"
);

let lib = sysroot.join("lib");
assert!(lib.exists(), "VITASDK's `lib` directory does not exist");
println!("cargo:rustc-link-search=native={lib}");
}
Err(env::VarError::NotPresent) => {
if env::var("DOCS_RS").is_err() {
panic!("VITASDK env var is not set")
}
}
Err(env::VarError::NotUnicode(s)) => {
panic!("VITASDK env var is not a valid unicode but got: {s:?}")
}
}

let vita_headers_submodule = Utf8Path::new("vita-headers");

Expand Down

0 comments on commit c9b4b0f

Please sign in to comment.