remove python 3.6 build for macOS because of pip version too low #6
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
name: macOS | |
on: | |
push: | |
branches: | |
- '**' | |
paths-ignore: | |
- docs/** | |
- ChangeLog* | |
- .github/workflows/test_linux.yml | |
- .github/workflows/test_windows.yml | |
- .github/workflows/test_linux_aarch64.yml | |
- dev/build_manylinux_wheels.sh | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
- 'v[0-9]+.[0-9]+.[0-9]+rc[0-9]+' | |
pull_request: | |
branches: | |
- '**' | |
paths-ignore: | |
- docs/** | |
- ChangeLog* | |
- .github/workflows/test_linux.yml | |
- .github/workflows/test_windows.yml | |
- .github/workflows/test_linux_aarch64.yml | |
- dev/build_manylinux_wheels.sh | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] | |
os: [macos-12] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: build wheel and sdist | |
env: | |
LDFLAGS: -L/usr/local/opt/[email protected]/lib | |
CPPFLAGS: -I/usr/local/opt/[email protected]/include | |
PKG_CONFIG_PATH: /usr/local/opt/[email protected]/lib/pkgconfig | |
_PYTHON_HOST_PLATFORM: macosx-12.0-universal2 | |
ARCHFLAGS: "-arch arm64 -arch x86_64" | |
run: | | |
pip install --upgrade pip | |
pip install -r dev/requirements-dev.txt | |
pip install delocate | |
python setup.py sdist | |
brew install [email protected] | |
brew install libiconv | |
python dev/build.py \ | |
--ws-dir=./freetds \ | |
--dist-dir=./dist \ | |
--with-openssl=yes \ | |
--sdist \ | |
--static-freetds | |
delocate-listdeps --all dist/*.whl | |
delocate-wheel -v dist/*.whl | |
delocate-listdeps --all dist/*.whl | |
pip install pymssql --no-index --only-binary :all: -f dist | |
python -c "import pymssql; print(pymssql.version_info())" | |
- name: Test with pytest | |
run: | | |
pip install twine --upgrade | |
twine check dist/* | |
pytest -sv --durations=0 | |
- name: Archive wheels and sdist | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pymssql-${{ matrix.python-version }}-${{ github.sha }} | |
path: dist | |
overwrite: true | |
- name: Publish wheels | |
if: github.repository_owner == 'pymssql' && startsWith(github.ref, 'refs/tags/v') | |
run: | | |
pip install twine --upgrade | |
twine upload --skip-existing -u __token__ -p ${{secrets.PYMSSQL_PYPI_TOKEN}} dist/*.whl | |
- name: Publish wheels on test.pypi.org | |
if: github.repository_owner == 'pymssql' && github.ref == 'refs/heads/master' | |
run: | | |
pip install twine --upgrade | |
twine upload --skip-existing -u __token__ -p ${{secrets.PYMSSQL_TEST_PYPI_TOKEN}} --repository-url=https://test.pypi.org/legacy/ dist/*.whl |