Skip to content

Commit

Permalink
enable common CPU performance features
Browse files Browse the repository at this point in the history
without going totally target-cpu=native

these features should be universally available for the platforms
[skip ci]
  • Loading branch information
jqnatividad committed Aug 7, 2023
1 parent 6ac4ed3 commit a1dccc7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/publish-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
default-features:
addl-qsvlite-features:
addl-qsvdp-features: luau
addl-rustflags: -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma
# - os: ubuntu-latest
# os-name: linux
# target: x86_64-unknown-linux-musl
Expand All @@ -52,6 +53,7 @@ jobs:
default-features:
addl-qsvlite-features:
addl-qsvdp-features: luau
addl-rustflags: -C target-feature=+fxsr,+sse,+sse2,+sse3,+sse4.1,+sse4.2
- os: windows-latest
os-name: windows
target: x86_64-pc-windows-gnu
Expand All @@ -60,6 +62,7 @@ jobs:
default-features: --no-default-features
addl-qsvlite-features:
addl-qsvdp-features: luau
addl-rustflags: -C target-feature=+fxsr,+sse,+sse2,+sse3,+sse4.1,+sse4.2
- os: macos-latest
os-name: macos
target: x86_64-apple-darwin
Expand All @@ -68,6 +71,7 @@ jobs:
default-features:
addl-qsvlite-features:
addl-qsvdp-features: luau
addl-rustflags: -C target-feature=+fxsr,+sse,+sse2,+sse3,+sse4.1,+sse4.2

steps:
- name: Installing Rust toolchain
Expand All @@ -91,6 +95,8 @@ jobs:
- name: Build qsv-nightly
# env:
# RUSTFLAGS: --emit=asm
env:
RUSTFLAGS: ${{ matrix.job.addl-rustflags }}
uses: actions-rs/cargo@v1
with:
command: build
Expand All @@ -99,7 +105,7 @@ jobs:
args: --profile release-nightly --bin qsv -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --target ${{ matrix.job.target }} ${{ matrix.job.addl-build-args }},feature_capable,nightly ${{ matrix.job.default-features }}
- name: Build qsvlite-nightly
env:
RUSTFLAGS: --emit=asm
RUSTFLAGS: --emit=asm ${{ matrix.job.addl-rustflags }}
uses: actions-rs/cargo@v1
with:
command: build
Expand All @@ -108,7 +114,7 @@ jobs:
args: --profile release-nightly --bin qsvlite -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --features=lite,self_update,nightly,${{ matrix.job.addl-qsvlite-features }} --target ${{ matrix.job.target }} ${{ matrix.job.default-features }}
- name: Build qsvdp-nightly
env:
RUSTFLAGS: --emit=asm
RUSTFLAGS: --emit=asm ${{ matrix.job.addl-rustflags }}
uses: actions-rs/cargo@v1
with:
command: build
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
default-features:
addl-qsvlite-features:
addl-qsvdp-features: luau
addl-rustflags: -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma
- os: ubuntu-22.04
os-name: linux
target: x86_64-unknown-linux-musl
Expand All @@ -53,6 +54,7 @@ jobs:
default-features:
addl-qsvlite-features:
addl-qsvdp-features:
addl-rustflags: -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma
- os: ubuntu-22.04
os-name: linux
target: i686-unknown-linux-gnu
Expand All @@ -62,6 +64,7 @@ jobs:
default-features:
addl-qsvlite-features:
addl-qsvdp-features:
addl-rustflags:
- os: windows-latest
os-name: windows
target: x86_64-pc-windows-msvc
Expand All @@ -71,6 +74,7 @@ jobs:
default-features:
addl-qsvlite-features:
addl-qsvdp-features: luau
addl-rustflags: -C target-feature=+fxsr,+sse,+sse2,+sse3,+sse4.1,+sse4.2
- os: windows-latest
os-name: windows
target: i686-pc-windows-msvc
Expand All @@ -80,6 +84,7 @@ jobs:
default-features:
addl-qsvlite-features:
addl-qsvdp-features:
addl-rustflags:
- os: windows-latest
os-name: windows
target: x86_64-pc-windows-gnu
Expand All @@ -89,6 +94,7 @@ jobs:
default-features: --no-default-features
addl-qsvlite-features:
addl-qsvdp-features: luau
addl-rustflags: -C target-feature=+fxsr,+sse,+sse2,+sse3,+sse4.1,+sse4.2
# - os: macos-12
# os-name: macos
# target: x86_64-apple-darwin
Expand Down Expand Up @@ -116,6 +122,7 @@ jobs:
default-features:
addl-qsvlite-features:
addl-qsvdp-features:
addl-rustflags:
# - os: ubuntu-20.04
# os-name: linux
# target: arm-unknown-linux-gnueabihf
Expand Down Expand Up @@ -151,6 +158,8 @@ jobs:
- name: Build qsv
# env:
# RUSTFLAGS: --emit=asm
env:
RUSTFLAGS: ${{ matrix.job.addl-rustflags }}
uses: actions-rs/cargo@v1
with:
command: build
Expand All @@ -159,7 +168,7 @@ jobs:
args: --release --locked --bin qsv --target ${{ matrix.job.target }} ${{ matrix.job.addl-build-args }},feature_capable ${{ matrix.job.default-features }}
- name: Build qsvlite
env:
RUSTFLAGS: --emit=asm
RUSTFLAGS: --emit=asm ${{ matrix.job.addl-rustflags }}
uses: actions-rs/cargo@v1
with:
command: build
Expand All @@ -168,7 +177,7 @@ jobs:
args: --release --locked --bin qsvlite --features=lite,self_update,${{ matrix.job.addl-qsvlite-features }} --target ${{ matrix.job.target }} ${{ matrix.job.default-features }}
- name: Build qsvdp
env:
RUSTFLAGS: --emit=asm
RUSTFLAGS: --emit=asm ${{ matrix.job.addl-rustflags }}
uses: actions-rs/cargo@v1
with:
command: build
Expand Down

0 comments on commit a1dccc7

Please sign in to comment.