From 822182da18335a62d936ca66350a0c93bc57fc56 Mon Sep 17 00:00:00 2001 From: james7132 Date: Mon, 18 Mar 2024 23:53:10 -0700 Subject: [PATCH 01/11] Correct CI env var --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 1031050..9d0b431 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -20,7 +20,7 @@ jobs: rust: [1.56.0, stable, nightly] features: ["+avx2", "+sse2", "-avx2,-sse2"] env: - RUSTCFLAGS: "-C target-features={{matrix.features}}" + RUSTFLAGS: "-C target-features={{matrix.features}}" steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable From d4934e48b1947c35ff3d30c9a55a49cb17da8a4a Mon Sep 17 00:00:00 2001 From: james7132 Date: Mon, 18 Mar 2024 23:57:16 -0700 Subject: [PATCH 02/11] Fix typo --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9d0b431..8a3eed5 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -20,7 +20,7 @@ jobs: rust: [1.56.0, stable, nightly] features: ["+avx2", "+sse2", "-avx2,-sse2"] env: - RUSTFLAGS: "-C target-features={{matrix.features}}" + RUSTFLAGS: "-C target-feature={{matrix.features}}" steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable From 8f4f18581f4afef4fb1451914ad7b1633ac59b88 Mon Sep 17 00:00:00 2001 From: james7132 Date: Tue, 19 Mar 2024 00:00:36 -0700 Subject: [PATCH 03/11] Fix interpolation --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 8a3eed5..b7956fc 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -20,7 +20,7 @@ jobs: rust: [1.56.0, stable, nightly] features: ["+avx2", "+sse2", "-avx2,-sse2"] env: - RUSTFLAGS: "-C target-feature={{matrix.features}}" + RUSTFLAGS: "-C target-feature=${{matrix.features}}" steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable From f8ead71cd0ee4e4b1c27571207b0412c32079d70 Mon Sep 17 00:00:00 2001 From: james7132 Date: Tue, 19 Mar 2024 00:07:47 -0700 Subject: [PATCH 04/11] Split out aarch64 target --- .github/workflows/rust.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b7956fc..4ff3461 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -18,23 +18,41 @@ jobs: strategy: matrix: rust: [1.56.0, stable, nightly] - features: ["+avx2", "+sse2", "-avx2,-sse2"] + features: ["+avx2", "+sse2"] env: RUSTFLAGS: "-C target-feature=${{matrix.features}}" steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: + target: x86_64-unknown-linux-gnu profile: minimal toolchain: ${{ matrix.rust }} override: true - - name: Tests + - name: Tests (x86_64) run: | cargo test -v --no-default-features --tests --lib && cargo build --verbose --features "$FEATURES" && cargo test --verbose --features "$FEATURES" && cargo test --verbose --release --features "$FEATURES" + runs-on: ubuntu-latest + strategy: + matrix: + rust: [1.56.0, stable, nightly] + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + with: + target: aarch64-unknown-linux-gnu + profile: minimal + toolchain: ${{ matrix.rust }} + override: true + - name: Tests (aarch64) + run: | + run: cargo check --target aarch64-unknown-linux-gnu + # Use clippy to lint for code smells clippy: From 27b53135d76c0efbcf9888508aacdb7c1804c232 Mon Sep 17 00:00:00 2001 From: james7132 Date: Tue, 19 Mar 2024 00:09:01 -0700 Subject: [PATCH 05/11] Fix typo --- .github/workflows/rust.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 4ff3461..b187f32 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -43,7 +43,6 @@ jobs: steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - with: with: target: aarch64-unknown-linux-gnu profile: minimal From 7d0187467f2cac77efa478e78bc728816075b62e Mon Sep 17 00:00:00 2001 From: james7132 Date: Tue, 19 Mar 2024 00:10:22 -0700 Subject: [PATCH 06/11] Fix missing name --- .github/workflows/rust.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b187f32..72bae17 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -12,8 +12,7 @@ env: jobs: # Ensure the crate builds - build: - + build_x86_64: runs-on: ubuntu-latest strategy: matrix: @@ -36,6 +35,7 @@ jobs: cargo test --verbose --features "$FEATURES" && cargo test --verbose --release --features "$FEATURES" + build_aarch64: runs-on: ubuntu-latest strategy: matrix: @@ -54,7 +54,6 @@ jobs: # Use clippy to lint for code smells clippy: - runs-on: ubuntu-latest strategy: matrix: @@ -75,13 +74,11 @@ jobs: # Enforce rustfmt formatting formatting: - runs-on: ubuntu-latest strategy: matrix: # Run formatting checks only on stable rust: [stable] - steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable @@ -96,13 +93,11 @@ jobs: # Ensure the benchmarks compile benchmark_compiles: - runs-on: ubuntu-latest strategy: matrix: # Check builds only on stable rust: [stable] - steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable From 357e052edfacc5d747fabb236addb857e6db3607 Mon Sep 17 00:00:00 2001 From: james7132 Date: Tue, 19 Mar 2024 00:11:00 -0700 Subject: [PATCH 07/11] Fix misnamed task --- .github/workflows/rust.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 72bae17..7927efd 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -114,7 +114,6 @@ jobs: build-wasm: runs-on: ubuntu-latest timeout-minutes: 30 - needs: build steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable From 5c1685631014ea215dfbe9cf448c1a645a83f798 Mon Sep 17 00:00:00 2001 From: james7132 Date: Tue, 19 Mar 2024 00:12:46 -0700 Subject: [PATCH 08/11] Fix non-x86 builds --- src/block/default.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/block/default.rs b/src/block/default.rs index 48d52f9..c71493e 100644 --- a/src/block/default.rs +++ b/src/block/default.rs @@ -11,6 +11,16 @@ impl Block { pub const ALL: Self = Block(!0); pub const BITS: usize = core::mem::size_of::() * 8; + #[inline] + pub fn into_usize_array(self) -> [usize; Self::USIZE_COUNT] { + [self.0] + } + + #[inline] + pub const fn from_usize_array(array: [usize; Self::USIZE_COUNT]) -> Self { + Self(array[0]) + } + #[inline] pub const fn is_empty(self) -> bool { self.0 == Self::NONE.0 From 08e2a8543135d0959c0e157156fa1f70d4d47eb7 Mon Sep 17 00:00:00 2001 From: james7132 Date: Tue, 19 Mar 2024 00:14:02 -0700 Subject: [PATCH 09/11] Fix typo --- .github/workflows/rust.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 7927efd..46d42e4 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -49,8 +49,7 @@ jobs: toolchain: ${{ matrix.rust }} override: true - name: Tests (aarch64) - run: | - run: cargo check --target aarch64-unknown-linux-gnu + run: cargo check --target aarch64-unknown-linux-gnu # Use clippy to lint for code smells clippy: From 99485e71e8ebfdab59423208cdc17c9ca5564f7e Mon Sep 17 00:00:00 2001 From: james7132 Date: Tue, 19 Mar 2024 00:15:06 -0700 Subject: [PATCH 10/11] Revert "Fix non-x86 builds" This reverts commit 5c1685631014ea215dfbe9cf448c1a645a83f798. --- src/block/default.rs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/block/default.rs b/src/block/default.rs index c71493e..48d52f9 100644 --- a/src/block/default.rs +++ b/src/block/default.rs @@ -11,16 +11,6 @@ impl Block { pub const ALL: Self = Block(!0); pub const BITS: usize = core::mem::size_of::() * 8; - #[inline] - pub fn into_usize_array(self) -> [usize; Self::USIZE_COUNT] { - [self.0] - } - - #[inline] - pub const fn from_usize_array(array: [usize; Self::USIZE_COUNT]) -> Self { - Self(array[0]) - } - #[inline] pub const fn is_empty(self) -> bool { self.0 == Self::NONE.0 From 7fc721a0f42aceb8578abd95f90e67ae1d96472b Mon Sep 17 00:00:00 2001 From: james7132 Date: Tue, 19 Mar 2024 00:16:43 -0700 Subject: [PATCH 11/11] Revert "Revert "Fix non-x86 builds"" This reverts commit 99485e71e8ebfdab59423208cdc17c9ca5564f7e. --- src/block/default.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/block/default.rs b/src/block/default.rs index 48d52f9..c71493e 100644 --- a/src/block/default.rs +++ b/src/block/default.rs @@ -11,6 +11,16 @@ impl Block { pub const ALL: Self = Block(!0); pub const BITS: usize = core::mem::size_of::() * 8; + #[inline] + pub fn into_usize_array(self) -> [usize; Self::USIZE_COUNT] { + [self.0] + } + + #[inline] + pub const fn from_usize_array(array: [usize; Self::USIZE_COUNT]) -> Self { + Self(array[0]) + } + #[inline] pub const fn is_empty(self) -> bool { self.0 == Self::NONE.0