Build wheels for windows and macos with conan
This commit is contained in:
parent
bb6becd3ef
commit
1bc6af1dc4
14 changed files with 390 additions and 280 deletions
202
.github/workflows/pythonpackage.yml
vendored
Normal file
202
.github/workflows/pythonpackage.yml
vendored
Normal file
|
|
@ -0,0 +1,202 @@
|
|||
name: Python package
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
prepare-sqlite:
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- if: steps.sqlite-amalgamation.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd sqlcipher/
|
||||
LIBS="-lm" ./configure --disable-tcl --enable-tempstore=always
|
||||
make sqlite3.c
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: sqlite-amalgamation
|
||||
path: |
|
||||
sqlcipher/sqlite3.c
|
||||
sqlcipher/sqlite3.h
|
||||
|
||||
tests:
|
||||
needs: [prepare-sqlite]
|
||||
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11']
|
||||
os: [ubuntu-20.04, macos-latest, windows-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: false
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: sqlite-amalgamation
|
||||
path: ./src/sqlcipher
|
||||
- name: Build module
|
||||
run: |
|
||||
python setup.py build_ext -i
|
||||
- name: Run tests
|
||||
run: |
|
||||
python -m test
|
||||
|
||||
build-wheels:
|
||||
needs: [prepare-sqlite, tests]
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-20.04
|
||||
cibw_archs: x86_64
|
||||
cibw_build: "cp3*-manylinux_x86_64"
|
||||
compile_target: x86_64
|
||||
- os: ubuntu-20.04
|
||||
cibw_archs: x86_64
|
||||
cibw_build: "cp3*-musllinux_x86_64"
|
||||
cibw_skip: "cp38-musllinux_*"
|
||||
compile_target: x86_64
|
||||
- os: ubuntu-20.04
|
||||
cibw_archs: aarch64
|
||||
cibw_build: "cp3*-manylinux_aarch64"
|
||||
compile_target: armv8
|
||||
- os: ubuntu-20.04
|
||||
cibw_archs: aarch64
|
||||
cibw_build: "cp3*-musllinux_aarch64"
|
||||
compile_target: armv8
|
||||
- os: ubuntu-20.04
|
||||
cibw_archs: i686
|
||||
cibw_build: "cp3*-manylinux_i686"
|
||||
compile_target: x86
|
||||
- os: ubuntu-20.04
|
||||
cibw_archs: i686
|
||||
cibw_build: "cp3*-musllinux_i686"
|
||||
compile_target: x86
|
||||
- os: ubuntu-20.04
|
||||
cibw_archs: ppc64le
|
||||
cibw_build: "cp3*-manylinux_ppc64le"
|
||||
compile_target: ppc64le
|
||||
- os: ubuntu-20.04
|
||||
cibw_archs: ppc64le
|
||||
cibw_build: "cp3*-musllinux_ppc64le"
|
||||
compile_target: ppc64le
|
||||
- os: ubuntu-20.04
|
||||
cibw_archs: s390x
|
||||
cibw_build: "cp3*-manylinux_s390x"
|
||||
compile_target: s390x
|
||||
- os: ubuntu-20.04
|
||||
cibw_archs: s390x
|
||||
cibw_build: "cp3*-musllinux_s390x"
|
||||
compile_target: s390x
|
||||
- os: windows-2019
|
||||
cibw_archs: AMD64
|
||||
cibw_build: "cp3*-win_amd64"
|
||||
compile_target: x86_64
|
||||
- os: windows-2019
|
||||
cibw_archs: x86
|
||||
cibw_build: "cp3*-win32"
|
||||
compile_target: x86
|
||||
- os: windows-2019
|
||||
cibw_archs: ARM64
|
||||
cibw_build: "cp3*-win_arm64"
|
||||
compile_target: armv8
|
||||
- os: macos-11
|
||||
cibw_archs: x86_64
|
||||
cibw_build: "cp3*-macosx_x86_64"
|
||||
compile_target: x86_64
|
||||
- os: macos-11
|
||||
cibw_archs: arm64
|
||||
cibw_build: "cp3*-macosx_arm64"
|
||||
compile_target: armv8
|
||||
- os: macos-11
|
||||
cibw_archs: universal2
|
||||
cibw_build: "cp3*-macosx_universal2"
|
||||
compile_target: universal2
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: false
|
||||
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.8
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: sqlite-amalgamation
|
||||
path: ./
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install -U pip setuptools wheel cibuildwheel
|
||||
|
||||
- name: Build wheels for ${{ matrix.os }} ${{ matrix.cibw_archs }} ${{ matrix.cibw_build }}
|
||||
uses: pypa/cibuildwheel@v2.15.0
|
||||
env:
|
||||
CIBW_BUILD_FRONTEND: build
|
||||
CIBW_BUILD: ${{ matrix.cibw_build }}
|
||||
CIBW_SKIP: ${{ matrix.cibw_skip }}
|
||||
CIBW_ARCHS: ${{ matrix.cibw_archs }}
|
||||
CIBW_ENVIRONMENT: SQLCIPHER3_COMPILE_TARGET=${{ matrix.compile_target }}
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: wheels-${{ github.sha }}
|
||||
path: ./wheelhouse/*.whl
|
||||
retention-days: 7
|
||||
|
||||
build-sdist:
|
||||
needs: [prepare-sqlite, tests]
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: false
|
||||
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.8
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: sqlite-amalgamation
|
||||
path: ./
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install -U pip setuptools wheel
|
||||
|
||||
- name: Build sdist
|
||||
run: |
|
||||
python setup.py sdist
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
path: dist/*.tar.gz
|
||||
|
||||
# upload-pypi:
|
||||
# needs: [build-wheels, build-sdist]
|
||||
# runs-on: ubuntu-20.04
|
||||
|
||||
# steps:
|
||||
# - uses: actions/download-artifact@v3
|
||||
# with:
|
||||
# name: wheels
|
||||
# path: dist/
|
||||
|
||||
# - uses: pypa/gh-action-pypi-publish@release/v1
|
||||
# with:
|
||||
# user: __token__
|
||||
# password: ${{ secrets.pypi_password }}
|
||||
23
.github/workflows/tests.yaml
vendored
23
.github/workflows/tests.yaml
vendored
|
|
@ -1,23 +0,0 @@
|
|||
name: Tests
|
||||
on: [push]
|
||||
jobs:
|
||||
tests:
|
||||
name: ${{ matrix.python-version }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: package deps
|
||||
run: |
|
||||
sudo apt-get install libsqlcipher-dev
|
||||
python setup.py build_ext -i
|
||||
- name: runtests
|
||||
env:
|
||||
PYTHONPATH: '.:$PYTHONPATH'
|
||||
run: python test/
|
||||
Loading…
Add table
Add a link
Reference in a new issue