Skip to content

Commit

Permalink
benchmasrk
Browse files Browse the repository at this point in the history
  • Loading branch information
burrbull committed Aug 11, 2022
1 parent cb0ec3f commit e93916f
Show file tree
Hide file tree
Showing 4 changed files with 383 additions and 4 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/bench.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Benchmarks

on:
push:
branches: [ staging, trying, master ]
pull_request:

jobs:
bench:
name: Benchmark
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true

- name: Print enabled target features
run: rustc --print=cfg

- name: Benchmark
uses: actions-rs/cargo@v1
with:
command: bench

bench-native:
name: Benchmark (cpu=native)
runs-on: ubuntu-latest
env:
RUSTFLAGS: -C target-cpu=native

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true

- name: Print enabled target features
run: rustc --print=cfg -C target-cpu=native

- name: Benchmark
uses: actions-rs/cargo@v1
with:
command: bench
8 changes: 5 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,13 @@ jobs:
- name: Print enabled target features
run: rustc --print=cfg -C target-cpu=native

- uses: actions-rs/cargo@v1
- name: Test
uses: actions-rs/cargo@v1
with:
command: test

test-native:
name: Test
name: Test (cpu=native)
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: 1
Expand All @@ -87,6 +88,7 @@ jobs:
- name: Print enabled target features
run: rustc --print=cfg -C target-cpu=native

- uses: actions-rs/cargo@v1
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
13 changes: 12 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,15 @@ default = []
rug = "1.16"

[dev-dependencies.rand]
version = "0.8.5"
version = "0.8.5"

[dev-dependencies.core_simd]
git = "https://github.com/atomicincrement/stdsimd"
branch = "feature/libm"

[dev-dependencies.std_float]
git = "https://github.com/atomicincrement/stdsimd"
branch = "feature/libm"

[dev-dependencies.libm]
version = "0.2.3"
Loading

0 comments on commit e93916f

Please sign in to comment.