Skip to content
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

Fix for #1082 libraries in Linux wheels #1084

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 41 additions & 9 deletions .github/workflows/ubuntu_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, pull_request]

jobs:
run_tests:

name: Run tests on Python ${{ matrix.python-version }}
runs-on: ubuntu-latest

strategy:
Expand Down Expand Up @@ -192,24 +192,56 @@ jobs:
cd "$GITHUB_WORKSPACE"
python "./${{ matrix.tests-dir }}/mysqltests.py" "DRIVER={MySQL ODBC 8.0 ANSI Driver};SERVER=localhost;UID=root;PWD=root;DATABASE=test;CHARSET=utf8mb4"

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Build sdist
run: python setup.py sdist

- name: Upload builds
uses: actions/upload-artifact@v3
with:
name: sdist
path: ./dist/*.gz

build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-2019, macos-10.15]
# https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job
os: [windows-2019, macos-11, ubuntu-20.04]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Build wheels
uses: pypa/[email protected]
uses: pypa/[email protected]
# https://cibuildwheel.readthedocs.io/en/stable/options/#options-summary
env:
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_24
CIBW_BEFORE_ALL_LINUX: apt-get update && apt-get -y install unixodbc-dev
# disable 32-bit and pypy builds
CIBW_SKIP: "*-win32 *-manylinux_i686 pp*"
# Windows - both 64-bit and 32-bit builds
CIBW_ARCHS_WINDOWS: "AMD64 x86"

# macOS - both Intel and ARM builds; no bundled libraries
CIBW_ARCHS_MACOS: "x86_64 arm64"
CIBW_REPAIR_WHEEL_COMMAND_MACOS: ""

# Linux - based on CentOS 7; glibc 64-bit builds only; no bundled libraries
# https://github.com/pypa/manylinux#docker-images
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_ARCHS_LINUX: x86_64
CIBW_BEFORE_ALL_LINUX: yum -y install unixODBC-devel && odbcinst -j
CIBW_REPAIR_WHEEL_COMMAND_LINUX: ""

# Build choices - disable musl Linux and PyPy builds
CIBW_SKIP: "*-musllinux_* pp*"

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