Skip to content

add the QGIS libraries for QGIS version 3.36.3 (macOS) #62

add the QGIS libraries for QGIS version 3.36.3 (macOS)

add the QGIS libraries for QGIS version 3.36.3 (macOS) #62

name: Build the QGIS plugin (Windows)
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-windows:
runs-on: windows-latest
env:
OSGEO4W_ROOT: "D:/OSGeo4W"
Qt5_DIR: "D:/OSGeo4W/apps/Qt5"
steps:
- uses: actions/checkout@v4
- run: mkdir $env:OSGEO4W_ROOT | out-null
- name: Install OSGeo4W
run: |
$exe = 'osgeo4w-setup.exe'
$url = 'http://download.osgeo.org/osgeo4w/v2/' + $exe
(New-Object System.Net.WebClient).DownloadFile($url, $exe)
Start-Process ('.\'+$exe) -ArgumentList '--advanced --autoaccept --quiet-mode --only-site -s http://download.osgeo.org/osgeo4w/v2/ -P qgis,qgis-deps,qgis-common,qgis-devel,qt5-devel,qt5-libs,qt5-tools,qt5-libs-symbols' -Wait -NoNewWindow
- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Add Directories to PATH
run: |
Add-Content $env:GITHUB_PATH $env:OSGEO4W_ROOT/bin
Add-Content $env:GITHUB_PATH $env:Qt5_DIR/bin
- name: Configure CMake
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-S ${{ github.workspace }}
- name: Build
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config Release
- uses: actions/upload-artifact@v3
with:
name: qgis-plugin-windows
path: ${{ steps.strings.outputs.build-output-dir }}/**/helloworldplugin.dll