From 42844942da1c28d47621728559b2bbc7c0d6ef7e Mon Sep 17 00:00:00 2001 From: Aaron O'Mullan Date: Sun, 1 Sep 2024 13:40:29 +0900 Subject: [PATCH] features build.rs interplay --- .github/workflows/cibench.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cibench.yml b/.github/workflows/cibench.yml index d9cc4d9..284eb77 100644 --- a/.github/workflows/cibench.yml +++ b/.github/workflows/cibench.yml @@ -64,12 +64,18 @@ jobs: - name: Run benchmarks (master) run: | git checkout master - CARGO_CFG_HTTPARSE_DISABLE_SIMD=1 cargo bench --bench parse ${{ matrix.feature != 'swar' && format('--features httparse_simd,httparse_simd_target_feature_{0}', matrix.feature) || '' }} -- --save-baseline master-${{ matrix.feature }} + cargo bench --bench parse ${{ matrix.feature != 'swar' && format('--features httparse_simd') || '' }} -- --save-baseline master-${{ matrix.feature }} + env: + CARGO_CFG_HTTPARSE_DISABLE_SIMD: 1 + RUSTFLAGS: ${{ matrix.feature != 'swar' && format('-C target-feature=+{0}', matrix.feature) || '' }} - name: Run benchmarks (PR) run: | git checkout ${{ github.event.pull_request.head.sha }} - CARGO_CFG_HTTPARSE_DISABLE_SIMD=1 cargo bench --bench parse ${{ matrix.feature != 'swar' && format('--features httparse_simd,httparse_simd_target_feature_{0}', matrix.feature) || '' }} -- --save-baseline pr-${{ matrix.feature }}-${{ github.event.pull_request.number }} + cargo bench --bench parse ${{ matrix.feature != 'swar' && format('--features httparse_simd') || '' }} -- --save-baseline pr-${{ matrix.feature }}-${{ github.event.pull_request.number }} + env: + CARGO_CFG_HTTPARSE_DISABLE_SIMD: 1 + RUSTFLAGS: ${{ matrix.feature != 'swar' && format('-C target-feature=+{0}', matrix.feature) || '' }} - name: Compare benchmarks run: | @@ -99,12 +105,18 @@ jobs: - name: Run benchmarks (master) run: | git checkout master - CARGO_CFG_HTTPARSE_DISABLE_SIMD=1 cargo bench --bench parse ${{ matrix.feature == 'neon' && '--features httparse_simd,httparse_simd_neon_intrinsics' || '' }} -- --save-baseline master-aarch64-${{ matrix.feature }} + cargo bench --bench parse ${{ matrix.feature == 'neon' && '--features httparse_simd' || '' }} -- --save-baseline master-aarch64-${{ matrix.feature }} + env: + CARGO_CFG_HTTPARSE_DISABLE_SIMD: 1 + RUSTFLAGS: ${{ matrix.feature == 'neon' && '-C target-feature=+neon' || '' }} - name: Run benchmarks (PR) run: | git checkout ${{ github.event.pull_request.head.sha }} - CARGO_CFG_HTTPARSE_DISABLE_SIMD=1 cargo bench --bench parse ${{ matrix.feature == 'neon' && '--features httparse_simd,httparse_simd_neon_intrinsics' || '' }} -- --save-baseline pr-aarch64-${{ matrix.feature }}-${{ github.event.pull_request.number }} + cargo bench --bench parse ${{ matrix.feature == 'neon' && '--features httparse_simd' || '' }} -- --save-baseline pr-aarch64-${{ matrix.feature }}-${{ github.event.pull_request.number }} + env: + CARGO_CFG_HTTPARSE_DISABLE_SIMD: 1 + RUSTFLAGS: ${{ matrix.feature == 'neon' && '-C target-feature=+neon' || '' }} - name: Compare benchmarks run: |