-
Notifications
You must be signed in to change notification settings - Fork 17
64 lines (48 loc) · 1.74 KB
/
test_sourcebuild.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# SPDX-FileCopyrightText: 2024 geisserml <[email protected]>
# 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:
# NOTE On GH actions, macOS <=13 is Intel, whereas macOS >=14 will be ARM64
os: [ubuntu-latest, macos-13, macos-14, 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@v5
with:
python-version: '3.10'
- name: Check out pypdfium2 repository
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}
fetch-depth: 0 # quick fix for `git describe`
- name: Install deps
run: python3 -m pip install -U -r req/setup.txt -r req/test.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
run: PDFIUM_PLATFORM="sourcebuild" python3 -m pip install .
# must show matching pdfium version with sourcebuild origin
- name: Check version
run: pypdfium2 -v
- name: Run test suite
run: ./run test