fix condition to allow upload to anaconda.org #764
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: posix | ||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - maintenance/** | ||
| workflow_dispatch: null | ||
| schedule: | ||
| - cron: '0 0 * * 0' | ||
| workflow_call: | ||
| inputs: | ||
| publish: | ||
| type: boolean | ||
| default: false | ||
| required: false | ||
| jobs: | ||
| build: | ||
| runs-on: ${{ matrix.os }} | ||
| defaults: | ||
| run: | ||
| shell: bash | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - { os: ubuntu-latest, PLAT: i686, INTERFACE64: '0', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux} | ||
| - { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '0', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux} | ||
| - { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '1', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux} | ||
| - { os: macos-14, PLAT: x86_64, INTERFACE64: '0', MB_ML_LIBC: macosx} | ||
| - { os: macos-14, PLAT: x86_64, INTERFACE64: '1', MB_ML_LIBC: macosx} | ||
| - { os: macos-latest, PLAT: arm64, INTERFACE64: '0', MB_ML_LIBC: macosx} | ||
| - { os: macos-latest, PLAT: arm64, INTERFACE64: '1', MB_ML_LIBC: macosx} | ||
| - { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '0', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux} | ||
| - { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '1', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux} | ||
| - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '0', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux} | ||
| - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '1', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux} | ||
| - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '0', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux} | ||
| - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '1', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux} | ||
| - { os: ubuntu-24.04-arm, PLAT: ppc64le, INTERFACE64: '0', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux} | ||
| - { os: ubuntu-24.04-arm, PLAT: ppc64le, INTERFACE64: '1', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux} | ||
| - { os: ubuntu-24.04-arm, PLAT: s390x, INTERFACE64: '0', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux} | ||
| - { os: ubuntu-24.04-arm, PLAT: s390x, INTERFACE64: '1', MB_ML_VER: '_2_28', MB_ML_LIBC: manylinux} | ||
| - { os: ubuntu-24.04-arm, PLAT: riscv64, INTERFACE64: '0', MB_ML_VER: '_2_39', MB_ML_LIBC: manylinux} | ||
| - { os: ubuntu-24.04-arm, PLAT: riscv64, INTERFACE64: '1', MB_ML_VER: '_2_39', MB_ML_LIBC: manylinux} | ||
| env: | ||
| NIGHTLY: ${{ inputs.publish == false && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }} | ||
| MB_ML_LIBC: ${{ matrix.MB_ML_LIBC }} | ||
| MB_ML_VER: ${{ matrix.MB_ML_VER }} | ||
| INTERFACE64: ${{ matrix.INTERFACE64 }} | ||
| PLAT: ${{ matrix.PLAT }} | ||
| steps: | ||
| - uses: actions/checkout@v6.0.1 | ||
| with: | ||
| submodules: recursive | ||
| fetch-depth: 0 | ||
| - uses: maxim-lobanov/setup-xcode@v1.7.0 | ||
| if: ${{ matrix.os == 'macos-latest' }} | ||
| with: | ||
| xcode-version: '16.0' | ||
| - uses: maxim-lobanov/setup-xcode@v1.7.0 | ||
| if: ${{ matrix.os == 'macos-14' }} | ||
| with: | ||
| xcode-version: '15.4' | ||
| - name: Set up QEMU | ||
| if: matrix.PLAT == 'ppc64le' || matrix.PLAT == 's390x' || matrix.PLAT == 'riscv64' | ||
| uses: docker/setup-qemu-action@v4.0.0 | ||
| with: | ||
| platforms: all | ||
| - name: Print some Environment variable | ||
| run: | | ||
| echo "PLAT: ${PLAT}" | ||
| # - name: Setup tmate session | ||
| # if: ${{ failure() }} | ||
| # uses: mxschmitt/action-tmate@v3 | ||
| # with: | ||
| # limit-access-to-actor: true | ||
| - name: Build and Test wheels | ||
| uses: pypa/cibuildwheel@v3.3.1 | ||
| timeout-minutes: 60 | ||
| with: | ||
| output-dir: dist | ||
| env: | ||
| CIBW_ARCHS: ${{matrix.PLAT}} | ||
| CIBW_BUILD_VERBOSITY: 1 | ||
| CIBW_BUILD: "cp39-${{ matrix.MB_ML_LIBC }}_${{matrix.PLAT}}" | ||
| CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.MB_ML_LIBC }}${{matrix.MB_ML_VER}} | ||
| CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.MB_ML_LIBC }}${{matrix.MB_ML_VER}} | ||
| CIBW_MUSLLINUX_X86_64_IMAGE: ${{ matrix.MB_ML_LIBC }}${{matrix.MB_ML_VER}} | ||
| CIBW_MANYLINUX_AARCH64_IMAGE: ${{ matrix.MB_ML_LIBC }}${{matrix.MB_ML_VER}} | ||
| CIBW_MUSLLINUX_AARCH64_IMAGE: ${{ matrix.MB_ML_LIBC }}${{matrix.MB_ML_VER}} | ||
| CIBW_MANYLINUX_PPC64LE_IMAGE: ${{ matrix.MB_ML_LIBC }}${{matrix.MB_ML_VER}} | ||
| CIBW_MUSLLINUX_PPC64LE_IMAGE: ${{ matrix.MB_ML_LIBC }}${{matrix.MB_ML_VER}} | ||
| CIBW_MANYLINUX_S390X_IMAGE: ${{ matrix.MB_ML_LIBC }}${{matrix.MB_ML_VER}} | ||
| CIBW_MUSLLINUX_S390X_IMAGE: ${{ matrix.MB_ML_LIBC }}${{matrix.MB_ML_VER}} | ||
| CIBW_MANYLINUX_RISCV64_IMAGE: ${{ matrix.MB_ML_LIBC }}${{matrix.MB_ML_VER}} | ||
| - name: Upload wheels to artifacts | ||
| uses: actions/upload-artifact@v6.0.0 | ||
| with: | ||
| name: wheels-${{ matrix.os }}-${{ matrix.PLAT }}-${{ matrix.INTERFACE64 }}-${{ matrix.MB_ML_LIBC }}-${{ matrix.MB_ML_VER }} | ||
| path: dist/scipy_openblas*.whl | ||
| - name: Upload to ananconda.org | ||
| if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || | ||
| (github.event_name == 'push' && github.ref == 'refs/heads/main') }} | ||
| uses: scientific-python/upload-nightly-action@0.6.4 | ||
| with: | ||
| artifacts_path: dist | ||
| anaconda_nightly_upload_token: ${{secrets.ANACONDA_SCIENTIFIC_PYTHON_UPLOAD}} | ||