comparison mupdf-source/.github/workflows/test_csharp.yml @ 3:2c135c81b16c

MERGE: upstream PyMuPDF 1.26.4 with MuPDF 1.26.7
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 15 Sep 2025 11:44:09 +0200
parents b50eed0cc0ef
children
comparison
equal deleted inserted replaced
0:6015a75abc2d 3:2c135c81b16c
1 name: Build and test of C# Bindings
2
3 on:
4 schedule:
5 - cron: '3 5 * * *'
6 workflow_dispatch:
7
8 jobs:
9
10 test:
11 name: Build and test of C# Bindings
12 runs-on: ${{ matrix.os }}
13 strategy:
14 matrix:
15 #os: [ubuntu-20.04, windows-2019, macos-10.15]
16 # 2023-02-10: Clang-python appears to not find any functions on macos.
17 os: [ubuntu-latest, windows-2019]
18
19 # Avoid cancelling of all runs after a single failure.
20 fail-fast: false
21
22 steps:
23
24 - uses: actions/checkout@v2
25 with:
26 submodules: true
27 - uses: actions/setup-python@v2
28
29 - name: Build and test of C# Bindings
30
31 # We use a python script to run a series of commands, all inside a venv
32 # so that clang-python is available.
33 #
34
35 run: |
36 import os
37 import platform
38 import subprocess
39 import sys
40
41 def run(command):
42 print(f'Running: {command}')
43 sys.stdout.flush()
44 subprocess.run( command, shell=True, check=True)
45
46 if platform.system() == 'Linux':
47 run(f'sudo apt install mono-devel')
48
49 venv_name = 'pylocal'
50
51 command = ''
52 command += f'{sys.executable} -m venv {venv_name}'
53 if platform.system() == 'Windows':
54 command += f' && .\\{venv_name}\\Scripts\\activate'
55 else:
56 command += f' && . {venv_name}/bin/activate'
57 command += f' && python -m pip install -U pip libclang swig setuptools'
58 command += f' && python scripts/mupdfwrap.py -b --csharp all --test-csharp'
59
60 run( command)
61
62 shell: python