Skip to content

Commit

Permalink
Fix x86 hybrid build since rust 1.79 (#68)
Browse files Browse the repository at this point in the history
* Fix x86 hybrid build since rust update

* Try remove stdsimd

* Display version

* Try github macos runner

* Set version to 3.2.0

* Test rustc 1.72 with hybrid

* Add rust version compat check

* Try use patch in v

* Another test

* Disable fail fast

* Fix hybrid

* Fix missing cpu feature

* No hybrid

* Workflow dispatch
  • Loading branch information
ogxd authored May 15, 2024
1 parent 056d097 commit a61616e
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 3 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Rust version
run: cargo rustc -- --version

- name: Build
run: cargo build --release

Expand All @@ -33,6 +36,9 @@ jobs:
- name: Switch to nightly rust
run: rustup default nightly

- name: Rust version
run: cargo rustc -- --version

- name: Build
run: cargo build --release

Expand All @@ -41,11 +47,14 @@ jobs:

build_test_arm:
name: Build & Test ARM
runs-on: buildjet-2vcpu-ubuntu-2204-arm
runs-on: macos-latest

steps:
- uses: actions/checkout@v3

- name: Rust version
run: cargo rustc -- --version

- name: Build
run: cargo build --release

Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/rust_version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Rust Version Compatibility

on:
workflow_dispatch:

env:
CARGO_TERM_COLOR: always

jobs:

build_test_x86:
name: Build & Test X86
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
version: ["1.65", "1.72", "1.78"]

steps:
- uses: actions/checkout@v3

- name: Install ${{ matrix.version }}
run: rustup toolchain install ${{ matrix.version }}

- name: Build
# RUSTFLAGS="-C target-cpu=native --cfg hybrid"
run: RUSTFLAGS="-C target-cpu=native" cargo +${{ matrix.version }} build --release
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "gxhash"
authors = ["Olivier Giniaux"]
version = "3.1.1"
version = "3.2.0"
edition = "2021"
description = "GxHash non-cryptographic algorithm"
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Hybrid SIMD width usage currently requires unstable 'stdsimd'
#![cfg_attr(hybrid, feature(stdsimd))]
#![cfg_attr(hybrid, feature(stdarch_x86_avx512))]

#[rustfmt::skip]
mod gxhash;
Expand Down

0 comments on commit a61616e

Please sign in to comment.