Skip to content

Update readme and use windows-2019 #35

Update readme and use windows-2019

Update readme and use windows-2019 #35

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
build_wheels:
name: Build wheels on ${{ matrix.config.os }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- os: ubuntu-latest
- os: windows-2019
- os: macos-13
- os: macos-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: "recursive"
- name: '🛠️ Win MSVC 64 setup'
if: contains(matrix.config.os, 'windows')
uses: microsoft/setup-msbuild@v2
- name: '🛠️ Win MSVC 64 dev cmd setup'
if: contains(matrix.config.os, 'windows')
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
# Used to host cibuildwheel
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.22.0
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD_FRONTEND: build # pip backend doesn't seem including our dynamic libraries
CIBW_BUILD: "cp39*"
CIBW_BEFORE_BUILD_LINUX: cd libmdbx && git fetch --tags
CIBW_BEFORE_BUILD_WINDOWS: choco install ninja cmake git && cd libmdbx && git fetch --tags
CIBW_BEFORE_BUILD_MACOS: brew install ninja cmake git && cd libmdbx && git fetch --tags
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: pytest {package}/tests
CIBW_SKIP: "*-win32"
# to supply options, put them in 'env', like:
# env:
# CIBW_SOME_OPTION: value
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.config.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
make_sdist:
name: Make SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Build SDist
run: |
python3 -m pip install -U pip build
python3 -m build --sdist
- uses: actions/upload-artifact@v4
with:
name: sdist-archive
path: dist/*.tar.gz
publish:
needs: [ build_wheels, make_sdist ]
environment: pypi
permissions:
id-token: write
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/download-artifact@v4
with:
merge-multiple: true
path: dist
- name: Show downloaded artifacts
run: ls -laR dist
- name: 'Publish distribution to PyPI'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}