Thread Sanitizer #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Thread Sanitizer | |
on: | |
workflow_dispatch: | |
# When pushing new commits, cancel any running builds on that branch | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
BUILD_TYPE: Debug | |
BUILD_DIR: Builds | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
HOMEBREW_NO_INSTALL_CLEANUP: 1 | |
THREAD_SANITIZER_FLAG: True | |
# jobs are run in paralell on different machines | |
# all steps run in series | |
jobs: | |
build_and_test: | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false # show all errors for each platform (vs. cancel jobs on error) | |
matrix: | |
include: | |
- name: macOS | |
os: macos-15 | |
pluginval-binary: ./pluginval/Builds/pluginval_artefacts/Debug/pluginval.app/Contents/MacOS/pluginval | |
plugin_os_format: "VST3;AU" | |
cmake_extra_flags: | |
steps: | |
- name: Install macOS Deps | |
if: ${{ runner.os == 'macOS' }} | |
run: brew install ninja osxutils | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Configure | |
shell: bash | |
run: cmake -B ${{ env.BUILD_DIR }} -G Ninja -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE}} ${{ matrix.cmake_extra_flags }} . | |
env: | |
PLUGIN_OS_FORMAT: ${{ matrix.plugin_os_format }} | |
- name: Build | |
shell: bash | |
run: cmake --build ${{ env.BUILD_DIR }} --config ${{ env.BUILD_TYPE }} | |
- name: Read in .env from CMake # see GitHubENV.cmake | |
shell: bash | |
run: | | |
cat .env # show us the config | |
cat .env >> $GITHUB_ENV # pull in our PRODUCT_NAME, etc | |
- name: Set additional env vars for next steps | |
shell: bash | |
run: | | |
ARTIFACTS_PATH=${{ env.BUILD_DIR }}/${{ env.PROJECT_NAME }}_artefacts/${{ env.BUILD_TYPE }} | |
echo "ARTIFACTS_PATH=$ARTIFACTS_PATH" >> $GITHUB_ENV | |
echo "VST3_PATH=$ARTIFACTS_PATH/VST3/${{ env.PRODUCT_NAME }}.vst3" >> $GITHUB_ENV | |
echo "AU_PATH=$ARTIFACTS_PATH/AU/${{ env.PRODUCT_NAME }}.component" >> $GITHUB_ENV | |
echo "LV2_PATH=$ARTIFACTS_PATH/LV2/${{ env.PRODUCT_NAME }}.lv2" >> $GITHUB_ENV | |
echo "ARTIFACT_NAME=${{ env.PRODUCT_NAME }}-${{ env.VERSION }}-${{ matrix.name }}" >> $GITHUB_ENV | |
- name: Checkout pluginval code | |
uses: actions/checkout@v4 | |
with: | |
path: "pluginval" | |
repository: 'ZL-Audio/pluginval' | |
submodules: recursive | |
- name: Configure Pluginval | |
shell: bash | |
working-directory: ./pluginval | |
run: cmake -B ${{ env.BUILD_DIR }} -G Ninja -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE}} ${{ matrix.cmake_extra_flags }} | |
env: | |
PLUGIN_OS_FORMAT: ${{ matrix.plugin_os_format }} | |
- name: Build Pluginval | |
shell: bash | |
working-directory: ./pluginval | |
run: | | |
cmake --build ${{ env.BUILD_DIR }} --config ${{ env.BUILD_TYPE }} | |
ls ${{ env.BUILD_DIR }}/pluginval_artefacts/Debug | |
- name: Setup Pluginval random seed | |
uses: josStorer/get-current-time@v2 | |
id: current-time | |
with: | |
format: YYYYMMDD | |
- name: Pluginval VST3 validations | |
shell: bash | |
run: | | |
${{ matrix.pluginval-binary }} --verbose --validate "${{ env.VST3_PATH }}" --disabled-tests "Plugin state restoration" | |
env: | |
STRICTNESS_LEVEL: 10 | |
TIMEOUT_MS: 1440000 | |
REPEAT: 1 | |
RANDOM_SEED: "${{ steps.current-time.outputs.formattedTime }}" | |
- name: Pluginval AU validations (macOS) | |
if: ${{ runner.os == 'macOS' }} | |
shell: bash | |
run: | | |
sudo cp -r "${{ env.AU_PATH }}" "/Library/Audio/Plug-ins/components" | |
sudo killall -9 AudioComponentRegistrar | |
${{ matrix.pluginval-binary }} --verbose --validate "/Library/Audio/Plug-ins/components/${{ env.PRODUCT_NAME }}.component" --disabled-tests "Plugin state restoration,Automation" | |
env: | |
STRICTNESS_LEVEL: 10 | |
TIMEOUT_MS: 1440000 | |
REPEAT: 1 | |
RANDOM_SEED: "${{ steps.current-time.outputs.formattedTime }}" |