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

add loongarch CI #323

Merged
merged 8 commits into from
Nov 29, 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
3 changes: 2 additions & 1 deletion .github/workflows/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ if [ "${NO_RUN}" != "1" ] && [ "${NO_RUN}" != "true" ]; then
fi

if [ "${TARGET}" != "aarch64-unknown-linux-gnu" ] && [ "${TARGET}" != "armv7-unknown-linux-gnueabihf" ] &&
[ "${TARGET}" != "riscv64gc-unknown-linux-gnu" ] && [ "${TARGET}" != "s390x-unknown-linux-gnu" ]; then
[ "${TARGET}" != "riscv64gc-unknown-linux-gnu" ] && [ "${TARGET}" != "s390x-unknown-linux-gnu" ] &&
[ "${TARGET}" != "loongarch64-unknown-linux-gnu" ]; then
# enable uring+legacy driver
"${CARGO}" test --target "${TARGET}"
"${CARGO}" test --target "${TARGET}" --release
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ jobs:
armv7-unknown-linux-gnueabihf,
riscv64gc-unknown-linux-gnu,
s390x-unknown-linux-gnu,
loongarch64-unknown-linux-gnu,
# mips64-unknown-linux-muslabi64,
# loongarch64-unknown-linux-gnu,

x86_64-apple-darwin,
aarch64-apple-darwin,
Expand All @@ -92,9 +92,9 @@ jobs:
os: ubuntu-latest
- target: s390x-unknown-linux-gnu
os: ubuntu-latest
- target: loongarch64-unknown-linux-gnu
os: ubuntu-latest
# - target: mips64-unknown-linux-muslabi64
# os: ubuntu-latest
# - target: loongarch64-unknown-linux-gnu
# os: ubuntu-latest

- target: x86_64-apple-darwin
Expand Down
2 changes: 1 addition & 1 deletion deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ allow = [
"Zlib",
"BSD-3-Clause",
"Unlicense",
"Unicode-DFS-2016",
"Unicode-3.0",
]
confidence-threshold = 0.95
copyleft = "deny"
Expand Down
2 changes: 1 addition & 1 deletion monoio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ windows-sys = { version = "0.48.0", features = [

# unix dependencies
[target.'cfg(unix)'.dependencies]
nix = { version = "0.26", optional = true }
nix = { version = "0.29", features = ["sched", "ucontext", "process"], optional = true }

[target.'cfg(target_os = "linux")'.dependencies]
io-uring = { version = "0.6", optional = true }
Expand Down
4 changes: 3 additions & 1 deletion monoio/src/fs/metadata/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,11 @@ impl MetadataExt for Metadata {
self.0.stat.st_nlink.into()
}

/// longarch64 need the `into` convert.
#[allow(clippy::useless_conversion)]
#[cfg(not(any(target_arch = "aarch64", target_arch = "riscv64")))]
fn nlink(&self) -> u64 {
self.0.stat.st_nlink
self.0.stat.st_nlink.into()
}

fn uid(&self) -> u32 {
Expand Down
5 changes: 1 addition & 4 deletions monoio/src/time/driver/wheel/level.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,7 @@ impl Level {
pub(crate) fn next_expiration(&self, now: u64) -> Option<Expiration> {
// Use the `occupied` bit field to get the index of the next slot that
// needs to be processed.
let slot = match self.next_occupied_slot(now) {
Some(slot) => slot,
None => return None,
};
let slot = self.next_occupied_slot(now)?;

// From the slot index, calculate the `Instant` at which it needs to be
// processed. This value *must* be in the future with respect to `now`.
Expand Down
Loading