From dd0d3b232771f9b32d6606b351a5ea2bb1b5b9d0 Mon Sep 17 00:00:00 2001 From: Paul Ferrand Date: Mon, 25 Jul 2022 10:42:29 +0200 Subject: [PATCH] Fix macos tests and run them in CI --- .github/workflows/build.yml | 22 ++++++++++++++++++---- src/sfizz/simd/HelpersSSE.cpp | 2 +- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 967141ff..9f503aa7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -80,9 +80,12 @@ jobs: shell: bash working-directory: ${{runner.workspace}}/build run: cmake --build . --config "$BUILD_TYPE" -j 2 --target sfizz_tests - - name: Test + - name: Run tests shell: bash run: ${{runner.workspace}}/build/tests/sfizz_tests + # Reenable with newer cmakes + # working-directory: ${{runner.workspace}}/build + # run: ctest -j 2 -C "$BUILD_TYPE" --output-on-failure - name: Build all shell: bash working-directory: ${{runner.workspace}}/build @@ -117,19 +120,30 @@ jobs: working-directory: ${{runner.workspace}}/build run: | cmake "$GITHUB_WORKSPACE" \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE="$BUILD_TYPE" \ -DSFIZZ_AU=ON \ -DSFIZZ_LV2=ON \ -DSFIZZ_LV2_UI=ON \ -DSFIZZ_VST=ON \ -DSFIZZ_JACK=OFF \ - -DSFIZZ_TESTS=OFF \ + -DSFIZZ_TESTS=ON \ -DSFIZZ_SHARED=OFF \ -DSFIZZ_STATIC_DEPENDENCIES=OFF + - name: Build tests + shell: bash + working-directory: ${{runner.workspace}}/build + run: | + cmake --build . --config "$BUILD_TYPE" -j 2 --target sfizz_tests + - name: Run tests + shell: bash + run: ${{runner.workspace}}/build/tests/sfizz_tests + # Reenable with newer cmakes + # working-directory: ${{runner.workspace}}/build + # run: ctest -j 2 -C "$BUILD_TYPE" --output-on-failure - name: Build plugins shell: bash working-directory: ${{runner.workspace}}/build - run: cmake --build . --config "Release" -j 2 + run: cmake --build . --config "$BUILD_TYPE" -j 2 - name: Package OSX bundles shell: bash working-directory: ${{runner.workspace}} diff --git a/src/sfizz/simd/HelpersSSE.cpp b/src/sfizz/simd/HelpersSSE.cpp index 3a9d65c4..a9d4ca9c 100644 --- a/src/sfizz/simd/HelpersSSE.cpp +++ b/src/sfizz/simd/HelpersSSE.cpp @@ -108,7 +108,7 @@ void gainSSE(const float* gain, const float* input, float* output, unsigned size #if SFIZZ_HAVE_SSE2 const auto* lastAligned = prevAligned(sentinel); - while (unaligned(input, output) && output < lastAligned) + while (unaligned(input, output, gain) && output < lastAligned) *output++ = (*gain++) * (*input++); while (output < lastAligned) {