-
Notifications
You must be signed in to change notification settings - Fork 46
165 lines (140 loc) · 5.04 KB
/
qgis.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
name: QGIS build
on:
push:
branches:
- master
- '[0-9]+.[0-9]+'
tags:
- '*'
pull_request:
env:
HAS_SECRETS: ${{ secrets.HAS_SECRETS }}
DOCKER_BUILDKIT: 1
MAIN_BRANCH: '2.9'
MAJOR_VERSION: '2.9'
jobs:
common:
runs-on: ubuntu-24.04
name: QGIS build
timeout-minutes: 30
if: "!startsWith(github.event.head_commit.message, '[skip ci] ')"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: make build-runner
- run: docker save --output=/tmp/tools.docker camptocamp/geomapfish
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: tools.docker
path: /tmp/tools.docker
main:
runs-on: ubuntu-24.04
name: QGIS build
timeout-minutes: 15
needs: common
strategy:
fail-fast: false
matrix:
# The versions should be set everywhere we have a == QGIS version == comment
version:
- '3.34'
# Used as default version
- 3.34-gdal3.8
- ltr
- lr
- lr-debug
- master
# == QGIS version ==
outputs:
success-3-34: ${{ steps.success.outputs.success-3-34 }}
success-3-34-gdal3-8: ${{ steps.success.outputs.success-3-34-gdal3-8 }}
success-ltr: ${{ steps.success.outputs.success-ltr }}
success-lr: ${{ steps.success.outputs.success-lr }}
success-lr-debug: ${{ steps.success.outputs.success-lr-debug }}
success-master: ${{ steps.success.outputs.success-master }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: camptocamp/initialise-gopass-summon-action@v2
with:
ci-gpg-private-key: ${{secrets.CI_GPG_PRIVATE_KEY}}
github-gopass-ci-token: ${{secrets.GOPASS_CI_GITHUB_TOKEN}}
patterns: docker
if: env.HAS_SECRETS == 'HAS_SECRETS'
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- run: python3 -m pip install --user --requirement=ci/requirements.txt
- run: scripts/get-version --auto-increment --github
id: version
if: env.HAS_SECRETS == 'HAS_SECRETS'
- name: Download artifacts (Docker images) from previous workflows
uses: actions/download-artifact@v4
- name: Load Docker images from previous workflows
run: |
docker load --input=tools.docker/tools.docker
- run: make build-test-db
- name: Build QGIS server
run: |
docker build --target=runner --build-arg=VERSION=${{ matrix.version }} \
--build-arg=GEOMAPFISH_VERSION=$(scripts/get-version --major) \
--tag=camptocamp/geomapfish-qgisserver \
docker/qgisserver;
docker tag camptocamp/geomapfish-qgisserver \
camptocamp/geomapfish-qgisserver:gmflatest-qgis${{ matrix.version }}
- name: Test library availability
run:
"! ( docker run --rm camptocamp/geomapfish-qgisserver ldd /usr/local/bin/qgis_mapserv.fcgi | grep 'not\
\ found' )"
- name: Acceptance tests
run: |
cd docker/qgisserver
docker compose up -d
docker compose exec -T tests /tests/wait-db
docker compose exec -T tests alembic --config=/tests/alembic.ini --name=main upgrade head
docker compose exec -T tests alembic --config=/tests/alembic.ini --name=static upgrade head
docker compose exec -T tests /tests/fill-db
c2cciutils-docker-logs
docker compose exec -T tests /tests/acceptance-tests
- run: c2cciutils-docker-logs
if: failure()
- run: docker compose down
- name: Publish
run: >
c2cciutils-publish
--group=qgis-${{ matrix.version }}
--docker-versions=${{ steps.version.outputs.versions }}
--snyk-version=${{ steps.version.outputs.snyk_version }}
if: >
env.HAS_SECRETS == 'HAS_SECRETS'
&& steps.version.outputs.versions != ''
- run: git diff --exit-code --patch > /tmp/dpkg-versions.patch || true
if: failure()
- uses: actions/upload-artifact@v4
with:
name: Update QGIS ${{ matrix.version }} dpkg versions list.patch
path: /tmp/dpkg-versions.patch
retention-days: 1
if: failure()
# Mark as success
- id: success
run: |
version=${{ matrix.version }}
echo "::set-output name=success-${version//\./-}::true"
success:
runs-on: ubuntu-24.04
name: QGIS build success
timeout-minutes: 15
needs: main
if: always()
# == QGIS version ==
steps:
- run: '[[ "${{ needs.main.outputs.success-3-34 }}" == "true" ]]'
- run: '[[ "${{ needs.main.outputs.success-3-34-gdal3-8 }}" == "true" ]]'
- run: '[[ "${{ needs.main.outputs.success-ltr }}" == "true" ]]'
- run: '[[ "${{ needs.main.outputs.success-lr }}" == "true" ]]'
- run: '[[ "${{ needs.main.outputs.success-lr-debug }}" == "true" ]]'
- run: '[[ "${{ needs.main.outputs.success-master }}" == "true" ]]'