-
Notifications
You must be signed in to change notification settings - Fork 0
115 lines (100 loc) · 2.66 KB
/
cd.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
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}