forked from vaexio/vaex
-
Notifications
You must be signed in to change notification settings - Fork 0
Maximize wheel build parallellization #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
bdb8fe5
Maximize wheel build parallellization
ddelange 682fbaf
git submodule update --remote --merge packages/vaex-core/vendor/pybind11
ddelange 7e8f5ab
Fix gcc error
ddelange 3a7dd5e
Fix workflow syntax
ddelange 37ece87
Remove redefinition
ddelange 5438dc1
Disable win32
ddelange beff33a
Remove testing leftovers
ddelange File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,84 +7,96 @@ on: | |
| pull_request: | ||
|
|
||
| jobs: | ||
| build_wheels_matrix: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| include: ${{ steps.set-matrix.outputs.include }} | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| with: | ||
| submodules: true | ||
|
|
||
| - uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: "3.x" | ||
|
|
||
| - run: pip install cibuildwheel==2.12.0 | ||
|
|
||
| - id: set-matrix | ||
| run: | | ||
| MATRIX_INCLUDE=$( | ||
| { | ||
| cibuildwheel --print-build-identifiers --platform linux --arch x86_64,aarch64 | grep cp | jq -Rc '{"only": ., "os": "ubuntu-latest"}' \ | ||
| && cibuildwheel --print-build-identifiers --platform macos --arch x86_64,arm64 | grep cp | jq -Rc '{"only": ., "os": "macos-latest"}' \ | ||
| && cibuildwheel --print-build-identifiers --platform windows --arch x86,AMD64 | grep cp | jq -Rc '{"only": ., "os": "windows-latest"}' | ||
| } | jq -sc | ||
| ) | ||
| echo "include=$MATRIX_INCLUDE" >> $GITHUB_OUTPUT | ||
| cat $GITHUB_OUTPUT | ||
| working-directory: packages/vaex-core/ | ||
|
|
||
| build_wheels: | ||
| name: Build wheel on ${{ matrix.os }} | ||
| needs: build_wheels_matrix | ||
| runs-on: ${{ matrix.os }} | ||
| name: Build ${{ matrix.only }} | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-18.04, macOS-latest, windows-latest] | ||
| python-version: [36, 37, 38, 39, 310] | ||
| include: ${{ fromJson(needs.build_wheels_matrix.outputs.include) }} | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v1 | ||
| - uses: actions/checkout@v3 | ||
| with: | ||
| submodules: true | ||
|
|
||
| - name: Copy dll | ||
| if: (matrix.os == 'windows-latest') | ||
| if: matrix.os == 'windows-latest' | ||
| uses: ./ci/actions/windll | ||
|
|
||
| - uses: actions/setup-python@v2 | ||
| name: Install Python | ||
| with: | ||
| python-version: '3.7' | ||
|
|
||
| - name: Install cibuildwheel | ||
| run: | | ||
| python -m pip install cibuildwheel==2.8.1 | ||
|
|
||
| - name: Install twine/wheel | ||
| run: | | ||
| python -m pip install twine wheel | ||
|
|
||
| - name: chores | ||
| if: matrix.os != 'windows-latest' | ||
| run: | | ||
| mkdir dist | ||
| mkdir packages/vaex-core/bin | ||
| cp bin/install_pcre.sh packages/vaex-core/bin/ | ||
|
|
||
| - name: Build vaex-core (windows) | ||
| if: (matrix.os == 'windows-latest') | ||
| env: | ||
| CIBW_BUILD: cp${{ matrix.python-version }}*64 | ||
| CIBW_ENVIRONMENT_LINUX: "CFLAGS='-Wl,-strip-all' CXXFLAGS='-Wl,-strip-all'" | ||
| run: | | ||
| python -m cibuildwheel --output-dir dist packages/vaex-core | ||
| - name: Set up QEMU | ||
| if: runner.os == 'Linux' | ||
| uses: docker/setup-qemu-action@v2 | ||
|
|
||
| - name: Build vaex-core (linux, osx) | ||
| if: (matrix.os != 'windows-latest') | ||
| - uses: pypa/[email protected] | ||
| with: | ||
| only: ${{ matrix.only }} | ||
| package-dir: packages/vaex-core/ | ||
| output-dir: packages/vaex-core/dist/ | ||
| env: | ||
| CIBW_BEFORE_BUILD: bin/install_pcre.sh | ||
| CIBW_BUILD: "cp${{ matrix.python-version }}*64 cp${{ matrix.python-version }}-macosx-*" | ||
| CIBW_ENVIRONMENT_LINUX: "CFLAGS='-Wl,-strip-all' CXXFLAGS='-Wl,-strip-all'" | ||
| CIBW_BEFORE_BUILD: ${{ matrix.os == 'windows-latest' && '' || 'bin/install_pcre.sh' }} | ||
| CIBW_BUILD_VERBOSITY: 2 | ||
| # needed for m1 builds | ||
| CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 | ||
| CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28 | ||
| CIBW_ENVIRONMENT_LINUX: "CFLAGS='-Wl,-strip-all' CXXFLAGS='-Wl,-strip-all'" | ||
| CIBW_ENVIRONMENT_MACOS: "CFLAGS='-I/usr/local/include -L/usr/local/lib' CXXFLAGS='-I/usr/local/include -L/usr/local/lib' LDFLAGS='-L/usr/local/lib'" | ||
| CIBW_ARCHS_MACOS: "x86_64 arm64" | ||
| run: | | ||
| python -m cibuildwheel --output-dir dist packages/vaex-core | ||
|
|
||
| - name: Make source distribution | ||
| shell: bash | ||
| run: | | ||
| cd packages/vaex-core && python setup.py sdist | ||
| - uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: "3.x" | ||
|
|
||
| - name: Copy build artifacts | ||
| shell: bash | ||
| run: | | ||
| cp packages/vaex-core/dist/* dist/ | ||
| - name: Make source distribution | ||
| run: python setup.py sdist | ||
| working-directory: packages/vaex-core/ | ||
|
|
||
| - uses: actions/upload-artifact@v1 | ||
| - uses: actions/upload-artifact@v3 | ||
| with: | ||
| name: distributions | ||
| path: ./dist | ||
| path: packages/vaex-core/dist | ||
|
|
||
| - name: Publish a Python distribution to PyPI | ||
| if: github.event_name == 'push' | ||
| env: | ||
| TWINE_USERNAME: __token__ | ||
| TWINE_PASSWORD: ${{ secrets.pypi_password_vaex_core }} | ||
| run: | | ||
| pip install twine wheel | ||
| openssl sha256 dist/* | ||
| twine upload --skip-existing dist/vaex?core* | ||
| twine upload --skip-existing | ||
| working-directory: packages/vaex-core/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.