Skip to content

Commit

Permalink
scripts/gh_release.py: with pyodide build/test, default mupdf master …
Browse files Browse the repository at this point in the history
…if github scheduled job.

This is more useful than testing with default hard-coded MuPDF source release.
  • Loading branch information
julian-smith-artifex-com committed Jul 1, 2024
1 parent ec1f7ba commit 1f3e3d5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions scripts/gh_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@
Building for Pyodide
If GITHUB_EVENT_NAME is 'schedule' we assume we are running as a scheduled
Github workflow, and if inputs_PYMUPDF_SETUP_MUPDF_BUILD is unset we change
it to use MuPDF master branch.
If `inputs_wheels_linux_pyodide` is true and we are on Linux, we clone
`emsdk.git`, set it up, and run `pyodide build`. This runs our setup.py
with CC etc set up to create Pyodide binaries in a wheel called, for
Expand Down Expand Up @@ -208,6 +212,14 @@ def get_bool(name, default=0):
# Build Pyodide wheel if specified.
#
if platform.system() == 'Linux' and inputs_wheels_linux_pyodide:
# In scheduled runs (by .github/workflows/test_pyodide.yml), use MuPDF
# master.
GITHUB_EVENT_NAME = os.getenv('GITHUB_EVENT_NAME')
if GITHUB_EVENT_NAME == 'schedule':
if inputs_PYMUPDF_SETUP_MUPDF_BUILD in ('', None):
log(f'Overriding inputs_PYMUPDF_SETUP_MUPDF_BUILD because {GITHUB_EVENT_NAME=} {inputs_PYMUPDF_SETUP_MUPDF_BUILD=}.')
inputs_PYMUPDF_SETUP_MUPDF_BUILD = 'git:--branch master https://github.com/ArtifexSoftware/mupdf.git'
log(f'{inputs_PYMUPDF_SETUP_MUPDF_BUILD=}')
build_pyodide_wheel(inputs_wheels_implementations, inputs_PYMUPDF_SETUP_MUPDF_BUILD)

# Build sdist(s).
Expand Down

0 comments on commit 1f3e3d5

Please sign in to comment.