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

CI: Update Linux cross compile tests (v0.9.x) #337

Merged
merged 7 commits into from
Oct 14, 2023
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
6 changes: 6 additions & 0 deletions .ci_extras/pin-crate-vers-msrv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ set -eux
cargo update -p dashmap --precise 5.4.0
cargo update -p tempfile --precise 3.6.0
cargo update -p tokio --precise 1.29.1
cargo update -p async-executor --precise 1.5.1
cargo update -p reqwest --precise 0.11.18
cargo update -p regex --precise 1.9.6
cargo update -p memchr --precise 2.6.2
cargo update -p h2 --precise 0.3.20
cargo update -p actix-rt --precise 2.8.0
56 changes: 29 additions & 27 deletions .github/workflows/LinuxCrossCompileTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,43 @@ jobs:
linux-cross:
runs-on: ubuntu-latest
strategy:
# Continue running other jobs in the matrix even if one fails.
fail-fast: false
matrix:
platform:
- target: aarch64-unknown-linux-musl
rust-version: stable
- target: i686-unknown-linux-musl
rust-version: stable
- target: armv7-unknown-linux-musleabihf
rust-version: stable
# Platforms without AtomicU64 support.
- target: armv5te-unknown-linux-musleabi
cargo-opts: "--no-default-features" # Disable atomic64 and quanta features.
rust-version: stable
- target: mips-unknown-linux-musl
cargo-opts: "--no-default-features" # Disable atomic64 and quanta features.
rust-version: "1.72.1"
cargo-version: "+1.72.1"
- target: mipsel-unknown-linux-musl
cargo-opts: "--no-default-features" # Disable atomic64 and quanta features.
rust-version: "1.72.1"
cargo-version: "+1.72.1"

steps:
- name: Checkout Moka
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
target: ${{ matrix.platform.target }}
override: true
toolchain: ${{ matrix.platform.rust-version }}
targets: ${{ matrix.platform.target }}

- name: Install cross
uses: taiki-e/install-action@v2
with:
tool: cross

- name: Remove integration tests and force enable rustc_version crate
run: |
Expand All @@ -54,32 +67,21 @@ jobs:
sed -i 's/build = "build.rs"/build = ".ci_extras\/build_linux_cross.rs"/' Cargo.toml
cat Cargo.toml

- uses: Swatinem/rust-cache@v1

- name: cargo clean
uses: actions-rs/cargo@v1
with:
command: clean
- run: cargo clean

- name: Run tests (sync feature)
uses: actions-rs/cargo@v1
with:
use-cross: true
command: test
args: --release --features sync --target ${{ matrix.platform.target }} ${{ matrix.platform.cargo-opts }}
run: |
cross ${{ matrix.platform.carge-version }} test --release --features sync \
--target ${{ matrix.platform.target }} ${{ matrix.platform.cargo-opts }}
env:
RUSTFLAGS: '--cfg rustver'

- name: Run tests (future feature)
uses: actions-rs/cargo@v1
with:
use-cross: true
command: test
args: --release --features future --target ${{ matrix.platform.target }} ${{ matrix.platform.cargo-opts }}
run: |
cross ${{ matrix.platform.carge-version }} test --release --features future \
--target ${{ matrix.platform.target }} ${{ matrix.platform.cargo-opts }}

- name: Run tests (dash feature)
uses: actions-rs/cargo@v1
with:
use-cross: true
command: test
args: --release --features dash --target ${{ matrix.platform.target }} ${{ matrix.platform.cargo-opts }}
run: |
cross ${{ matrix.platform.carge-version }} test --release --features dash \
--target ${{ matrix.platform.target }} ${{ matrix.platform.cargo-opts }}
1 change: 1 addition & 0 deletions src/common/concurrent/entry_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ mod test {

use TargetArch::*;

#[allow(clippy::option_env_unwrap)]
// e.g. "1.64"
let ver = option_env!("RUSTC_SEMVER").expect("RUSTC_SEMVER env var not set");
let is_quanta_enabled = cfg!(feature = "quanta");
Expand Down
5 changes: 1 addition & 4 deletions src/notification/notifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,9 @@ impl<K, V> ThreadPoolRemovalNotifier<K, V> {
is_shutting_down: Default::default(),
};

#[cfg_attr(beta_clippy, allow(clippy::arc_with_non_send_sync))]
let state = Arc::new(state);

Self {
snd,
state,
state: Arc::new(state),
thread_pool,
}
}
Expand Down
1 change: 0 additions & 1 deletion src/sync_base/invalidator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ impl<K, V, S> Invalidator<K, V, S> {
Self {
predicates: RwLock::new(HashMap::new()),
is_empty: AtomicBool::new(true),
#[cfg_attr(beta_clippy, allow(clippy::arc_with_non_send_sync))]
scan_context: Arc::new(ScanContext::new(cache)),
thread_pool,
}
Expand Down