Skip to content

Commit f7584c7

Browse files
authored
chore: Support macOS continuous deployment (#299)
* chore: Support macOS CD Signed-off-by: Ce Gao <cegao@tensorchord.ai> * fix Signed-off-by: Ce Gao <cegao@tensorchord.ai> * fix: Fix bug Signed-off-by: Ce Gao <cegao@tensorchord.ai> * fix: Disable ubuntu Signed-off-by: Ce Gao <cegao@tensorchord.ai> * fix: Use cibuildwheel1.x Signed-off-by: Ce Gao <cegao@tensorchord.ai> * fix: Update version Signed-off-by: Ce Gao <cegao@tensorchord.ai> * fix: add ubuntu Signed-off-by: Ce Gao <cegao@tensorchord.ai> * fix: Disable Signed-off-by: Ce Gao <cegao@tensorchord.ai>
1 parent 7720529 commit f7584c7

1 file changed

Lines changed: 19 additions & 23 deletions

File tree

.github/workflows/release.yml

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,15 @@ jobs:
4343
retention-days: 1
4444
path: |
4545
dist/envd_linux_amd64_v1/envd
46-
dist/envd-ssh_linux_amd64_v1/envd-ssh
46+
dist/envd_darwin_amd64_v1/envd
4747
if-no-files-found: error
4848
pypi_publish:
4949
needs: goreleaser
50-
runs-on: ubuntu-latest
50+
runs-on: ${{ matrix.os }}
51+
timeout-minutes: 20
52+
strategy:
53+
matrix:
54+
os: [macos-10.15, ubuntu-20.04]
5155
if: startsWith(github.ref, 'refs/tags/v') # only trigger when tag starts with v
5256
steps:
5357
- uses: actions/checkout@v3
@@ -56,33 +60,25 @@ jobs:
5660
with:
5761
name: gobin_${{ github.event.release.tag_name }}
5862
path: dist/
59-
- name: Move file to
63+
- name: Configure linux build environment
64+
if: runner.os == 'Linux'
6065
run: |
6166
mkdir -p bin
6267
mv dist/envd_linux_amd64_v1/envd bin/envd
63-
mv dist/envd-ssh_linux_amd64_v1/envd-ssh bin/envd-ssh
6468
chmod +x bin/envd
65-
chmod +x bin/envd-ssh
66-
- uses: actions/setup-python@v2
67-
with:
68-
python-version: 3.9
69-
- name: Build wheel
70-
run: |
71-
ls bin/
72-
python -m pip install --upgrade pip
73-
python -m pip install twine wheel auditwheel setuptools_scm
74-
python setup.py bdist_wheel sdist
75-
auditwheel repair dist/*.whl
76-
ls wheelhouse/
77-
pushd wheelhouse
78-
for file in *.whl ; do mv $file ${file//"cp39-cp39"/"py2.py3-none"} ; done
79-
popd
80-
- name: Upload to Pypi
69+
- name: Configure macOS build environment
70+
if: runner.os == 'macOS'
71+
run: |
72+
mkdir -p bin
73+
mv dist/envd_darwin_amd64_v1/envd bin/envd
74+
chmod +x bin/envd
75+
- name: Build wheels
76+
uses: pypa/cibuildwheel@v2.6.1
77+
env:
78+
CIBW_ARCHS: auto64
79+
- name: Upload to PyPI
8180
env:
8281
TWINE_USERNAME: __token__
8382
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
8483
run: |
8584
twine upload wheelhouse/*
86-
87-
88-

0 commit comments

Comments
 (0)