-
Notifications
You must be signed in to change notification settings - Fork 2
107 lines (102 loc) · 3.43 KB
/
publish.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
name: Publish
on:
release:
types:
# Note: editing the prerelease then marking as release does not trigger
# this pipeline
# - prereleased
- released
workflow_dispatch:
jobs:
release-pypi-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build wheels
run: |
docker run --rm -v ${{ github.workspace }}:/src:rw --workdir=/src \
pyscf/pyscf-pypa-env:latest \
bash -exc '/opt/python/cp39-cp39/bin/pip wheel -v --no-deps --no-clean -w /root/wheelhouse /src && \
ls /root/wheelhouse && \
whl=`ls /root/wheelhouse/pyscf*_x86_64.whl` && \
auditwheel -v repair "$whl" -w /src/linux-wheels'
- name: List available wheels
run: |
ls ${{ github.workspace }}/linux-wheels
- name: Publish to PyPI
run: |
pip3 install twine
export TWINE_USERNAME=__token__
export TWINE_PASSWORD="${{ secrets.PYPI_API_TOKEN }}"
twine upload --verbose ${{ github.workspace }}/linux-wheels/*
release-pypi-aarch64:
runs-on: ubuntu-latest
env:
img: quay.io/pypa/manylinux2014_aarch64:2023-03-12-25fd859
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v2
- name: Build Wheel
run: |
docker run --rm -v ${{ github.workspace }}:/src:rw --workdir=/src \
${{ env.img }} \
bash -exc '/opt/python/cp39-cp39/bin/pip install --upgrade pip setuptools && \
yum install -y epel-release && \
yum-config-manager --enable epel && \
yum install -y openblas-devel gcc && \
/opt/python/cp39-cp39/bin/pip wheel -v --no-deps --no-clean -w /root/wheelhouse /src && \
ls /root/wheelhouse && \
whl=`ls /root/wheelhouse/pyscf*-linux_*.whl` && \
auditwheel -v repair "$whl" -w /src/linux-wheels'
- name: List available wheels
run: |
ls ${{ github.workspace }}/linux-wheels
- name: Publish to PyPI
run: |
pip3 install twine
export TWINE_USERNAME=__token__
export TWINE_PASSWORD="${{ secrets.PYPI_API_TOKEN }}"
twine upload --verbose ${{ github.workspace }}/linux-wheels/*
release-pypi-macos-x86:
name: Build wheels for macos
runs-on: macos-12
steps:
- uses: fortran-lang/setup-fortran@v1
with:
compiler: gcc
version: 11
- uses: actions/checkout@v3
- name: Build wheels
run: |
pip3 install wheel
pip3 wheel -v --no-deps --no-clean -w mac-wheels .
ls mac-wheels
- name: Publish to PyPI
run: |
pip3 install twine
export TWINE_USERNAME=__token__
export TWINE_PASSWORD="${{ secrets.PYPI_API_TOKEN }}"
twine upload --verbose mac-wheels/*
release-pypi-macos-arm64:
name: Build wheels for Apple M chips
runs-on: macos-12
steps:
- uses: fortran-lang/setup-fortran@v1
with:
compiler: gcc
version: 11
- uses: actions/checkout@v3
- name: Build wheels
run: |
pip3 install wheel
pip3 wheel -v --no-deps --no-clean -w mac-wheels .
ls mac-wheels
- name: Publish to PyPI
run: |
pip3 install twine
export TWINE_USERNAME=__token__
export TWINE_PASSWORD="${{ secrets.PYPI_API_TOKEN }}"
twine upload --verbose mac-wheels/*