Set minimum pybind11 version to 3.0.4 #28
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: Build | |
| on: | |
| pull_request: | |
| push: | |
| branches: [master] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| NDI_SDK_VERSION: "6.3.2.0" | |
| jobs: | |
| build_wheels: | |
| name: Build wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up QEMU | |
| if: runner.os == 'Linux' | |
| uses: docker/setup-qemu-action@v4 | |
| with: | |
| platforms: arm64,arm | |
| # Linux: run installer (EULA via echo y), rename to ndi-sdk/ | |
| # Accessible in Docker container at /project/ndi-sdk | |
| - name: Cache NDI SDK (Linux) | |
| if: runner.os == 'Linux' | |
| id: cache-ndi-linux | |
| uses: actions/cache@v5 | |
| with: | |
| path: ndi-sdk | |
| key: ndi-sdk-linux-${{ env.NDI_SDK_VERSION }} | |
| - name: Download and install NDI SDK (Linux) | |
| if: runner.os == 'Linux' && steps.cache-ndi-linux.outputs.cache-hit != 'true' | |
| run: | | |
| curl -fsSL "${{ secrets.NDI_SDK_URL_LINUX }}" -o ndi-sdk-installer.tar.gz | |
| tar -xzf ndi-sdk-installer.tar.gz | |
| echo y | sh Install_NDI_SDK_v6_Linux.sh | |
| mv "NDI SDK for Linux" ndi-sdk | |
| rm ndi-sdk-installer.tar.gz Install_NDI_SDK_v6_Linux.sh | |
| # macOS: cache installer, always install (fast) | |
| - name: Cache NDI SDK (macOS) | |
| if: runner.os == 'macOS' | |
| id: cache-ndi-macos | |
| uses: actions/cache@v5 | |
| with: | |
| path: ndi-sdk.pkg | |
| key: ndi-sdk-macos-${{ env.NDI_SDK_VERSION }} | |
| - name: Download NDI SDK (macOS) | |
| if: runner.os == 'macOS' && steps.cache-ndi-macos.outputs.cache-hit != 'true' | |
| run: curl -fsSL "${{ secrets.NDI_SDK_URL_MACOS }}" -o ndi-sdk.pkg | |
| - name: Install NDI SDK (macOS) | |
| if: runner.os == 'macOS' | |
| run: sudo installer -pkg ndi-sdk.pkg -target / | |
| # Windows: extract with innoextract (no installer needed) | |
| - name: Cache NDI SDK (Windows) | |
| if: runner.os == 'Windows' | |
| id: cache-ndi-windows | |
| uses: actions/cache@v5 | |
| with: | |
| path: ndi-sdk-win | |
| key: ndi-sdk-windows-${{ env.NDI_SDK_VERSION }} | |
| - name: Install innoextract (Windows) | |
| if: runner.os == 'Windows' && steps.cache-ndi-windows.outputs.cache-hit != 'true' | |
| uses: MinoruSekine/setup-scoop@v4 | |
| with: | |
| apps: innoextract | |
| - name: Download and extract NDI SDK (Windows) | |
| if: runner.os == 'Windows' && steps.cache-ndi-windows.outputs.cache-hit != 'true' | |
| shell: pwsh | |
| run: | | |
| Invoke-WebRequest -Uri "${{ secrets.NDI_SDK_URL_WINDOWS }}" -OutFile ndi-sdk.exe | |
| innoextract ndi-sdk.exe --output-dir ndi-sdk-win | |
| Remove-Item ndi-sdk.exe | |
| - name: Set NDI_SDK_DIR (Windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| $path = "${{ github.workspace }}" -replace '\\', '/' | |
| echo "NDI_SDK_DIR=$path/ndi-sdk-win/app" >> $env:GITHUB_ENV | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@v3.4.1 | |
| env: | |
| CIBW_BUILD: "cp310-* cp314-*" | |
| CIBW_ENVIRONMENT_LINUX: CMAKE_ARGS="-DNDI_SDK_DIR=/project/ndi-sdk" | |
| CIBW_ENVIRONMENT_WINDOWS: CMAKE_ARGS="-DNDI_SDK_DIR=${{ env.NDI_SDK_DIR }}" |