Skip to content
Open
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
48 changes: 33 additions & 15 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Mergin Plugin Packages
name: Build Package
on:
push:
workflow_dispatch:
Expand All @@ -10,19 +10,18 @@ on:
type: string
REQUESTED_GEODIFF_VER:
description: 'Geodiff version'
default: '2.0.4'
default: '2.1.2'
type: string
env:
PYTHON_API_CLIENT_VER: ${{ inputs.REQUESTED_PYTHON_API_CLIENT_VER || '0.12.0' }}
GEODIFF_VER: ${{ inputs.REQUESTED_GEODIFF_VER || '2.0.4' }}
GEODIFF_VER: ${{ inputs.REQUESTED_GEODIFF_VER || '2.1.2' }}
PYTHON_VER: "38"
PLUGIN_NAME: Mergin
jobs:
build_linux_binary:
name: Extract geodiff binary linux
runs-on: ubuntu-latest
env:
PY_PLATFORM: "manylinux2014_x86_64"
PY_PLATFORM: "manylinux_2_28_x86_64"
steps:
- uses: actions/setup-python@v4
name: Install Python
Expand All @@ -34,7 +33,7 @@ jobs:
--no-deps --platform ${PY_PLATFORM} \
--implementation cp \
--abi cp${PYTHON_VER} pygeodiff==${GEODIFF_VER}
unzip -o pygeodiff-$GEODIFF_VER-cp${PYTHON_VER}-cp${PYTHON_VER}-manylinux_2_17_x86_64.${PY_PLATFORM}.whl -d tmp || true
unzip -o pygeodiff-$GEODIFF_VER-cp${PYTHON_VER}-cp${PYTHON_VER}-${PY_PLATFORM}.whl -d tmp || true
mkdir pygeodiff-binaries
cp tmp/pygeodiff/libpygeodiff-${GEODIFF_VER}-python.so ./pygeodiff-binaries/

Expand Down Expand Up @@ -80,11 +79,9 @@ jobs:
name: artifact-pygeodiff-windows
path: ./pygeodiff-binaries/*.pyd

build_macos_binary:
build_macos_binaries:
name: Extract geodiff binary macos
runs-on: macos-latest
env:
PY_PLATFORM: "macosx_10_9_x86_64"
steps:
- uses: actions/setup-python@v4
name: Install Python
Expand All @@ -93,14 +90,16 @@ jobs:
run: |
brew install unzip

- name: Download pygeodiff binaries
- name: Download pygeodiff binaries (Intel)
env:
PY_PLATFORM: "macosx_10_9_x86_64"
run: |
pip3 download --only-binary=:all: --no-deps --platform ${PY_PLATFORM} --python-version ${PYTHON_VER} --implementation cp --abi cp${PYTHON_VER} pygeodiff==$GEODIFF_VER
unzip -o pygeodiff-$GEODIFF_VER-cp${PYTHON_VER}-cp${PYTHON_VER}-${PY_PLATFORM}.whl -d tmp
mkdir pygeodiff-binaries
cp tmp/pygeodiff/*.dylib ./pygeodiff-binaries/

- name: Patching pygeodiff binaries
- name: Patching pygeodiff binaries (Intel)
run: |
install_name_tool -change @loader_path/.dylibs/libsqlite3.0.dylib @rpath/libsqlite3.dylib ./pygeodiff-binaries/libpygeodiff-$GEODIFF_VER-python.dylib
OTOOL_L=$(otool -L ./pygeodiff-binaries/libpygeodiff-$GEODIFF_VER-python.dylib)
Expand All @@ -110,13 +109,32 @@ jobs:
exit 1
fi

- name: Download pygeodiff binaries (arm64)
env:
PY_PLATFORM: "macosx_14_0_arm64"
run: |
pip3 download --only-binary=:all: --no-deps --platform ${PY_PLATFORM} --python-version ${PYTHON_VER} --implementation cp --abi cp${PYTHON_VER} pygeodiff==$GEODIFF_VER
unzip -o pygeodiff-$GEODIFF_VER-cp${PYTHON_VER}-cp${PYTHON_VER}-${PY_PLATFORM}.whl -d tmp
cp tmp/pygeodiff/libpygeodiff-$GEODIFF_VER-python.dylib ./pygeodiff-binaries/libpygeodiff-$GEODIFF_VER-python-arm64.dylib # expects that the folder is created before in the intel job

- name: Patching pygeodiff binaries (arm64)
run: |
install_name_tool -change @loader_path/.dylibs/libsqlite3.0.dylib @rpath/libsqlite3.dylib ./pygeodiff-binaries/libpygeodiff-$GEODIFF_VER-python-arm64.dylib
codesign --force --sign - ./pygeodiff-binaries/libpygeodiff-$GEODIFF_VER-python-arm64.dylib
OTOOL_L=$(otool -L ./pygeodiff-binaries/libpygeodiff-$GEODIFF_VER-python-arm64.dylib)
if echo "${OTOOL_L}" | grep -q loader_path
then
echo "libpygeodiff-$GEODIFF_VER-python-arm64.dylib was not patched correctly, maybe sqlite version changed??"
exit 1
fi

- uses: actions/upload-artifact@v4
with:
name: artifact-pygeodiff-macos
path: ./pygeodiff-binaries/*.dylib

create_mergin_plugin_package:
needs: [build_windows_binaries, build_linux_binary, build_macos_binary]
create_plugin_package:
needs: [build_windows_binaries, build_linux_binary, build_macos_binaries]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -189,13 +207,13 @@ jobs:

- uses: actions/upload-artifact@v4
with:
name: Mergin b${{ env.BUILD_NUM }}
name: MM Plugin d-${{ env.BUILD_NUM }}
path: output/

- name: upload asset on tagged release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: mergin.zip
files: MM Plugin r-${{ env.BUILD_NUM }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 4 additions & 2 deletions Mergin/metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ name=Mergin
qgisMinimumVersion=3.22
qgisMaximumVersion=4.99
description=Handle Mergin Maps projects
version=2026.1.0
version=2026.1.1
author=Lutra Consulting
email=info@merginmaps.com
about=Mergin Maps is a repository for storing and tracking changes to QGIS projects/data and has its mobile app for field geo-surveys. With this plugin, users can upload and sync their data to Mergin Maps service.
; end of mandatory metadata

; start of optional metadata
changelog=2026.1.0
changelog=2026.1.1
- Fix support for macbooks with M chips (arm64)
<p>2026.1.0
- Integration of improved push mechanism
- Added restart of sync process
- Preventing trailing whitespace in project creation and photo name path
Expand Down
Loading