-
Notifications
You must be signed in to change notification settings - Fork 16
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
Draft: Add initial build wheels CI/CD pipeline #763
Open
dudoslav
wants to merge
44
commits into
main
Choose a base branch
from
db/sc-52969/wheels
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
ad3f0aa
Add initial build wheels CI/CD pipeline
dudoslav 486a255
Fix working directory for cibuildwheels
dudoslav d206d82
Fix incorrect package-dir option
dudoslav d478e19
Disable all platforms except Ubuntu
dudoslav 963f3bd
Install zlib1g-dev
dudoslav 7c3c756
Fix install deps command
dudoslav 85c4afd
Install xz as well
dudoslav 26d7a6a
Use BEFORE_ALL instead of BEFORE_BUILD
dudoslav 33e30fc
Update cibuildwheels version
dudoslav 48ca0ee
Enable macos and windows wheels
dudoslav 9183194
Install autoreconf for macos
dudoslav 469bc6c
Add additional dependencies for macos build
dudoslav ba97a2b
Disable macos
dudoslav aeae6ad
Change mingw htslib hash
dudoslav 47928e9
Quick rework CMake files
dudoslav b0988c7
Fix widnows build
1ded335
Fix install group
dudoslav 572d827
Make tests optional
dudoslav 59df672
Install tiledb.so
dudoslav 34bb75d
Also install tiledbvcf
dudoslav ba57075
Test wheels
dudoslav 019d843
Build with executables
dudoslav 2ab078a
Fix macos workflow
dudoslav e15b381
Modify macos workflow
dudoslav be84c71
Change linking check paths
dudoslav 9f36f87
Enable Macos wheel builds
dudoslav 3c56c0d
Fix macos dependency install
dudoslav 4634884
Install autoconf instead of autoreconf
dudoslav 2b2f76d
Change macosx deployment version
dudoslav f72da21
Enable sdist and testing
dudoslav 8929aca
Fix sdist
dudoslav 131899f
Add pytest requires
dudoslav 7d490e4
Add test extra dependency group
dudoslav e34397e
Install sdist test group
dudoslav 13a982d
Add python code as well
dudoslav f5f5b6b
Install bcftools for tests
dudoslav 3d077c5
Fix install bcftools
dudoslav 5ed74f2
Install build dependencies for sdist tests
dudoslav 1bdcb43
Return MACOSX_DEPLOYMENT_TARGET to 11
dudoslav 5732183
MACOSX_DEPLOYMENT_TARGET to 13
dudoslav 1318103
Temporarily comment out failing test
dudoslav f4afc69
Add install build dependencies to ci/cd
dudoslav fbd38d5
Fix missing dlls
c23c18e
Merge remote-tracking branch 'origin/main' into db/sc-52969/wheels
dudoslav 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 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 |
---|---|---|
@@ -0,0 +1,161 @@ | ||
name: Build and test wheels | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: Version to use are release version | ||
required: true | ||
type: string | ||
test_pypi: | ||
description: Upload packages to test.pypi.org | ||
required: false | ||
type: boolean | ||
default: false | ||
push: | ||
tags: | ||
- "*" | ||
|
||
env: | ||
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_TILEDB: ${{ inputs.version }} | ||
|
||
jobs: | ||
build_wheels: | ||
name: Wheel ${{ matrix.buildplat[0] }}-${{ matrix.buildplat[1] }}-${{ matrix.python }} | ||
runs-on: ${{ matrix.buildplat[0] }} | ||
strategy: | ||
matrix: | ||
buildplat: | ||
- [ubuntu-22.04, manylinux_x86_64] | ||
- [macos-13, macosx_x86_64] | ||
- [macos-14, macosx_arm64] | ||
- [windows-2022, win_amd64] | ||
python: ["cp38", "cp39", "cp310", "cp311", "cp312"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: "Brew setup on macOS" # x-ref c8e49ba8f8b9ce | ||
if: ${{ startsWith(matrix.buildplat[0], 'macos-') == true }} | ||
run: | | ||
set -e pipefail | ||
brew update | ||
brew install automake pkg-config ninja llvm bzip2 xz autoconf zlib libdeflate bcftools | ||
|
||
- name: Build wheels | ||
uses: pypa/cibuildwheel@v2.20.0 | ||
env: | ||
CIBW_BUILD_VERBOSITY: 3 | ||
CIBW_ENVIRONMENT_MACOS: > | ||
CC=clang | ||
CXX=clang++ | ||
CIBW_ARCHS: all | ||
CIBW_PRERELEASE_PYTHONS: True | ||
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} | ||
CIBW_BEFORE_ALL_LINUX: yum install -y bzip2-devel xz-devel bcftools | ||
CIBW_TEST_COMMAND: pytest {package}/apis/python | ||
CIBW_TEST_EXTRAS: test | ||
MACOSX_DEPLOYMENT_TARGET: "13.0" | ||
with: | ||
output-dir: wheelhouse | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-wheels-${{ matrix.buildplat[0] }}-${{ matrix.buildplat[1] }}-${{ matrix.python }} | ||
path: "./wheelhouse/*.whl" | ||
|
||
build_sdist: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
outputs: | ||
sdist_name: ${{ steps.get_sdist_name.outputs.sdist_name }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build sdist | ||
run: pipx run build --sdist | ||
|
||
- name: Get sdist package name | ||
id: get_sdist_name | ||
run: | | ||
echo "sdist_name=$(ls dist/ | head -n 1)" >> "$GITHUB_OUTPUT" | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: sdist | ||
path: dist/*.tar.gz | ||
|
||
test_sdist: | ||
name: Test source distribution package | ||
needs: [build_sdist] | ||
strategy: | ||
matrix: | ||
os: | ||
- macos-13 | ||
- macos-14 | ||
# - windows-2022 Currently we do not know how to install bcftools on windows | ||
- ubuntu-22.04 | ||
python: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Set up Python ${{ matrix.python }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Install bcftools MacOS | ||
if: ${{ startsWith(matrix.os, 'macos-') == true }} | ||
run: | | ||
set -e pipefail | ||
brew update | ||
brew install automake pkg-config ninja llvm bzip2 xz autoconf zlib libdeflate bcftools | ||
|
||
- name: Install bcftools Ubuntu | ||
if: ${{ startsWith(matrix.os, 'ubuntu-') == true }} | ||
run: sudo apt install bcftools | ||
|
||
- name: Download sdist artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: sdist | ||
path: dist | ||
|
||
- name: Install sdist artifact | ||
run: pip install --verbose dist/${{ needs.build_sdist.outputs.sdist_name }}[test] | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- name: Run tests | ||
shell: bash | ||
run: | | ||
PROJECT_CWD=$PWD | ||
cd .. | ||
pytest -vv --showlocals $PROJECT_CWD/apis/python | ||
|
||
upload_pypi: | ||
needs: [build_wheels, test_sdist] | ||
runs-on: ubuntu-latest | ||
environment: pypi | ||
permissions: | ||
id-token: write | ||
outputs: | ||
package_version: ${{ steps.get_package_version.outputs.package_version }} | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
path: dist | ||
merge-multiple: true | ||
|
||
- id: get_package_version | ||
run: | | ||
echo "package_version=$(ls dist/ | head -n 1 | cut -d - -f 2)" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Upload to test-pypi | ||
if: inputs.test_pypi | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ | ||
|
||
# - name: Upload to pypi | ||
# if: startsWith(github.ref, 'refs/tags/') | ||
# uses: pypa/gh-action-pypi-publish@release/v1 |
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This step shouldn't be removed. The whole point of this
python
job that depends on the previouslibtiledbvcf
job is to test that python can be built against an existing libtiledbvcf. The jobpython-standalone
below already tests the ability of Python to bootstrap a libtiledbvcf installation. We want to test that this continues to work (since it is required eg for our conda feedstock builds).