From bea8414abfe48f225ab584465061323b9d3e800d Mon Sep 17 00:00:00 2001 From: LiuYe Date: Wed, 19 Mar 2025 20:26:09 +0800 Subject: [PATCH] Update workflow configuration and ignore .vs files - Replace "pip install -vv ." by "python setup.py install" to avoid platfrom path conflicts with standard library names. - Update OS matrix to `ubuntu-22.04` to support C++ 20. - Update `actions/checkout` and `actions/setup-python` to the latest versions. - Update complete tool chain. - Update action for uploading generated code to the latest version of `actions/upload-artifact`. - Add ignore for `.vs` directory in `.gitignore`. --- .github/workflows/test_python_pip.yml | 16 +++++++++------- .gitignore | 1 + 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test_python_pip.yml b/.github/workflows/test_python_pip.yml index 64dced3736..6f6d316ec8 100644 --- a/.github/workflows/test_python_pip.yml +++ b/.github/workflows/test_python_pip.yml @@ -1,4 +1,4 @@ -name: Pip build/install and test of Python Bindings +name: Pip build/install and test of Python Bindings on: schedule: @@ -12,17 +12,19 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04, windows-2019, macos-latest] + # os: [ubuntu-20.04, windows-2019, macos-latest] + # zxing need c++ 20, so we need to use ubuntu-22.04 -- 2025/03/19 + os: [ubuntu-22.04, windows-2019, macos-latest] # Avoid cancelling of all runs after a single failure. fail-fast: false steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v3 - name: Pip build/install and test of Python Bindings @@ -52,8 +54,8 @@ jobs: command += f' && ./{venv_name}/Scripts/activate'.replace('/', os.sep) else: command += f' && . {venv_name}/bin/activate' - command += f' && python -m pip install -U pip setuptools' - command += f' && python -m pip install -vv .' + command += f' && python -m pip install -U pip libclang swig setuptools' + command += f' && python setup.py install' command += f' && python scripts/mupdfwrap.py -d - --test-python' print(f'Running: {command}') @@ -63,7 +65,7 @@ jobs: shell: python - name: Archive generated code - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: failure() with: name: generated-code diff --git a/.gitignore b/.gitignore index dd7867bae5..4dbf0fdc9f 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,4 @@ platform/win32/Release platform/win32/ReleaseOpenssl platform/win32/Memento platform/win32/x64 +/.vs