Skip to content

cd

cd #136

Workflow file for this run

name: cd
permissions:
contents: read
on: # yamllint disable-line rule:truthy
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:
inputs:
repository:
description: 'mpi4py repository'
default: mpi4py/mpi4py
required: true
type: string
ref:
description: 'mpi4py ref'
default: ''
required: false
type: string
publish-anaconda:
description: "Publish to Anaconda"
default: false
type: boolean
jobs:
docs:
uses: ./.github/workflows/cd-docs.yml
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
sdist:
uses: ./.github/workflows/cd-sdist.yml
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
wheel-Linux:
uses: ./.github/workflows/cd-wheel.yml
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
os-arch: Linux
wheel-macOS:
uses: ./.github/workflows/cd-wheel.yml
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
os-arch: macOS
wheel-Windows:
uses: ./.github/workflows/cd-wheel.yml
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
os-arch: Windows
publish-anaconda:
if: |
inputs.publish-anaconda ||
github.event_name == 'schedule'
needs:
- sdist
- wheel-Linux
- wheel-macOS
- wheel-Windows
runs-on: ubuntu-latest
environment:
name: anaconda
url: https://anaconda.org/mpi4py/mpi4py
steps:
- name: Download sdist artifacts
uses: actions/download-artifact@v4
with:
path: dist
pattern: sdist
merge-multiple: true
- name: Download wheel artifacts
uses: actions/download-artifact@v4
with:
path: dist
pattern: wheel-*
merge-multiple: true
- name: Report sha256sum
run: |
# Report sha256sum
echo '```' >> $GITHUB_STEP_SUMMARY
sha256sum -b *.tar.gz >> $GITHUB_STEP_SUMMARY
sha256sum -b *.whl >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
working-directory: dist
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v2
with:
environment-name: ac
create-args: anaconda-client
- name: Publish to Anaconda
run: |
# https://pypi.anaconda.org/mpi4py/simple
anaconda --token "$ANACONDA_TOKEN" \
upload --user "$ANACONDA_USER" --force \
dist/*.tar.gz dist/*.whl
env:
ANACONDA_USER: mpi4py
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
shell: bash -el {0}