Make sample recycling synchronization visible to ThreadSanitizer #239
Workflow file for this run
This file contains hidden or 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: Apple Framework CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| tags: ['*'] | |
| paths: | |
| - '**' | |
| - '!docs/**' | |
| - '!.github/**' | |
| - '.github/workflows/apple.yml' | |
| - '.github/workflows/apple-release.yml' | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| cmakeextra: | |
| description: 'Extra CMake options' | |
| required: false | |
| default: '' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| build: | |
| name: ${{ matrix.config.name }} | |
| runs-on: ${{ matrix.config.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - {name: "macOS-latest", os: "macOS-latest", platform: "macos", cmake_extra: "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DLSL_UNITTESTS=ON -DLSL_BENCHMARKS=ON -DCMAKE_OSX_ARCHITECTURES=\"x86_64;arm64\"" } | |
| - {name: "iOS", os: "macOS-latest", platform: "ios", cmake_extra: "-DCMAKE_TOOLCHAIN_FILE=cmake/ios.toolchain.cmake -DPLATFORM=OS64" } | |
| - {name: "iOS Simulator", os: "macOS-latest", platform: "ios-simulator", cmake_extra: "-DCMAKE_TOOLCHAIN_FILE=cmake/ios.toolchain.cmake -DPLATFORM=SIMULATOR64COMBINED -G Xcode" } | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| # Need full history + tags so the version can be derived from the git tag | |
| fetch-depth: 0 | |
| # These are validation artifacts, not signed distribution builds. With signing | |
| # disabled, Xcode needs neither certificates nor an APPLE_DEVELOPMENT_TEAM. | |
| - name: Configure CMake | |
| run: | | |
| cmake --version | |
| cmake -S . -B build \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DCMAKE_INSTALL_PREFIX="${PWD}/install" \ | |
| -DCPACK_PACKAGE_DIRECTORY="${PWD}/package" \ | |
| -DLSL_FRAMEWORK=ON \ | |
| -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO \ | |
| -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=NO \ | |
| -Dlslgitrevision=${{ github.sha }} \ | |
| -Dlslgitbranch=${{ github.ref }} \ | |
| ${{ matrix.config.cmake_extra }} \ | |
| ${{ github.event.inputs.cmakeextra }} | |
| pwd | |
| - name: make | |
| run: cmake --build build --config Release -j | |
| - name: make install | |
| run: cmake --build build --config Release --target install | |
| - name: test install using examples | |
| if: matrix.config.name == 'macOS-latest' | |
| run: | | |
| # Test that the in-tree install was successful by building the examples | |
| cmake -S examples -B examples/build \ | |
| -DLSL_INSTALL_ROOT="${PWD}/install" \ | |
| -DCMAKE_INSTALL_PREFIX=examples/build/install \ | |
| -DLSL_COMFY_DEFAULTS=ON \ | |
| ${{ matrix.config.cmake_extra }} \ | |
| ${{ github.event.inputs.cmakeextra }} | |
| cmake --build examples/build --target install --config Release -j | |
| ./examples/build/install/bin/HandleMetaData | |
| # run internal tests | |
| - name: unit tests | |
| if: matrix.config.name == 'macOS-latest' | |
| run: | | |
| mkdir -p dumps | |
| install/bin/lsl_test_internal --order rand --wait-for-keypress never --durations yes | |
| install/bin/lsl_test_exported --order rand --wait-for-keypress never --durations yes | |
| timeout-minutes: 10 | |
| - name: upload dump | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dumps-${{ matrix.config.name }} | |
| path: dumps | |
| - name: Zip LSL Framework | |
| run: | | |
| cd install/Frameworks | |
| zip -ry lsl.framework.zip lsl.framework | |
| cd ../.. | |
| - name: Upload unsigned framework | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: unsigned-${{ matrix.config.platform }} | |
| path: install/Frameworks/lsl.framework.zip | |
| if-no-files-found: error | |
| xcframework: | |
| name: Unsigned XCFramework | |
| needs: build | |
| runs-on: macOS-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: unsigned-* | |
| path: frameworks | |
| - name: Unzip frameworks | |
| run: | | |
| for platform in macos ios ios-simulator; do | |
| unzip "frameworks/unsigned-$platform/lsl.framework.zip" -d "frameworks/$platform" | |
| done | |
| - name: Create unsigned XCFramework | |
| run: | | |
| ./scripts/apple_create_xcframework.sh \ | |
| --macos frameworks/macos/lsl.framework \ | |
| --ios frameworks/ios/lsl.framework \ | |
| --ios-simulator frameworks/ios-simulator/lsl.framework \ | |
| --skip-signing \ | |
| --output package | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: unsigned-xcframework | |
| path: package/lsl.xcframework.*.zip | |
| if-no-files-found: error |