Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/debian-unstable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: debian-unstable-build
on: [push, pull_request]
jobs:
build:
name: subvertpy build on Debian unstable
runs-on: ubuntu-latest
steps:
- name: Checkout subvertpy code
uses: actions/checkout@v6
- name: Build subvertpy on Debian unstable
uses: vjik/docker-run@v1
with:
image: debian:unstable
volumes: ${{ github.workspace }}:/subvertpy:rw
workdir: /subvertpy
command: |
apt update
apt install -y python3 libpython3-dev python3-venv \
build-essential libsvn-dev

python3 -m venv ~/venv
. ~/venv/bin/activate

pip install .
73 changes: 73 additions & 0 deletions .github/workflows/macos-wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: macos-wheels
on: [push, pull_request]
jobs:
macos:
name: subvertpy wheel build for Python ${{ matrix.python-version }}
on ${{ matrix.config.os }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
config:
- os: macos-15-intel
arch: x86_64
- os: macos-15
arch: arm64
env:
MACOSX_DEPLOYMENT_TARGET: "11.0"
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}

steps:
- name: Checkout subvertpy code
uses: actions/checkout@v6
- name: Install Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
id: python-install
with:
python-version: ${{ matrix.python-version }}
- name: Install build and pytest Python packages
run: sudo pip install build pytest
- name: Install MacPorts
run: |
curl -LO https://raw.githubusercontent.com/GiovanniBussi/macports-ci/master/macports-ci
source ./macports-ci install --sync=rsync
- name: Set macOS deployment target and install MacOSX sdk 11.3
run: |
echo 'macosx_deployment_target 11.0' | sudo tee -a /opt/local/etc/macports/macports.conf
echo 'macosx_sdk_version 11.3' | sudo tee -a /opt/local/etc/macports/macports.conf
curl -LO https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.3.sdk.tar.xz
tar -xzf MacOSX11.3.sdk.tar.xz
sudo mv MacOSX11.3.sdk /Library/Developer/CommandLineTools/SDKs/
- name: Install subvertpy build dependencies
run: sudo port -N -s install subversion db48
- name: Sets CIBW_BUILD and SDKROOT environment variable
env:
pyVer: "${{matrix.python-version}}"
arch: "${{matrix.config.arch}}"
run: |
echo "CIBW_BUILD=cp${pyVer/./}-macosx_$arch" >> $GITHUB_ENV
echo "SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk" >> $GITHUB_ENV
- name: Build subvertpy wheel with cibuildwheel
run: |
pip install cibuildwheel --user
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD_VERBOSITY: 1
- name: Test built wheel can be installed and imported
working-directory: wheelhouse
run: |
pip install $(ls -t | head -1)
python -c "from subvertpy import client, ra, repos, subr, wc"
cd ../ && mv subvertpy/tests . && rm -rf subvertpy && python -m pytest tests
- uses: actions/upload-artifact@v4
with:
name: subvertpy-wheel-${{ matrix.python-version }}-${{ matrix.config.arch }}
path: ./wheelhouse/*.whl
- name: Publish subvertpy wheel to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
run: |
sudo pip install twine
twine check wheelhouse/*
twine upload --skip-existing wheelhouse/*
51 changes: 51 additions & 0 deletions .github/workflows/manylinux-wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: manylinux-wheels
on: [push, pull_request]
jobs:
manylinux:
name: subvertpy manylinux ${{ matrix.python-version }} wheel build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- name: Checkout subvertpy code
uses: actions/checkout@v6
- name: Install Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
id: python-install
with:
python-version: ${{ matrix.python-version }}
- name: Sets CIBW_BUILD environment variable
env:
pyVer: "${{matrix.python-version}}"
run: |
echo "CIBW_BUILD=cp${pyVer/./}-manylinux_x86_64" >> $GITHUB_ENV
- name: Build subvertpy wheel with cibuildwheel
run: |
sudo apt install python3-pip
pip3.12 install cibuildwheel --user
python3.12 -m cibuildwheel --output-dir wheelhouse
env:
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_34
CIBW_BUILD_VERBOSITY: 1
CIBW_BEFORE_ALL: dnf -y install subversion-devel
- name: Test wheel can be installed and subvertpy module imported
run: |
$Python3_ROOT_DIR/bin/pip install $(ls -t | head -1)
$Python3_ROOT_DIR/bin/python -c "
from subvertpy import client, ra, repos, subr, wc"
pip3 install pytest
cd ../ && mv subvertpy/tests . && rm -rf subvertpy && python3 -m pytest tests
working-directory: wheelhouse
- uses: actions/upload-artifact@v4
with:
name: subvertpy-wheel-${{ matrix.python-version }}
path: ./wheelhouse/*.whl
- name: Publish subvertpy wheel to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
packages-dir: wheelhouse/
skip-existing: true
171 changes: 46 additions & 125 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,160 +6,81 @@ jobs:
build:

runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
python-version: [2.7, 3.5, 3.6, 3.7, 3.8]
os: [ubuntu-latest]
svn-version: [1.14.0, 1.13.0, 1.10.6, 1.9.12]
experimental: [false]
include:
- os: macos-latest
python-version: 2.7
experimental: false
- os: macos-latest
python-version: 3.5
experimental: false
- os: macos-latest
python-version: 3.6
experimental: false
- os: macos-latest
python-version: 3.7
experimental: false
- os: macos-latest
python-version: 3.8
experimental: false
- os: windows-latest
python-version: 3.8
svn-version: 1.9.12
experimental: true
- os: windows-latest
python-version: 3.8
svn-version: 1.10.6
experimental: true
- os: windows-latest
python-version: 3.8
svn-version: 1.13.0
experimental: true
- os: windows-latest
python-version: 3.8
svn-version: 1.14.0
experimental: true
- os: windows-latest
python-version: 3.9
svn-version: 1.9.12
experimental: true
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@v2
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies (apt)
run: |
sudo apt update
sudo apt install libapr1-dev libaprutil1-dev libdb5.3-dev liblz4-dev libsasl2-dev libperl-dev libserf-dev libsqlite3-dev libtool python-all-dev libneon27-gnutls-dev libutf8proc-dev
sudo apt install libsvn-dev
if: "matrix.os == 'ubuntu-latest'"
- name: Install dependencies (brew)
run: |
brew install subversion apr-util apr
echo "$(brew --prefix)/opt/subversion/libexec" >> $GITHUB_PATH
echo "$(brew --prefix)/opt/apr-util/bin" >> $GITHUB_PATH
echo "$(brew --prefix)/opt/apr/bin" >> $GITHUB_PATH
brew install subversion
if: "matrix.os == 'macos-latest'"
- name: Install dependencies (Windows)
run: |
vcpkg install apr:x64-windows apr-util:x64-windows sqlite3:x64-windows zlib:x64-windows utf8proc:x64-windows openssl:x64-windows berkeleydb:x64-windows lz4:x64-windows python2:x64-windows expat:x64-windows
vcpkg integrate install
echo "APR_INCLUDE_DIR=$env:VCPKG_INSTALLATION_ROOT/packages/apr_x64-windows/include" >> $env:GITHUB_ENV
echo "APR_LINK_FLAGS=/LIBPATH:$env:VCPKG_INSTALLATION_ROOT/packages/apr_x64-windows/lib libapr-1.lib" >> $env:GITHUB_ENV
Get-ChildItem -Path "$env:VCPKG_INSTALLATION_ROOT/packages/apr_x64-windows/lib/*" -Recurse -Filter "*.dll" | Copy-Item -Destination "$env:GITHUB_WORKSPACE/subvertpy"
echo "APU_INCLUDE_DIR=$env:VCPKG_INSTALLATION_ROOT/packages/apr-util_x64-windows/include" >> $env:GITHUB_ENV
Get-ChildItem -Path "$env:VCPKG_INSTALLATION_ROOT/packages/apr-util_x64-windows/lib/*" -Recurse -Filter "*.dll" | Copy-Item -Destination "$env:GITHUB_WORKSPACE/subvertpy"
echo "APU_LINK_FLAGS=/LIBPATH:$env:VCPKG_INSTALLATION_ROOT/packages/apr-util_x64-windows/lib libaprutil-1.lib" >> $env:GITHUB_ENV
if: "matrix.os == 'windows-latest'"
- name: Locate & Exec vcvarsall.bat
run: |
$VCVarsAll = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -find "VC\Auxiliary\Build\vcvarsall.bat"
if (-not $VCVarsAll) {
Write-Error "vcvarsall.bat not found" -Category NotInstalled
exit 1
}
$Token = "#####ENV#####"
$enc = [Console]::OutputEncoding
[Console]::OutputEncoding = [Text.Encoding]::Unicode
$VCVarsAllResult = cmd /U /C "`"$VCVarsAll`" x64 && echo $TOKEN&& set"
[Console]::OutputEncoding = $enc
$TokenIndex = $VCVarsAllResult.IndexOf($Token)
if ($TokenIndex -eq -1) {
Write-Error "vcvarsall failed."
exit 1
}
$VCVarsAllResult | Select-Object -Skip ($TokenIndex + 1) | ForEach-Object {
$k, $v = $_ -split "=", 2
Write-Output "$k=$v" >> $GITHUB_ENV
}
shell: pwsh
if: "matrix.os == 'windows-latest'"
- name: Install serf (Windows)
run: |
curl -L https://downloads.apache.org/serf/serf-1.3.9.zip -o serf.zip
unzip -q serf.zip
cd serf-1.3.9
curl -L http://prdownloads.sourceforge.net/scons/scons-local-2.3.0.zip -o scons-local.zip
unzip -q scons-local.zip
python2 ./scons.py --debug=stacktrace
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'"
continue-on-error: true
- name: Add msbuild to PATH
uses: microsoft/[email protected]
if: "matrix.os == 'windows-latest'"
- name: Install Subversion (Windows)
run: |
curl -L https://downloads.apache.org/subversion/subversion-${{ matrix.svn-version }}.zip -o subversion.zip
unzip -q subversion.zip
cd subversion-${{ matrix.svn-version }}
cp $env:VCPKG_INSTALLATION_ROOT/packages/expat_x64-windows/include/* $env:VCPKG_INSTALLATION_ROOT/packages/apr-util_x64-windows/include
cp $env:VCPKG_INSTALLATION_ROOT/packages/expat_x64-windows/lib/* $env:VCPKG_INSTALLATION_ROOT/packages/apr-util_x64-windows/lib
cp $env:VCPKG_INSTALLATION_ROOT/packages/expat_x64-windows/bin/* $env:VCPKG_INSTALLATION_ROOT/packages/apr-util_x64-windows/bin
python2 gen-make.py --debug --vsnet-version=2019 --with-apr=$env:VCPKG_INSTALLATION_ROOT/packages/apr_x64-windows --with-apr-util=$env:VCPKG_INSTALLATION_ROOT/packages/apr-util_x64-windows --with-zlib=$env:VCPKG_INSTALLATION_ROOT/packages/zlib_x64-windows --with-sqlite=$env:VCPKG_INSTALLATION_ROOT/packages/sqlite3_x64-windows
msbuild subversion_vcnet.sln /t:__MORE__ /p:Configuration=Release
Copy-Item -Recurse -Path $env:GITHUB_WORKSPACE/subversion-${{ matrix.svn-version }}/subversion/include -Destination $env:VCPKG_INSTALLATION_ROOT/installed/x64-windows/include/subversion-1
Get-ChildItem -Path "$env:GITHUB_WORKSPACE/subversion-${{ matrix.svn-version }}/Release/subversion/libsvn_*/*" -Recurse | Copy-Item -Destination "$env:VCPKG_INSTALLATION_ROOT/installed/x64-windows/lib"
Get-ChildItem -Path "$env:GITHUB_WORKSPACE/subversion-${{ matrix.svn-version }}/Release/subversion/libsvn_*/*" -Recurse -Filter "*.dll" | Copy-Item -Destination "$env:GITHUB_WORKSPACE/subvertpy"
echo "SVN_HEADER_PATH=$env:VCPKG_INSTALLATION_ROOT/installed/x64-windows/include/subversion-1" >> $env:GITHUB_ENV
echo "SVN_LIBRARY_PATH=$env:VCPKG_INSTALLATION_ROOT/installed/x64-windows/lib" >> $env:GITHUB_ENV
uses: microsoft/setup-msbuild@v2
if: "matrix.os == 'windows-latest'"
- name: Install Subversion (Linux)
run: |
curl -L https://downloads.apache.org/subversion/subversion-${{ matrix.svn-version }}.tar.gz -o subversion.tar.gz
tar xfz subversion.tar.gz
cd subversion-${{ matrix.svn-version }}
./configure
make
sudo make install
sudo ldconfig -v
cd ..
if: "matrix.os == 'ubuntu-latest'"
- name: Install other dependencies
run: |
python -m pip install --upgrade pip
pip install -U pip coverage codecov flake8 fastimport
pip install -U pip flake8 fastimport setuptools pytest pytest-cov
- name: Style checks
run: |
python -m flake8
python -m flake8 subvertpy
- name: Build (Linux)
run: |
python setup.py build_ext -i
pip install -e .
if: "matrix.os == 'ubuntu-latest'"
- name: Build (Mac OS X)
- name: Build (macOS)
run: |
python setup.py build_ext -i
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"
pip install -e .
if: "matrix.os == 'macos-latest'"
- name: Build (Windows)
env:
APR_INCLUDE_DIR: ${{ env.VCPKG_INSTALL_DIR }}/include
APU_INCLUDE_DIR: ${{ env.VCPKG_INSTALL_DIR }}/include
SVN_HEADER_PATH: ${{ env.VCPKG_INSTALL_DIR }}/include/subversion-1
SVN_LIBRARY_PATH: ${{ env.VCPKG_INSTALL_DIR }}/lib
LIB: ${{ env.VCPKG_INSTALL_DIR }}/lib
run: |
pip install -e .
if: "matrix.os == 'windows-latest'"
- name: Coverage test suite run (Linux)
run: |
pytest -sv --cov=subvertpy subvertpy
if: "matrix.os == 'ubuntu-latest'"
- name: Coverage test suite run
run: |
python setup.py build_ext -i
pytest -sv --cov=subvertpy subvertpy
if: "matrix.os == 'macos-latest'"
- name: Coverage test suite run
env:
SUBVERTPY_DLL_PATH: ${{ github.workspace }}/vcpkg/installed/x64-windows-release/bin
run: |
python -m coverage run -p -m unittest -v subvertpy.tests.test_suite
# using coverage on windows make some tests fail so only run tests
pytest -sv subvertpy
if: "matrix.os == 'windows-latest'"
Loading
Loading