-
Notifications
You must be signed in to change notification settings - Fork 10
55 lines (51 loc) · 1.59 KB
/
pythonPublishTest_windows.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
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.yml'
jobs:
deploy:
name: Compile for windows-latest using ${{ matrix.python }}-${{ matrix.arch }} and upload on package manager
strategy:
fail-fast: false
matrix:
python: [ '3.10','3.11', 'pypy-3.9', 'pypy-3.10' ]
arch:
- x64
runs-on: windows-latest
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: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Install Windows dependencies
run: |
cd build/python-build
cmd.exe /c setup_Win_compile_all.bat
- name: Build on Windows
run: |
cd build\python-build
python setup.py --setuptools bdist_wheel
- 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