Skip to content

Commit

Permalink
add loongarch CI (#323)
Browse files Browse the repository at this point in the history
* add loongarch CI

* fix clippy

* fix cargo deny

* try fix longarch CI

* try fix longarch CI

* try fix longarch CI

* try fix longarch CI

* try fix longarch CI
  • Loading branch information
loongs-zhang authored Nov 29, 2024
1 parent 704e7d5 commit eac6660
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
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

0 comments on commit eac6660

Please sign in to comment.