Add more Adm bindings #843
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Python package | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| fail-fast: false | |
| env: | |
| VCPKG_INSTALL_DIR: ${{ github.workspace }}\vcpkg\installed\x64-windows-release | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install dependencies (apt) | |
| run: | | |
| sudo apt update | |
| sudo apt install libsvn-dev libutf8proc-dev libclang-dev subversion | |
| # Work around https://bugs.debian.org/1055242 | |
| svnversion=$(svn --version | grep -oP 'svn, version \K\d+\.\d+\.\d+') | |
| sudo sed -i "s/^Version: *$/Version: $svnversion/" /usr/lib/*/pkgconfig/libsvn_*.pc | |
| if: "matrix.os == 'ubuntu-latest'" | |
| - name: Install dependencies (brew) | |
| run: | | |
| brew install subversion pkg-config apr apr-util | |
| if: "matrix.os == 'macos-latest'" | |
| - name: Install dependencies (Windows) | |
| uses: johnwason/vcpkg-action@v7 | |
| id: vcpkg | |
| with: | |
| pkgs: subversion | |
| triplet: x64-windows-release | |
| extra-args: --allow-unsupported --recurse --keep-going | |
| token: ${{ github.token }} | |
| if: "matrix.os == 'windows-latest'" | |
| - name: Add msbuild to PATH | |
| uses: microsoft/setup-msbuild@v3 | |
| if: "matrix.os == 'windows-latest'" | |
| - name: Install other dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -U pip ruff fastimport setuptools setuptools-rust pytest pytest-cov | |
| - name: Style checks | |
| run: | | |
| python -m ruff check subvertpy | |
| python -m ruff format --check subvertpy | |
| cargo fmt --all -- --check | |
| - name: Build (Linux) | |
| run: | | |
| pip install -e . | |
| if: "matrix.os == 'ubuntu-latest'" | |
| - name: Build (macOS) | |
| run: | | |
| export PATH="$(brew --prefix)/opt/subversion/libexec:$PATH" | |
| export PATH="$(brew --prefix)/opt/apr-util/bin:$PATH" | |
| export PATH="$(brew --prefix)/opt/apr/bin:$PATH" | |
| export PKG_CONFIG_PATH="$(brew --prefix apr)/lib/pkgconfig:$(brew --prefix apr-util)/lib/pkgconfig" | |
| export LIBRARY_PATH="$(brew --prefix gettext)/lib:$(brew --prefix utf8proc)/lib" | |
| pip install -e . | |
| if: "matrix.os == 'macos-latest'" | |
| - name: Build (Windows) | |
| env: | |
| LIB: ${{ env.VCPKG_INSTALL_DIR }}\lib | |
| SYSTEM_DEPS_APR_1_NO_PKG_CONFIG: "1" | |
| SYSTEM_DEPS_APR_1_LIB: libapr-1 | |
| SYSTEM_DEPS_APR_1_SEARCH_NATIVE: ${{ env.VCPKG_INSTALL_DIR }}\lib | |
| SYSTEM_DEPS_APR_1_INCLUDE: ${{ env.VCPKG_INSTALL_DIR }}\include | |
| SYSTEM_DEPS_APR_UTIL_1_NO_PKG_CONFIG: "1" | |
| SYSTEM_DEPS_APR_UTIL_1_LIB: libaprutil-1 | |
| SYSTEM_DEPS_APR_UTIL_1_SEARCH_NATIVE: ${{ env.VCPKG_INSTALL_DIR }}\lib | |
| SYSTEM_DEPS_APR_UTIL_1_INCLUDE: ${{ env.VCPKG_INSTALL_DIR }}\include | |
| SYSTEM_DEPS_LIBSVN_CLIENT_NO_PKG_CONFIG: "1" | |
| SYSTEM_DEPS_LIBSVN_CLIENT_LIB: libsvn_client-1 | |
| SYSTEM_DEPS_LIBSVN_CLIENT_SEARCH_NATIVE: ${{ env.VCPKG_INSTALL_DIR }}\lib | |
| SYSTEM_DEPS_LIBSVN_CLIENT_INCLUDE: ${{ env.VCPKG_INSTALL_DIR }}\include\subversion-1;${{ env.VCPKG_INSTALL_DIR }}\include | |
| SYSTEM_DEPS_LIBSVN_DELTA_NO_PKG_CONFIG: "1" | |
| SYSTEM_DEPS_LIBSVN_DELTA_LIB: libsvn_delta-1 | |
| SYSTEM_DEPS_LIBSVN_DELTA_SEARCH_NATIVE: ${{ env.VCPKG_INSTALL_DIR }}\lib | |
| SYSTEM_DEPS_LIBSVN_DELTA_INCLUDE: ${{ env.VCPKG_INSTALL_DIR }}\include\subversion-1;${{ env.VCPKG_INSTALL_DIR }}\include | |
| SYSTEM_DEPS_LIBSVN_DIFF_NO_PKG_CONFIG: "1" | |
| SYSTEM_DEPS_LIBSVN_DIFF_LIB: libsvn_diff-1 | |
| SYSTEM_DEPS_LIBSVN_DIFF_SEARCH_NATIVE: ${{ env.VCPKG_INSTALL_DIR }}\lib | |
| SYSTEM_DEPS_LIBSVN_DIFF_INCLUDE: ${{ env.VCPKG_INSTALL_DIR }}\include\subversion-1;${{ env.VCPKG_INSTALL_DIR }}\include | |
| SYSTEM_DEPS_LIBSVN_FS_NO_PKG_CONFIG: "1" | |
| SYSTEM_DEPS_LIBSVN_FS_LIB: libsvn_fs-1 | |
| SYSTEM_DEPS_LIBSVN_FS_SEARCH_NATIVE: ${{ env.VCPKG_INSTALL_DIR }}\lib | |
| SYSTEM_DEPS_LIBSVN_FS_INCLUDE: ${{ env.VCPKG_INSTALL_DIR }}\include\subversion-1;${{ env.VCPKG_INSTALL_DIR }}\include | |
| SYSTEM_DEPS_LIBSVN_RA_NO_PKG_CONFIG: "1" | |
| SYSTEM_DEPS_LIBSVN_RA_LIB: libsvn_ra-1 | |
| SYSTEM_DEPS_LIBSVN_RA_SEARCH_NATIVE: ${{ env.VCPKG_INSTALL_DIR }}\lib | |
| SYSTEM_DEPS_LIBSVN_RA_INCLUDE: ${{ env.VCPKG_INSTALL_DIR }}\include\subversion-1;${{ env.VCPKG_INSTALL_DIR }}\include | |
| SYSTEM_DEPS_LIBSVN_REPOS_NO_PKG_CONFIG: "1" | |
| SYSTEM_DEPS_LIBSVN_REPOS_LIB: libsvn_repos-1 | |
| SYSTEM_DEPS_LIBSVN_REPOS_SEARCH_NATIVE: ${{ env.VCPKG_INSTALL_DIR }}\lib | |
| SYSTEM_DEPS_LIBSVN_REPOS_INCLUDE: ${{ env.VCPKG_INSTALL_DIR }}\include\subversion-1;${{ env.VCPKG_INSTALL_DIR }}\include | |
| SYSTEM_DEPS_LIBSVN_SUBR_NO_PKG_CONFIG: "1" | |
| SYSTEM_DEPS_LIBSVN_SUBR_LIB: libsvn_subr-1 | |
| SYSTEM_DEPS_LIBSVN_SUBR_SEARCH_NATIVE: ${{ env.VCPKG_INSTALL_DIR }}\lib | |
| SYSTEM_DEPS_LIBSVN_SUBR_INCLUDE: ${{ env.VCPKG_INSTALL_DIR }}\include\subversion-1;${{ env.VCPKG_INSTALL_DIR }}\include | |
| SYSTEM_DEPS_LIBSVN_WC_NO_PKG_CONFIG: "1" | |
| SYSTEM_DEPS_LIBSVN_WC_LIB: libsvn_wc-1 | |
| SYSTEM_DEPS_LIBSVN_WC_SEARCH_NATIVE: ${{ env.VCPKG_INSTALL_DIR }}\lib | |
| SYSTEM_DEPS_LIBSVN_WC_INCLUDE: ${{ env.VCPKG_INSTALL_DIR }}\include\subversion-1;${{ env.VCPKG_INSTALL_DIR }}\include | |
| run: | | |
| pip install -e . | |
| if: "matrix.os == 'windows-latest'" | |
| - name: Coverage test suite run (Linux) | |
| run: | | |
| pytest -sv --cov=subvertpy tests | |
| if: "matrix.os == 'ubuntu-latest'" | |
| - name: Coverage test suite run | |
| run: | | |
| pytest -sv --cov=subvertpy tests | |
| if: "matrix.os == 'macos-latest'" | |
| - name: Copy DLLs for test run | |
| run: | | |
| Copy-Item "${{ env.VCPKG_INSTALL_DIR }}\bin\*.dll" subvertpy\ | |
| if: "matrix.os == 'windows-latest'" | |
| - name: Test suite run | |
| run: | | |
| # using coverage on windows make some tests fail so only run tests | |
| pytest -sv tests | |
| if: "matrix.os == 'windows-latest'" |