forked from tyteen4a03/pyre2
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (70 loc) · 2.02 KB
/
main.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
name: Build
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }} for Python
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.11'
- name: Install cibuildwheel
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-cibw.txt
- name: Build wheels
env:
CIBW_BUILD: cp38-* cp39-* cp310-* cp311-*
CIBW_ARCHS_LINUX: "auto64"
CIBW_SKIP: "*musllinux*"
CIBW_BEFORE_ALL_LINUX: >
yum -y -q --enablerepo=extras install epel-release
&& yum install -y re2-devel ninja-build
CIBW_REPAIR_WHEEL_COMMAND_LINUX: "auditwheel show {wheel} && auditwheel repair -w {dest_dir} {wheel}"
CIBW_TEST_COMMAND: python -c "import re2"
run: |
python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.11'
- name: Build sdist
run: |
pip install pep517
python -m pep517.build -s .
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
check_artifacts:
needs: [build_sdist, build_wheels]
defaults:
run:
shell: bash
name: Check artifacts are correct
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v2
# note wheels should be in subdirectory <upload_name>
- name: Check number of downloaded artifacts
run: ls -R