v0.2.3 #24
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: Release | |
| on: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-lib: | |
| name: Build and Test C++ Library | |
| permissions: | |
| actions: write | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, ubuntu-24.04-arm, macos-15-intel, macos-latest, windows-latest, windows-11-arm] | |
| uses: ./.github/workflows/lib.yaml | |
| with: | |
| runner: ${{ matrix.os }} | |
| run-tests: true | |
| python-test: | |
| name: Build and Test Python Bindings | |
| needs: build-lib | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, ubuntu-24.04-arm, macos-15-intel, macos-latest, windows-latest, windows-11-arm] | |
| uses: ./.github/workflows/python.yaml | |
| with: | |
| runner: ${{ matrix.os }} | |
| build_wheel: true | |
| nox-session: test_simple | |
| python-versions-sessions: | |
| name: Get Nox Sessions | |
| runs-on: ubuntu-latest | |
| outputs: | |
| sessions: ${{ steps.get-sessions.outputs.sessions }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| - uses: wntrblm/nox@main | |
| - id: get-sessions | |
| working-directory: lang/python/test | |
| run: | | |
| echo sessions=$(nox --json -l | jq -c ' | |
| [.[].session | select(startswith("test_versions"))] | |
| ') | tee --append $GITHUB_OUTPUT | |
| python-versions: | |
| name: Test Python and NumPy Version Compatibility | |
| needs: [build-lib, python-versions-sessions] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| session: ${{ fromJson(needs.python-versions-sessions.outputs.sessions) }} | |
| uses: ./.github/workflows/python.yaml | |
| with: | |
| runner: ubuntu-latest | |
| nox-session: ${{ matrix.session }} | |
| python-coverage: | |
| name: Test Python Coverage | |
| needs: build-lib | |
| uses: ./.github/workflows/python.yaml | |
| with: | |
| runner: ubuntu-latest | |
| nox-session: coverage | |
| docs: | |
| name: Build Documentation | |
| permissions: | |
| contents: write | |
| needs: build-lib | |
| uses: ./.github/workflows/docs.yaml | |
| with: | |
| version: stable | |
| upload_binaries: | |
| name: Upload Release Binaries | |
| needs: [build-lib, python-test, python-versions, python-coverage, docs] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, ubuntu-24.04-arm, macos-15-intel, macos-latest, windows-latest, windows-11-arm] | |
| steps: | |
| - name: Set PLATFORM_TAG | |
| run: | | |
| declare -A platform_map=( | |
| [ubuntu-latest]=linux_x86_64 | |
| [ubuntu-24.04-arm]=linux_arm64 | |
| [macos-15-intel]=macos_x86_64 | |
| [macos-latest]=macos_arm64 | |
| [windows-latest]=win_x86_64 | |
| [windows-11-arm]=win_arm64 | |
| ) | |
| echo "PLATFORM_TAG=${platform_map[${{ matrix.os }}]}" >> $GITHUB_ENV | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: lib-${{ matrix.os }} | |
| path: lib-${{ matrix.os }} | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: python-${{ matrix.os }} | |
| path: python-${{ matrix.os }} | |
| - name: Upload $${{ matrix.os }} Binaries to ${{ github.ref_name }} | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| LIB_NAME="libmvsr-${GITHUB_REF_NAME:1}-$PLATFORM_TAG.zip" | |
| zip -r $LIB_NAME lib-${{ matrix.os }} | |
| gh release upload $GITHUB_REF_NAME $LIB_NAME --repo $GITHUB_REPOSITORY | |
| WHEEL_NAME="python-${{ matrix.os }}/$(ls python-${{ matrix.os }})" | |
| gh release upload $GITHUB_REF_NAME $WHEEL_NAME --repo $GITHUB_REPOSITORY | |
| echo "WHEEL_NAME=$WHEEL_NAME" >> $GITHUB_ENV | |
| - uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: python-${{ matrix.os }} | |
| upload_sdist: | |
| name: Upload Python Source Distribution | |
| needs: [upload_binaries] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| - uses: astral-sh/setup-uv@v6 | |
| - name: Upload sdist | |
| working-directory: lang/python | |
| run: uv build --sdist | |
| - uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: lang/python/dist |