Skip to content

Commit

Permalink
Merge #936
Browse files Browse the repository at this point in the history
936: Fix AtomicCell is_lock_free test on armv7 r=taiki-e a=taiki-e



Co-authored-by: Taiki Endo <[email protected]>
  • Loading branch information
bors[bot] and taiki-e authored Dec 3, 2022
2 parents 42ad5f7 + e2a73cf commit fdf8ecf
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 19 deletions.
35 changes: 21 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
- name: Install Rust
# --no-self-update is necessary because the windows environment cannot self-update rustup.exe.
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
- name: Install cross
uses: taiki-e/install-action@cross
if: matrix.target != ''
Expand All @@ -80,9 +80,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
- name: Install Rust
run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: Check features
Expand All @@ -93,7 +92,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
- name: Install Rust
run: rustup update nightly && rustup default nightly
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: Install cargo-minimal-versions
Expand All @@ -109,7 +109,8 @@ jobs:
pull-requests: write
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
- name: Install Rust
run: rustup update nightly && rustup default nightly
- run: ci/no_atomic.sh
- run: git add -N . && git diff --exit-code
if: github.repository_owner != 'crossbeam-rs' || github.event_name != 'schedule'
Expand Down Expand Up @@ -141,7 +142,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: Install Rust
run: rustup update stable
- name: rustfmt
run: ./ci/rustfmt.sh

Expand All @@ -150,7 +152,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: Install Rust
run: rustup update stable
- name: clippy
run: ./ci/clippy.sh

Expand All @@ -159,7 +162,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@miri
- name: Install Rust
run: rustup toolchain install nightly --component miri && rustup default nightly
- name: miri
run: ./ci/miri.sh

Expand All @@ -168,7 +172,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
- name: Install Rust
run: rustup update nightly && rustup default nightly
- name: Run sanitizers
run: ./ci/san.sh

Expand All @@ -177,7 +182,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: Install Rust
run: rustup update stable
- name: loom
run: ./ci/crossbeam-epoch-loom.sh

Expand All @@ -186,7 +192,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
- name: Install Rust
run: rustup update nightly && rustup default nightly
- name: docs
run: ./ci/docs.sh

Expand Down
6 changes: 1 addition & 5 deletions crossbeam-utils/tests/atomic_cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,7 @@ fn is_lock_free() {
// of `AtomicU64` is `8`, so `AtomicCell<u64>` is not lock-free.
assert_eq!(
AtomicCell::<u64>::is_lock_free(),
cfg!(not(crossbeam_no_atomic_64))
&& cfg!(any(
target_pointer_width = "64",
target_pointer_width = "128"
))
cfg!(not(crossbeam_no_atomic_64)) && std::mem::align_of::<u64>() == 8
);
assert_eq!(mem::size_of::<U64Align8>(), 8);
assert_eq!(mem::align_of::<U64Align8>(), 8);
Expand Down

0 comments on commit fdf8ecf

Please sign in to comment.