Skip to content

Commit

Permalink
拆分任务,加快编译速度
Browse files Browse the repository at this point in the history
  • Loading branch information
AlongWY committed Jul 24, 2022
1 parent e74c311 commit 722f609
Showing 1 changed file with 64 additions and 4 deletions.
68 changes: 64 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,17 @@ jobs:
path: dist/*.tar.gz


build_wheels:
name: Wheels on ${{ matrix.os }}
build_wheels_x64:
name: x64 Wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
os: [
ubuntu-latest,
windows-latest,
macos-latest
]

steps:
- uses: actions/checkout@v3
Expand All @@ -45,8 +49,64 @@ jobs:
- name: Build Wheels
uses: pypa/[email protected]
env:
CIBW_SKIP: "*-musllinux_x86_64 *-musllinux_i686"
CIBW_ARCHS_MACOS: auto
CIBW_ARCHS_WINDOWS: auto64
CIBW_ARCHS_LINUX: auto64

- name: Upload wheels
uses: actions/upload-artifact@v3
with:
path: wheelhouse/*.whl

build_wheels_x86:
name: x86 Wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [
ubuntu-latest,
# windows-latest,
# macos-latest
]

steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Build Wheels
uses: pypa/[email protected]
env:
CIBW_SKIP: "*-musllinux_x86_64 *-musllinux_i686"
CIBW_ARCHS_MACOS: universal2
CIBW_ARCHS_WINDOWS: auto32
CIBW_ARCHS_LINUX: auto32

- name: Upload wheels
uses: actions/upload-artifact@v3
with:
path: wheelhouse/*.whl

build_wheels_musl:
name: Musl Wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]

steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Build Wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: "*-musllinux_x86_64 *-musllinux_i686"
CIBW_ARCHS_MACOS: universal2
CIBW_ARCHS_WINDOWS: auto32
CIBW_ARCHS_LINUX: auto32

- name: Upload wheels
uses: actions/upload-artifact@v3
Expand All @@ -56,7 +116,7 @@ jobs:

upload_all:
name: Upload if release
needs: [ build_wheels, build_sdist ]
needs: [ build_sdist, build_wheels_x64, build_wheels_x86, build_wheels_musl ]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'

Expand Down

0 comments on commit 722f609

Please sign in to comment.