-
Notifications
You must be signed in to change notification settings - Fork 1
94 lines (80 loc) · 3.05 KB
/
cibuildwheel.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
name: cibuildwheel
on: [push, pull_request]
jobs:
build_wheels:
strategy:
matrix:
os: ["ubuntu-latest"]
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
# Sure there's a better way to do this, but I doncare.
- name: write_branchName_to_file
run: echo ${GITHUB_REF##*/} > branch_name.tmp
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ENVIRONMENT: "BRANCH_NAME=$(cat branch_name.tmp)"
CIBW_BUILD_VERBOSITY: 3
CIBW_BUILD: cp36-manylinux_x86_64 cp37-manylinux_x86_64 cp38-manylinux_x86_64 cp39-manylinux_x86_64 cp310-manylinux_x86_64 cp311-manylinux_x86_64
CIBW_SKIP: pp* *-manylinux_{aarch64,ppc64le,s390x}
CIBW_ARCHS_LINUX: x86_64
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux2014_x86_64:latest
CIBW_BEFORE_ALL: |
yum install bzip2 -y
python -m pip install --upgrade pip
python -m pip install cmake
python -m pip install requests
yum install python-requests -y
yum install zlib-devel -y
yum install centos-release-scl-rh -y
yum install doxygen -y
yum install devtoolset-7-toolchain -y
yum groupinstall -y "development tools"
yum install boost-devel -y
yum install -y zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel expat-devel
cmake -BkSpider_BUILD_DIR
cmake --build kSpider_BUILD_DIR -j4
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
upload_pypi_test:
needs: build_wheels
if: "contains(github.event.head_commit.message, 'pypi_test')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
id: fetch_artifacts
with:
path: "wheels/"
- name: Publish package to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_KEY }}
repository_url: https://test.pypi.org/legacy/
packages_dir: ${{steps.fetch_artifacts.outputs.download-path}}/artifact/
skip_existing: true
verbose: true
upload_pypi_release:
needs: build_wheels
runs-on: ubuntu-latest
if: "contains(github.event.head_commit.message, 'pypi_release')"
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
id: fetch_artifacts
with:
path: "wheels/"
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_KSPIDER2_API_KEY }}
packages_dir: ${{steps.fetch_artifacts.outputs.download-path}}/artifact/
skip_existing: true
verbose: true