-
Notifications
You must be signed in to change notification settings - Fork 4
54 lines (44 loc) · 1.71 KB
/
build-windows.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Build the QGIS plugin (Windows)
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
qgis_version: [3_34_0, 3_36_3, 3_38_0, 3_38_3, 3_40_0]
env:
EXT_OSGEO4W_ROOT: "C:/OSGeo4W"
Qt5_DIR: "C:/OSGeo4W/apps/Qt5"
steps:
- uses: actions/checkout@v4
- run: mkdir $env:EXT_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 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:EXT_OSGEO4W_ROOT/bin
Add-Content $env:GITHUB_PATH $env:Qt5_DIR/bin
- name: Configure CMake
run: |
$Env:OSGEO4W_ROOT="${{ github.workspace }}/dependencies/qgis/windows_x86_64/${{ matrix.qgis_version }}/"
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-${{ matrix.qgis_version }}-plugin-windows
path: ${{ steps.strings.outputs.build-output-dir }}/**/helloworldplugin.dll