Update dependencies #481
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: main | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
tags: | |
- v* | |
env: | |
GOTOOLCHAIN: local | |
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@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed | |
with: | |
go-version: ${{ matrix.go-version }} | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a | |
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@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed | |
with: | |
go-version: stable | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 | |
with: | |
version: v1.60.3 | |
geos-versions: | |
strategy: | |
fail-fast: false | |
matrix: | |
geos-version: | |
- 3.10.2 # Used in Ubuntu 22.04 LTS | |
- 3.10.6 # Latest 3.10.x | |
- 3.11.4 # Latest 3.11.x | |
- 3.12.1 # Used in Ubuntu 24.04 LTS | |
- 3.12.2 # Latest 3.12.x | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a | |
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@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed | |
with: | |
go-version: stable | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: test | |
run: | | |
sudo ldconfig | |
go test ./... |