-
Notifications
You must be signed in to change notification settings - Fork 3
104 lines (92 loc) · 3.04 KB
/
wheels.yaml
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
name: WHL
on:
push:
release:
types: [published]
workflow_dispatch:
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
strategy:
# Ensure that a wheel builder finishes even if another fails
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
python: [36, 37, 38]
bitness: [32, 64]
include:
- os: windows-latest
bitness: 64
platform_id: win_amd64
- os: windows-latest
bitness: 32
platform_id: win32
- os: ubuntu-latest
bitness: 64
platform_id: manylinux_x86_64
- os: ubuntu-latest
bitness: 32
platform_id: manylinux_i686
- os: macos-latest
bitness: 64
platform_id: macosx_x86_64
exclude:
- os: macos-latest
bitness: 32
runs-on: ${{ matrix.os }}
steps:
- name: Checkout reposistory
uses: actions/checkout@master
- name: Checkout submodules
run: git submodule update --init --recursive
- uses: actions/setup-python@v2.2.2
name: Install Python
with:
python-version: '3.7'
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==1.7.2
- name: Prepare msvc x86 env
if: matrix.platform_id == 'win32'
uses: ilammy/msvc-dev-cmd@v1.8.0
with:
arch: x86
- name: Prepare msvc x64 env
if: matrix.platform_id == 'win_amd64'
uses: ilammy/msvc-dev-cmd@v1.8.0
- name: Build wheels
run: |
python -m cibuildwheel --output-dir dist
env:
CIBW_BEFORE_ALL_LINUX: curl -o cmake312.tar.gz -L https://github.com/Kitware/CMake/releases/download/v3.12.0/cmake-3.12.0.tar.gz && tar -zxvf cmake312.tar.gz && cd cmake-3.12.0 && ./bootstrap && make && make install && ln -fs /usr/local/bin/cmake /usr/bin/cmake
CIBW_ENVIRONMENT_WINDOWS: PLATFORM=${{ matrix.platform_id }}
CIBW_BEFORE_BUILD: make
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
CIBW_SKIP: cp36-win*
# CIBW_BUILD_VERBOSITY: 3
DISTUTILS_USE_SDK: 1
MSSdk: 1
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: pytest {project}/fastfm2
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: dist
path: ./dist/*.whl
upload_ofcl_pypi:
needs: build_wheels
runs-on: ubuntu-latest
if: github.event_name == 'release'
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
- name: Display structure of downloaded files
run: ls -R
working-directory: ./dist/
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.POETRY_HTTP_BASIC_PYPI_FASTFM2_TOKEN }}
repository_url: https://upload.pypi.org/legacy/
# verbose: true