-
Notifications
You must be signed in to change notification settings - Fork 0
126 lines (109 loc) · 2.86 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
116
117
118
119
120
121
122
123
124
125
126
name: cd
permissions:
contents: read
on:
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@v3
with:
name: sdist
path: dist
- name: Download wheel artifacts
uses: actions/download-artifact@v3
with:
name: wheel-Linux
path: dist
- name: Download wheel artifacts
uses: actions/download-artifact@v3
with:
name: wheel-macOS
path: dist
- name: Download wheel artifacts
uses: actions/download-artifact@v3
with:
name: wheel-Windows
path: dist
- 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
shell: bash
working-directory: dist
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-name: ac
create-args: anaconda-client python=3.11
- 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}