Skip to content

Merge pull request #113 from twpayne/no-aliasing #365

Merge pull request #113 from twpayne/no-aliasing

Merge pull request #113 from twpayne/no-aliasing #365

Workflow file for this run

name: main
on:
pull_request:
push:
branches:
- master
tags:
- v*
jobs:
main:
strategy:
fail-fast: false
matrix:
go-version:
- stable
- oldstable
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: |
sudo apt-get install -y libgeos-dev
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Generate
run: |
go generate ./...
git diff --exit-code
- name: Build
run: go build ./...
- name: Test
run: go test ./... # FIXME enable race detector
lint:
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: |
sudo apt-get install -y libgeos-dev
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version: stable
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc
with:
version: v1.54.2
geos-versions:
strategy:
fail-fast: false
matrix:
geos-version:
- 3.10.6
- 3.11.3
- 3.12.1
runs-on: ubuntu-22.04
steps:
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
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 ..
make -j4
ctest
- name: install-geos
run: |
cd ~/work/geos-${{ matrix.geos-version }}/_build
sudo make install
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version: stable
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: test
run: |
sudo ldconfig
go test ./...