Skip to content

Commit

Permalink
CI: Don't test bitpolymul on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
robinhundt committed Jan 30, 2024
1 parent 7579233 commit 303c89d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[target.x86_64-unknown-linux-gnu]
[build]
rustflags = ["-C","target-cpu=native"]
#[target.x86_64-unknown-linux-gnu]
## needed for flamegraph https://github.com/flamegraph-rs/flamegraph
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ jobs:
runs-on: "${{ matrix.os }}"
strategy:
matrix:
include:
- os: "ubuntu-latest"
- os: "windows-latest"
exclude: "--exclude 'bitpolymul*'"
features: "aby2,bench-api"
- os: "macos-14"
exclude: "--exclude 'bitpolymul*'"
features: "aby2,bench-api,silent-ot,silent-ot-libote-codes"
os: ["ubuntu-latest", "windows-latest", "macos-14"]
steps:
- name: Check out repository
Expand All @@ -28,8 +36,12 @@ jobs:
run: rustup override set ${{steps.toolchain.outputs.name}}
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Test
- name: Run tests
if: ${{ matrix.os == 'ubuntu-latest' }}
run: cargo test --workspace --verbose --all-features --no-fail-fast
- name: Run tests
if: ${{ matrix.os != 'ubuntu-latest' }}
run: cargo test --workspace --verbose ${{ matrix.exclude }} --features ${{ matrix.features }}
lint:
name: Lint
runs-on: "ubuntu-latest"
Expand Down
4 changes: 3 additions & 1 deletion crates/aligned-vec/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,6 @@ unsafe impl<T: Sync, ALIGN: Unsigned + PowerOfTwo> Sync for AlignedVec<T, ALIGN>
#[cfg(test)]
mod tests {
use crate::AlignedVec;
use std::arch::x86_64::{__m128i, _mm_load_si128};
use typenum::U32;

#[test]
Expand Down Expand Up @@ -361,8 +360,11 @@ mod tests {
dbg!(av[64]);
}

#[cfg(target_arch = "x86_64")]
#[test]
fn load_si128_from_vec() {
use std::arch::x86_64::{__m128i, _mm_load_si128};

let av: AlignedVec<u64, U32> = (&[42; 2][..]).into();
let bits = unsafe { _mm_load_si128(&av[0] as *const _ as *const __m128i) };
dbg!(bits);
Expand Down

0 comments on commit 303c89d

Please sign in to comment.