Skip to content

Add Grid bindings and GridCreate go function #306

Add Grid bindings and GridCreate go function

Add Grid bindings and GridCreate go function #306

Workflow file for this run

name: build
on:
push:
branches:
- main
pull_request:
jobs:
ubuntu2004:
runs-on: ubuntu-20.04
env:
GODEBUG: cgocheck=2
strategy:
matrix:
go: [ '1.19', '1.20' ]
name: Go ${{ matrix.go }} + GDAL on ubuntu 20.04 test
steps:
- name: APT
run: sudo apt-get update && sudo apt-get install gcc g++ libgeos-c1v5 libproj15 libsqlite3-0 pkg-config libjpeg-turbo8 libgdal-dev
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: Coverage Tests
run: go test . -race
install-gdal:
runs-on: ubuntu-20.04
strategy:
matrix:
gdal: [ 'release/3.4', 'release/3.5', 'release/3.6', 'master' ]
steps:
- name: optgdal
run: sudo mkdir /optgdal && sudo chown -R $USER /optgdal
- name: Checkout
uses: actions/checkout@v3
- name: cache gdal lib
id: cache-gdal
uses: actions/cache@v3
with:
path: /optgdal
key: ${{ runner.os }}-install-gdal-${{ matrix.gdal }}-${{ hashFiles('.github/workflows/build-gdal.sh') }}
- name: Build GDAL
if: steps.cache-gdal.outputs.cache-hit != 'true'
run: sudo .github/workflows/build-gdal.sh ${{ matrix.gdal }}
test:
needs: install-gdal
runs-on: ubuntu-20.04
env:
GODEBUG: cgocheck=2
strategy:
matrix:
go: [ '1.19', '1.20' ]
gdal: [ 'release/3.4', 'release/3.5', 'release/3.6', 'master' ]
name: Go ${{ matrix.go }} + GDAL ${{ matrix.gdal }} test
steps:
- name: APT
run: sudo apt-get update && sudo apt-get install gcc g++ libgeos-c1v5 libproj15 libsqlite3-0 pkg-config libjpeg-turbo8
- name: optgdal
run: sudo mkdir /optgdal && sudo chown -R $USER /optgdal
- name: Checkout
uses: actions/checkout@v3
- name: cache gdal lib
id: cache-gdal
uses: actions/cache@v3
with:
path: /optgdal
key: ${{ runner.os }}-install-gdal-${{ matrix.gdal }}-${{ hashFiles('.github/workflows/build-gdal.sh') }}
- name: Check GDAL
if: steps.cache-gdal.outputs.cache-hit != 'true'
uses: actions/github-script@v3
with:
script: |
core.setFailed('gdal installation not recovered from cache')
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: ldconfig
run: sudo ldconfig /optgdal/lib
- name: store gcp service-account to file
shell: bash
env:
GCP_SA: ${{ secrets.GCP_SA_KEY }}
run: |
echo "$GCP_SA" | base64 -d > gcp-keyfile.json
- name: Coverage Tests
run: go test . -cover -race -coverprofile=profile.cov
env:
PKG_CONFIG_PATH: /optgdal/lib/pkgconfig/
- name: Send coverage
if: ${{ matrix.go == '1.20' && matrix.gdal == 'master' }}
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov
- name: golangci-lint
if: ${{ matrix.go == '1.20' && matrix.gdal == 'master' }}
uses: reviewdog/action-golangci-lint@v1
env:
PKG_CONFIG_PATH: /optgdal/lib/pkgconfig/
with:
golangci_lint_flags: "--timeout=5m --skip-files=doc_test.go"
level: error
fail_on_error: true