set export_bed file format default to zstd #335
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
# This workflow triggers when commit message contains "wheel" or when a tag is pushed. | |
# It will build a Python project using CIBW, then upload the wheel and source | |
# distribution to PyPI. | |
name: Build wheels | |
on: | |
push: | |
workflow_call: | |
inputs: | |
wheel: | |
required: false | |
type: string | |
jobs: | |
build_wheels: | |
name: Wheel on ${{ matrix.os }} for ${{ matrix.python_version }} | |
runs-on: ${{ matrix.os }} | |
if: ${{ startsWith(github.ref, 'refs/tags/') || contains(github.event.head_commit.message, 'wheel') || inputs.wheel }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-11] | |
python_version: ["cp39-*", "cp310-*", "cp311-*"] | |
env: | |
CIBW_BUILD_VERBOSITY: 1 | |
CIBW_BEFORE_ALL_LINUX: > | |
curl https://sh.rustup.rs -sSf | sh -s -- -y && yum install -y openssl-devel zlib-devel | |
CIBW_ARCHS_LINUX: "auto64" | |
CIBW_ENVIRONMENT: 'PATH="$PATH:$HOME/.cargo/bin"' | |
CIBW_SKIP: "pp* *-win32 *-musllinux*" | |
CIBW_BUILD: ${{ matrix.python_version }} | |
CIBW_TEST_REQUIRES: pytest hypothesis | |
CIBW_TEST_COMMAND: "pytest {project}/snapatac2-python/tests" | |
steps: | |
- name: Checkout code | |
uses: nschloe/action-cached-lfs-checkout@v1 | |
- uses: ./.github/actions/setup-rust | |
- if: runner.os != 'Linux' | |
name: Setup env when not using docker | |
run: python -m pip install --upgrade wheel setuptools setuptools-rust | |
# Used to host cibuildwheel | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install cibuildwheel | |
run: python -m pip install cibuildwheel==2.16.2 | |
- name: Build wheels | |
run: python -m cibuildwheel --output-dir wheelhouse snapatac2-python | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
make_sdist: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: '3.10' | |
- name: Install setuptools and setuptools-rust | |
run: | | |
python -m pip install --upgrade wheel setuptools setuptools-rust | |
- name: Build sdist | |
run: python setup.py sdist | |
working-directory: snapatac2-python | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: snapatac2-python/dist/*.tar.gz | |
upload_all: | |
needs: [build_wheels, make_sdist] | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: artifact | |
path: dist | |
- uses: pypa/[email protected] | |
with: | |
user: __token__ | |
password: ${{ secrets.pypi_password }} |