Skip to content

build

build #6

Workflow file for this run

name: build
on:
workflow_dispatch:
jobs:
make-wheels:
name: Build wheels ${{ matrix.os }} ${{ matrix.py }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest"]
py: ["cp312"]
# os: ["ubuntu-latest", "macos-14", "windows-latest"]
# py: ["cp39", "cp310", "cp311", "cp312"]
fail-fast: true
steps:
- uses: actions/checkout@v4
- name: build pysqlcipher3
run: |
git clone --depth=1 --branch=master https://github.com/rigglemania/pysqlcipher3.git
cd pysqlcipher3
mkdir amalgamation
cp ../sqlcipher/sqlite3.[ch] amalgamation
mkdir src/python3/sqlcipher
cp ../sqlcipher/sqlite3.[ch] src/python3/sqlcipher
python setup.py build_amalgamation
python setup.py build
cd ..
mkdir src/pysqlcipher3
for f in pysqlcipher3/build/lib.*/pysqlcipher3/*.{py,so}; do cp $f src/pysqlcipher3/; done
- name: build
run: |
pip install build
python -m build
PLATFORM_TAG=$(python -c 'import sysconfig; print(sysconfig.get_platform())')
cd dist
NEW_NAME=$(ls *.whl | sed "s/any.whl$/${PLATFORM_TAG}.whl/")
mv *.whl $NEW_NAME
echo "WHEEL_NAME=$(ls *.whl)" >> $GITHUB_ENV
- uses: actions/upload-artifact@v4
with:
name: ${{ env.WHEEL_NAME }}
path: "dist/*.whl"