-
Notifications
You must be signed in to change notification settings - Fork 10
58 lines (52 loc) · 1.69 KB
/
pythonPublishTest_macos_arm.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
name: Upload Python Package on test server
on:
workflow_dispatch:
push:
paths:
- 'src_interfaces/python3_interface.cpp'
- 'include_interfaces/inerfaceTemplate.hpp'
- 'include_interfaces/python3_interface.hpp'
- '.github/workflows/pythonPublishTest_macos_arm.yml'
jobs:
deploy:
name: Compile for macOS-latest (aarch64) using ${{ matrix.python }}-${{ matrix.arch }} and upload on package manager
strategy:
fail-fast: false
matrix:
python: [ 3.11 ]
runs-on: macOS-14
env:
NAME: value
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.arch }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
pip install oldest-supported-numpy
pip install setuptools wheel twine packaging
- name: Install macOS dependencies
run: |
brew install zeromq jsoncpp cppzmq
echo "STATIC_ZMQ_PATH=$(brew --prefix)/lib/libzmq.a" >> $GITHUB_ENV
- name: Build on macOS
run: |
cd build/python-build
STATIC_ZMQ_PATH=${{ env.STATIC_ZMQ_PATH }} python setup.py --setuptools bdist_wheel
- name: Correct whl for macOS
run: |
cd build/python-build
pip install delocate
delocate-wheel -v dist/*.whl
- name: Publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
run: |
cd build/python-build
twine upload dist/*.whl --repository-url https://test.pypi.org/legacy/ --verbose --skip-existing