forked from twpayne/go-geos
-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (86 loc) · 2.55 KB
/
Copy pathmain.yml
File metadata and controls
86 lines (86 loc) · 2.55 KB
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
name: main
on:
pull_request:
push:
branches:
- master
tags:
- v*
env:
GOTOOLCHAIN: local
jobs:
main:
runs-on: ubuntu-22.04
steps:
- name: install-dependencies
run: |
sudo apt-get install -y libgeos-dev
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version: stable
- name: generate
run: |
go generate ./...
git diff --exit-code
- name: build
run: go build ./...
- name: test
run: go test -race ./...
- name: test-examples
run: ( cd examples && go test -race ./... )
lint:
runs-on: ubuntu-22.04
steps:
- name: install-dependencies
run: |
sudo apt-get install -y libgeos-dev
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version: stable
- uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
with:
version: v2.8.0
geos-versions:
strategy:
fail-fast: false
matrix:
geos-version:
- 3.10.2 # Used in Ubuntu 22.04 LTS
- 3.10.7 # Latest 3.10.x
- 3.11.5 # Latest 3.11.x
- 3.12.1 # Used in Ubuntu 24.04 LTS
- 3.12.3 # Latest 3.12.x
- 3.13.1 # Latest 3.13.x
- 3.14.1 # Latest
runs-on: ubuntu-22.04
steps:
- uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
id: cache-geos
with:
path: ~/work/geos-${{ matrix.geos-version }}
key: ${{ runner.os }}-geos-${{ matrix.geos-version }}
- name: build-geos
if: ${{ steps.cache-geos.outputs.cache-hit != 'true' }}
run: |
cd ~/work
curl https://download.osgeo.org/geos/geos-${{ matrix.geos-version }}.tar.bz2 | tar xjf -
cd geos-${{ matrix.geos-version }}
mkdir _build
cd _build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ..
make -j4
ctest
- name: install-geos
run: |
cd ~/work/geos-${{ matrix.geos-version }}/_build
sudo make install
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version: stable
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: test
run: |
sudo ldconfig
go test ./...