Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/.github/workflows/test_csharp.yml @ 2:b50eed0cc0ef upstream
ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4.
The directory name has changed: no version number in the expanded directory now.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:43:07 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 1:1d09e1dec1d9 | 2:b50eed0cc0ef |
|---|---|
| 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 |
