diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96afec50f..e90c48596 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 != '' @@ -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 @@ -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 @@ -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' @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/crossbeam-utils/tests/atomic_cell.rs b/crossbeam-utils/tests/atomic_cell.rs index a1d102210..edb7a4bc0 100644 --- a/crossbeam-utils/tests/atomic_cell.rs +++ b/crossbeam-utils/tests/atomic_cell.rs @@ -35,11 +35,7 @@ fn is_lock_free() { // of `AtomicU64` is `8`, so `AtomicCell` is not lock-free. assert_eq!( AtomicCell::::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::() == 8 ); assert_eq!(mem::size_of::(), 8); assert_eq!(mem::align_of::(), 8);