Skip to content

sofa-python3

sofa-python3 #55

Workflow file for this run

name: sofa-python3
on:
workflow_call:
workflow_dispatch:
pull_request:
types:
- opened
- reopened
- unlabeled
- closed
paths:
- '**/release-*/sofa-python3/.ci_support/*.yaml'
jobs:
check-depends-on-PR:
runs-on: ubuntu-latest
# skip if event is closing PR without merging
if: ${{ !(github.event.action == 'closed' && github.event_name == 'pull_request' && github.event.pull_request.merged == false) }}
steps:
- name: Fail in case Pull Request is opened with label "depends-on"
if: ${{ contains(github.event.pull_request.labels.*.name, 'depends-on') }}
run: |
echo "Pull Request was open with a depends-on label and is blocked."
echo "Merge listed PRs in comment first and unlabel this PR."
exit 1
- name: Succeed otherwise
if: ${{ !contains(github.event.pull_request.labels.*.name, 'depends-on') }}
run: |
echo "Pull Request was not opened with a depends-on label, continuing..."
build-publish-sofa-python3:
strategy:
fail-fast: false
matrix:
target: [{platform: "linux-64", runner: "ubuntu-latest"},
{platform: "linux-aarch64", runner: "ubuntu-24.04-arm"},
{platform: "osx-64", runner: "macos-15-intel"},
{platform: "osx-arm64", runner: "macos-latest"},
{platform: "win-64", runner: "windows-latest"}]
python: ["3.10", "3.11", "3.12", "3.13"]
uses: ./.github/workflows/build_publish_package.yml
# skip if event is closing PR without merging
if: ${{ !(github.event.action == 'closed' && github.event_name == 'pull_request' && github.event.pull_request.merged == false) }}
needs: check-depends-on-PR
with:
package-name: sofa-python3
runner: ${{ matrix.target.runner }}
platform: ${{ matrix.target.platform }}
python: ${{ matrix.python }}
channel: sofa-framework
recipe-dir: release-v25.06
# only publish packages on pull request merging OR when called manually through workflow_dispatch OR workflow call
publish-package: ${{ (github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true) || github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' }}
secrets:
api-key: ${{ secrets.PREFIXDEV_APIKEY }}