-
Notifications
You must be signed in to change notification settings - Fork 673
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: fix CI by correcting wrong cfg value & removing cache with sudo #2394
Conversation
Well, I reproduced issue 2 on my host, both with our MSRV toolchain and the latest stable toolchain 1.78: $ l ~/.cargo/registry/index
Permissions Links Size User Group Date Modified Name
drwxr-xr-x@ 1 - root root 5 May 20:35 index.crates.io-6f17d22bba15001f |
Still have no idea why this didn't happen in the past, I fixed it by adding |
@@ -26,4 +26,15 @@ fn main() { | |||
netbsdlike: { any(netbsd, openbsd) }, | |||
solarish: { any(illumos, solaris) }, | |||
} | |||
|
|||
// Below are Nix's custom cfg values that we need to let the compiler know |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requested by new checks added in Rust 1.80:
error: unexpected `cfg` condition name: `linux_android`
--> src/sys/socket/addr.rs:2403:15
|
2403 | #[cfg(linux_android)]
| ^^^^^^^^^^^^^
|
= help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(linux_android)");` to the top of the `build.rs`
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
@@ -13,12 +13,7 @@ mod test_errno; | |||
mod test_fcntl; | |||
#[cfg(linux_android)] | |||
mod test_kmod; | |||
#[cfg(any( | |||
freebsdlike, | |||
target_os = "fushsia", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before this PR, this test module was enabled for target fushsia
(note it is a typo), it does not exist, and since module mqueue
does not exist on Fuchsia, simply remove this line
@@ -13,7 +13,6 @@ use nix::fcntl::{openat2, OpenHow, ResolveFlag}; | |||
target_env = "gnu", | |||
any( | |||
target_arch = "x86_64", | |||
target_arch = "x32", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This target does not exist, so remove it
What does this PR do
This PR tries to fix the CI, there are 2 issues here:
New nightly toolchain added checks for cfg values, and they work pretty well
fushsia -> fuchsia
target_arch = x32
does not existFor CI that are using our MSRV toolchain, the last step
before_cache_script
would fail withPermission denied
because the files that it wants to delete are owned by root: https://github.com/nix-rust/nix/actions/runs/8958096003/job/24601956503?pr=2394This is kinda weird because it didn't happen in the past, and for now, it only happens with our MSRV toolchain.
Checklist:
CONTRIBUTING.md