Skip to content

A fast, helpful, and open-source document parser

ci: adjust actions

Clelia (Astra) Bertellie8fc4fb5d0cc
diff --git a/.github/workflows/ci-node.yml b/.github/workflows/ci-node.yml
index 2a149b4..cc1b5a9 100644
--- a/.github/workflows/ci-node.yml
+++ b/.github/workflows/ci-node.yml
@@ -8,7 +8,7 @@ on:
- "packages/node/**"
- ".github/workflows/ci-node.yml"
pull_request:
- branches: [main, logan/musl-builds] # temporary, will remove once this is merged
+ branches: [main]
paths:
- "crates/**"
- "packages/node/**"
diff --git a/.github/workflows/ci-python.yml b/.github/workflows/ci-python.yml
index 1fc5c95..8c33f82 100644
--- a/.github/workflows/ci-python.yml
+++ b/.github/workflows/ci-python.yml
@@ -8,7 +8,7 @@ on:
- "packages/python/**"
- ".github/workflows/ci-python.yml"
pull_request:
- branches: [main, logan/musl-builds] # temporary, will remove once this is merged
+ branches: [main]
paths:
- "crates/**"
- "packages/python/**"
diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml
index 81454cd..1bd65fa 100644
--- a/.github/workflows/release-python.yml
+++ b/.github/workflows/release-python.yml
@@ -4,11 +4,11 @@ on:
workflow_dispatch:
inputs:
version:
- description: 'Version to release (e.g. 2.1.0)'
+ description: "Version to release (e.g. 2.1.0)"
required: true
type: string
dry-run:
- description: 'Dry run (build but do not publish)'
+ description: "Dry run (build but do not publish)"
type: boolean
default: false
@@ -68,7 +68,7 @@ jobs:
- uses: actions/setup-python@v5
with:
- python-version: '3.12'
+ python-version: "3.12"
- uses: dtolnay/[email protected]
with:
@@ -117,22 +117,25 @@ jobs:
apk add tesseract-ocr-dev leptonica-dev openssl-dev pkgconf || true
fi
- - name: Build wheels (musl)
+ - name: Build wheels (musl container)
if: ${{ matrix.musl }}
- uses: PyO3/maturin-action@v1
- with:
- target: ${{ matrix.target }}
- args: --release --out dist --find-interpreter
- manylinux: musllinux_1_2
- working-directory: packages/python
- before-script-linux: |
- if command -v apk &> /dev/null; then
- apk add --no-cache tesseract-ocr-dev leptonica-dev openssl-dev pkgconf build-base cmake perl
- elif command -v yum &> /dev/null; then
- yum install -y tesseract-devel leptonica-devel openssl-devel pkgconfig perl-IPC-Cmd || true
- elif command -v apt-get &> /dev/null; then
- apt-get update && apt-get install -y libtesseract-dev libleptonica-dev libssl-dev pkg-config || true
- fi
+ # Same pattern as the node musl build: run inside a vanilla
+ # python:3-alpine with clang+libc++ from apk. Bypasses maturin-action's
+ # musllinux_1_2 cross image, which causes FORTIFY_SOURCE issues with
+ # tesseract's C++ build and broken host-openssl for build-deps.
+ run: |
+ chmod +x scripts/build-musl-py.sh
+ docker run --rm \
+ -v "$GITHUB_WORKSPACE":/work \
+ -v "$HOME/.cargo/registry":/root/.cargo/registry \
+ -v "$HOME/.cargo/git":/root/.cargo/git \
+ -v "$HOME/.cache/pdfium-rs":/root/.cache/pdfium-rs \
+ -w /work \
+ python:3.12-alpine \
+ /work/scripts/build-musl-py.sh
+ # The container runs as root; fix perms so subsequent steps can
+ # read/upload the produced wheel.
+ sudo chmod -R a+rw packages/python/dist/ || true
- name: Copy pdfium dylib into wheel (Unix)
if: runner.os != 'Windows'
@@ -246,7 +249,7 @@ jobs:
- uses: actions/setup-python@v5
with:
- python-version: '3.12'
+ python-version: "3.12"
- name: Download wheels
uses: actions/download-artifact@v4