Skip to content

Test Sourcebuild

Test Sourcebuild #24

# SPDX-FileCopyrightText: 2023 geisserml <geisserml@gmail.com>
# SPDX-License-Identifier: Apache-2.0 OR BSD-3-Clause
name: Test Sourcebuild
on:
workflow_dispatch:
workflow_call:
defaults:
run:
shell: bash
jobs:
test_sourcebuild:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
use_syslibs: [false]
include:
- os: ubuntu-latest
use_syslibs: [true]
runs-on: ${{ matrix.os }}
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Check out pypdfium2 repository
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}
- name: Install deps
run: python3 -m pip install -U -r req/default.txt
- name: Build PDFium (default)
if: ${{ !matrix.use_syslibs }}
run: python3 ./setupsrc/pypdfium2_setup/build_pdfium.py
- name: Build PDFium (with syslibs)
if: ${{ matrix.use_syslibs }}
run: |
sudo apt-get install -y libfreetype-dev liblcms2-dev libjpeg-dev libopenjp2-7-dev libpng-dev zlib1g-dev libicu-dev libtiff-dev
python3 ./setupsrc/pypdfium2_setup/build_pdfium.py --use-syslibs
- name: Install & test
run: PDFIUM_PLATFORM="sourcebuild" python3 -m pip install .
- name: Run test suite
run: ./run test