From 9b3db73dea8cfe3cb3331b22626fd95384d6d7bb Mon Sep 17 00:00:00 2001 From: dragon-zhang Date: Sun, 24 Nov 2024 10:34:17 +0800 Subject: [PATCH 1/8] add loongarch CI --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b83afe7..8be6e28c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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, @@ -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 From 45857578387f87f205e89b346066d2f5564fb68d Mon Sep 17 00:00:00 2001 From: dragon-zhang Date: Sun, 24 Nov 2024 10:39:45 +0800 Subject: [PATCH 2/8] fix clippy --- monoio/src/time/driver/wheel/level.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/monoio/src/time/driver/wheel/level.rs b/monoio/src/time/driver/wheel/level.rs index 3d53aec1..fcc5f51b 100644 --- a/monoio/src/time/driver/wheel/level.rs +++ b/monoio/src/time/driver/wheel/level.rs @@ -135,10 +135,7 @@ impl Level { pub(crate) fn next_expiration(&self, now: u64) -> Option { // 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`. From 90b19af1d142ac9eb8b59b02895a7a327fd6414a Mon Sep 17 00:00:00 2001 From: dragon-zhang Date: Sun, 24 Nov 2024 10:47:11 +0800 Subject: [PATCH 3/8] fix cargo deny --- deny.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deny.toml b/deny.toml index 959825f4..15264ad4 100644 --- a/deny.toml +++ b/deny.toml @@ -6,7 +6,7 @@ allow = [ "Zlib", "BSD-3-Clause", "Unlicense", - "Unicode-DFS-2016", + "Unicode-3.0", ] confidence-threshold = 0.95 copyleft = "deny" From 7884df43ed584b4bacc77edecf02db1ad18afed2 Mon Sep 17 00:00:00 2001 From: dragon-zhang Date: Sun, 24 Nov 2024 10:49:53 +0800 Subject: [PATCH 4/8] try fix longarch CI --- monoio/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monoio/Cargo.toml b/monoio/Cargo.toml index 29390fb2..2e51c9dd 100644 --- a/monoio/Cargo.toml +++ b/monoio/Cargo.toml @@ -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", optional = true } [target.'cfg(target_os = "linux")'.dependencies] io-uring = { version = "0.6", optional = true } From a24e1a2a390a7fdbf0d1d09d9a9ff959f1fbc93f Mon Sep 17 00:00:00 2001 From: dragon-zhang Date: Sun, 24 Nov 2024 18:00:55 +0800 Subject: [PATCH 5/8] try fix longarch CI --- monoio/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monoio/Cargo.toml b/monoio/Cargo.toml index 2e51c9dd..e8b261af 100644 --- a/monoio/Cargo.toml +++ b/monoio/Cargo.toml @@ -49,7 +49,7 @@ windows-sys = { version = "0.48.0", features = [ # unix dependencies [target.'cfg(unix)'.dependencies] -nix = { version = "0.29", 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 } From 784600e2bc58b4f21c6e4e6336fb1e88f60ab81d Mon Sep 17 00:00:00 2001 From: dragon-zhang Date: Sun, 24 Nov 2024 18:05:56 +0800 Subject: [PATCH 6/8] try fix longarch CI --- monoio/src/fs/metadata/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monoio/src/fs/metadata/mod.rs b/monoio/src/fs/metadata/mod.rs index 34b100e5..4e216e29 100644 --- a/monoio/src/fs/metadata/mod.rs +++ b/monoio/src/fs/metadata/mod.rs @@ -345,7 +345,7 @@ impl MetadataExt for Metadata { #[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 { From d867e41bea1e5568037e9f786231f9f0f7156767 Mon Sep 17 00:00:00 2001 From: dragon-zhang Date: Sun, 24 Nov 2024 18:10:56 +0800 Subject: [PATCH 7/8] try fix longarch CI --- monoio/src/fs/metadata/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/monoio/src/fs/metadata/mod.rs b/monoio/src/fs/metadata/mod.rs index 4e216e29..add23572 100644 --- a/monoio/src/fs/metadata/mod.rs +++ b/monoio/src/fs/metadata/mod.rs @@ -343,6 +343,8 @@ 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.into() From dcfd9cd92e490e59b8a208cd5c2fd898fb39fda7 Mon Sep 17 00:00:00 2001 From: dragon-zhang Date: Sun, 24 Nov 2024 18:23:51 +0800 Subject: [PATCH 8/8] try fix longarch CI --- .github/workflows/ci.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.sh b/.github/workflows/ci.sh index 20296ceb..ab0228b0 100644 --- a/.github/workflows/ci.sh +++ b/.github/workflows/ci.sh @@ -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