Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit087a522

Browse files
committed
fix publishing job
1 parent4dc661b commit087a522

File tree

1 file changed

+106
-22
lines changed

1 file changed

+106
-22
lines changed

‎.github/workflows/build_wheel_publish.yml‎

Lines changed: 106 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,59 +3,143 @@ name: build_wheel_publish
33
on:
44
push:
55
branches:[ master ]
6+
#tags:
7+
# - "v*"
68

79
jobs:
8-
build_wheels:
9-
name:Build wheels on ${{ matrix.os }}
10-
runs-on:${{ matrix.os }}
11-
strategy:
12-
matrix:
13-
os:[ubuntu-latest, windows-latest, macos-latest]
10+
build_linux_x86:
11+
name:Build Linux x86_64 wheels
12+
runs-on:ubuntu-latest
1413

1514
steps:
1615
-uses:actions/checkout@v5
1716
with:
1817
submodules:recursive
1918

20-
-name:Set up QEMU
21-
if:runner.os == 'Linux'
22-
uses:docker/setup-qemu-action@v2
19+
-name:Build wheels (Linux x86_64)
20+
uses:pypa/cibuildwheel@v3.3.0
21+
env:
22+
CIBW_BUILD_FRONTEND:"build"
23+
CIBW_MANYLINUX_X86_64_IMAGE:manylinux2014
24+
CIBW_ARCHS_LINUX:x86_64
25+
26+
-name:Upload wheels artifact
27+
uses:actions/upload-artifact@v4
28+
with:
29+
name:wheels-linux-x86_64
30+
path:wheelhouse/*.whl
31+
32+
build_linux_aarch64:
33+
name:Build Linux aarch64 wheels
34+
runs-on:ubuntu-24.04-arm
35+
36+
steps:
37+
-uses:actions/checkout@v5
38+
with:
39+
submodules:recursive
40+
41+
-name:Build wheels (Linux aarch64)
42+
uses:pypa/cibuildwheel@v3.3.0
43+
env:
44+
CIBW_BUILD_FRONTEND:"build"
45+
CIBW_MANYLINUX_AARCH64_IMAGE:manylinux2014
46+
CIBW_ARCHS_LINUX:aarch64
47+
48+
-name:Upload wheels artifact
49+
uses:actions/upload-artifact@v4
50+
with:
51+
name:wheels-linux-aarch64
52+
path:wheelhouse/*.whl
53+
54+
build_windows:
55+
name:Build Windows wheels
56+
runs-on:windows-latest
57+
58+
steps:
59+
-uses:actions/checkout@v5
2360
with:
24-
platforms:all
61+
submodules:recursive
2562

2663
-name:Setup MSYS2 on Windows
27-
if:startsWith(runner.os, 'Windows')
2864
uses:msys2/setup-msys2@v2
2965
with:
3066
msystem:MINGW64
3167
update:true
3268
install:git unzip mingw-w64-x86_64-toolchain automake1.16 automake-wrapper autoconf libtool make mingw-w64-x86_64-json-c mingw-w64-x86_64-crt-git
3369

3470
-name:Install NPCAP OEM on Windows
35-
if:startsWith(runner.os, 'Windows')
71+
shell:pwsh
3672
run:|
3773
choco install wget --no-progress
3874
wget --user ${{ secrets.NPCAP_OEM_USERNAME }} --password ${{ secrets.NPCAP_OEM_PASSWORD }} https://npcap.org/oem/dist/npcap-1.60-oem.exe
39-
Start-Process npcap-1.60-oem.exe -ArgumentList "/loopback_support=yes /winpcap_mode=yes /dot11_support=yes /S" -wait
75+
Start-Process npcap-1.60-oem.exe -ArgumentList "/loopback_support=yes /winpcap_mode=yes /dot11_support=yes /S" -Wait
4076
41-
-name:Build wheels
77+
-name:Build wheels (Windows)
4278
uses:pypa/cibuildwheel@v3.3.0
4379
env:
4480
MSYSTEM:MINGW64
4581
MSYS2_PATH:D:/a/_temp/msys64
4682
CIBW_BUILD_FRONTEND:"build"
47-
CIBW_MANYLINUX_X86_64_IMAGE:manylinux2014
48-
CIBW_BEFORE_ALL_MACOS:brew install autoconf automake libtool pkg-config gettext json-c gcc
49-
CIBW_ARCHS_LINUX:auto aarch64
5083
CIBW_ARCHS_WINDOWS:auto64
84+
85+
-name:Upload wheels artifact
86+
uses:actions/upload-artifact@v4
87+
with:
88+
name:wheels-windows
89+
path:wheelhouse/*.whl
90+
91+
build_macos:
92+
name:Build macOS wheels
93+
runs-on:macos-latest
94+
95+
steps:
96+
-uses:actions/checkout@v5
97+
with:
98+
submodules:recursive
99+
100+
-name:Build wheels (macOS)
101+
uses:pypa/cibuildwheel@v3.3.0
102+
env:
103+
CIBW_BUILD_FRONTEND:"build"
104+
CIBW_BEFORE_ALL_MACOS:brew install autoconf automake libtool pkg-config gettext json-c gcc
51105
CIBW_ARCHS_MACOS:x86_64 arm64
52106

53-
-name:Publish on Pypi
54-
# if: startsWith(github.ref, 'refs/tags/')
107+
-name:Upload wheels artifact
108+
uses:actions/upload-artifact@v4
109+
with:
110+
name:wheels-macos
111+
path:wheelhouse/*.whl
112+
113+
publish:
114+
name:Publish to PyPI
115+
runs-on:ubuntu-latest
116+
needs:
117+
-build_linux_x86
118+
-build_linux_aarch64
119+
-build_windows
120+
-build_macos
121+
# only publish on tag refs, e.g. refs/tags/v1.2.3
122+
# if: startsWith(github.ref, 'refs/tags/')
123+
124+
steps:
125+
-name:Download wheels artifacts
126+
uses:actions/download-artifact@v4
127+
with:
128+
path:dist
129+
130+
-name:Set up Python
131+
uses:actions/setup-python@v5
132+
with:
133+
python-version:"3.11"
134+
135+
-name:Install Twine
136+
run:|
137+
python -m pip install --upgrade pip
138+
python -m pip install twine
139+
140+
-name:Publish on PyPI
55141
env:
56142
TWINE_USERNAME:__token__
57143
TWINE_PASSWORD:${{ secrets.PYPI_TOKEN }}
58144
run:|
59-
python3 -m pip install --upgrade pip --break-system-packages
60-
python3 -m pip install -r dev_requirements.txt --break-system-packages
61-
python3 -m twine upload --skip-existing ./wheelhouse/nfstream-*.whl
145+
python -m twine upload --skip-existing dist/**/nfstream-*.whl

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp