From 628798feb0355f53416a4ab305775764cba2ec5b Mon Sep 17 00:00:00 2001 From: Thomas Bonfort Date: Mon, 11 Sep 2023 15:12:48 +0200 Subject: [PATCH 1/7] update CI env versions --- .github/workflows/osx.yml | 2 +- .github/workflows/ubuntu.yml | 27 ++++++++++++++------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/osx.yml b/.github/workflows/osx.yml index 866f807..5f778bd 100644 --- a/.github/workflows/osx.yml +++ b/.github/workflows/osx.yml @@ -20,6 +20,6 @@ jobs: - name: Setup Go uses: actions/setup-go@v2 with: - go-version: 1.19 + go-version: 1.21 - name: Tests run: go test . -race diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 844ed64..e7b0a4c 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -7,17 +7,18 @@ on: pull_request: jobs: - ubuntu2004: - runs-on: ubuntu-20.04 + ubuntu: + runs-on: ${{ matrix.os }} env: GODEBUG: cgocheck=2 strategy: matrix: - go: [ '1.19', '1.20' ] - name: Go ${{ matrix.go }} + GDAL on ubuntu 20.04 test + os: [ 'ubuntu-20.04', 'ubuntu-22.04' ] + go: [ '1.20', '1.21' ] + name: Go ${{ matrix.go }} + GDAL on ${{ matrix.os }} 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 + run: sudo apt-get update && sudo apt-get install gcc g++ pkg-config libgdal-dev - name: Checkout uses: actions/checkout@v3 - name: Setup Go @@ -27,10 +28,10 @@ jobs: - name: Coverage Tests run: go test . -race install-gdal: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: matrix: - gdal: [ 'release/3.4', 'release/3.5', 'release/3.6', 'master' ] + gdal: [ 'release/3.5', 'release/3.6', 'release/3.7', 'master' ] steps: - name: optgdal run: sudo mkdir /optgdal && sudo chown -R $USER /optgdal @@ -47,17 +48,17 @@ jobs: run: sudo .github/workflows/build-gdal.sh ${{ matrix.gdal }} test: needs: install-gdal - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 env: GODEBUG: cgocheck=2 strategy: matrix: - go: [ '1.19', '1.20' ] - gdal: [ 'release/3.4', 'release/3.5', 'release/3.6', 'master' ] + go: [ '1.20', '1.21' ] + gdal: [ 'release/3.5', 'release/3.6', 'release/3.7', '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 + run: sudo apt-get update && sudo apt-get install gcc g++ '^libgeos-c1v[0-9]$' '^libproj[0-9]{2}$' '^libsqlite3-[0-9]$' pkg-config libjpeg-turbo8 - name: optgdal run: sudo mkdir /optgdal && sudo chown -R $USER /optgdal - name: Checkout @@ -91,12 +92,12 @@ jobs: env: PKG_CONFIG_PATH: /optgdal/lib/pkgconfig/ - name: Send coverage - if: ${{ matrix.go == '1.20' && matrix.gdal == 'master' }} + if: ${{ matrix.go == '1.21' && 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' }} + if: ${{ matrix.go == '1.21' && matrix.gdal == 'master' }} uses: reviewdog/action-golangci-lint@v1 env: PKG_CONFIG_PATH: /optgdal/lib/pkgconfig/ From 6588b52a63edee9af8ea2935a6fd3ea6d7f2a7a6 Mon Sep 17 00:00:00 2001 From: Thomas Bonfort Date: Mon, 11 Sep 2023 15:22:19 +0200 Subject: [PATCH 2/7] cgocheck --- .github/workflows/ubuntu.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index e7b0a4c..3dd8c21 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -10,7 +10,7 @@ jobs: ubuntu: runs-on: ${{ matrix.os }} env: - GODEBUG: cgocheck=2 + GOEXPERIMENT: cgocheck2 strategy: matrix: os: [ 'ubuntu-20.04', 'ubuntu-22.04' ] @@ -50,7 +50,7 @@ jobs: needs: install-gdal runs-on: ubuntu-22.04 env: - GODEBUG: cgocheck=2 + GOEXPERIMENT: cgocheck2 strategy: matrix: go: [ '1.20', '1.21' ] From 751df36f97fa1e150f7dff7ae55eab12d47531b8 Mon Sep 17 00:00:00 2001 From: Thomas Bonfort Date: Mon, 11 Sep 2023 15:28:21 +0200 Subject: [PATCH 3/7] cgocheck only on ubuntu+go1.21 --- .github/workflows/ubuntu.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 3dd8c21..cafca06 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -9,12 +9,10 @@ on: jobs: ubuntu: runs-on: ${{ matrix.os }} - env: - GOEXPERIMENT: cgocheck2 strategy: matrix: os: [ 'ubuntu-20.04', 'ubuntu-22.04' ] - go: [ '1.20', '1.21' ] + go: [ '1.21' ] name: Go ${{ matrix.go }} + GDAL on ${{ matrix.os }} test steps: - name: APT @@ -49,8 +47,6 @@ jobs: test: needs: install-gdal runs-on: ubuntu-22.04 - env: - GOEXPERIMENT: cgocheck2 strategy: matrix: go: [ '1.20', '1.21' ] From b599db96f600f12f550a3067576c76d07bf7890e Mon Sep 17 00:00:00 2001 From: Thomas Bonfort Date: Mon, 11 Sep 2023 15:29:14 +0200 Subject: [PATCH 4/7] cgocheck only on ubuntu+go1.21 --- .github/workflows/ubuntu.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index cafca06..7222692 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -9,6 +9,8 @@ on: jobs: ubuntu: runs-on: ${{ matrix.os }} + env: + GOEXPERIMENT: cgocheck2 strategy: matrix: os: [ 'ubuntu-20.04', 'ubuntu-22.04' ] From 963d66762999a035e3cf00224ebd60d006e48e06 Mon Sep 17 00:00:00 2001 From: Thomas Bonfort Date: Mon, 11 Sep 2023 15:35:29 +0200 Subject: [PATCH 5/7] os cache key --- .github/workflows/ubuntu.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 7222692..cc03a94 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -28,9 +28,10 @@ jobs: - name: Coverage Tests run: go test . -race install-gdal: - runs-on: ubuntu-22.04 + runs-on: $${{ matrix.os }} strategy: matrix: + os: [ 'ubuntu-20.04', 'ubuntu-22.04' ] gdal: [ 'release/3.5', 'release/3.6', 'release/3.7', 'master' ] steps: - name: optgdal @@ -42,7 +43,7 @@ jobs: uses: actions/cache@v3 with: path: /optgdal - key: ${{ runner.os }}-install-gdal-${{ matrix.gdal }}-${{ hashFiles('.github/workflows/build-gdal.sh') }} + key: ${{ matrix.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 }} From 931208f496c65192e93888ec12261879bc9a3cd2 Mon Sep 17 00:00:00 2001 From: Thomas Bonfort Date: Mon, 11 Sep 2023 15:37:10 +0200 Subject: [PATCH 6/7] os cache key --- .github/workflows/ubuntu.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index cc03a94..91fec0c 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -28,10 +28,9 @@ jobs: - name: Coverage Tests run: go test . -race install-gdal: - runs-on: $${{ matrix.os }} + runs-on: ubuntu-22.04 strategy: matrix: - os: [ 'ubuntu-20.04', 'ubuntu-22.04' ] gdal: [ 'release/3.5', 'release/3.6', 'release/3.7', 'master' ] steps: - name: optgdal @@ -43,7 +42,7 @@ jobs: uses: actions/cache@v3 with: path: /optgdal - key: ${{ matrix.os }}-install-gdal-${{ matrix.gdal }}-${{ hashFiles('.github/workflows/build-gdal.sh') }} + key: ubuntu-22.04-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 }} @@ -67,7 +66,7 @@ jobs: uses: actions/cache@v3 with: path: /optgdal - key: ${{ runner.os }}-install-gdal-${{ matrix.gdal }}-${{ hashFiles('.github/workflows/build-gdal.sh') }} + key: ubuntu-22.04-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 From 2b04f1f6633e3c26c515d62e246aa0929e2c8140 Mon Sep 17 00:00:00 2001 From: Thomas Bonfort Date: Mon, 11 Sep 2023 15:42:39 +0200 Subject: [PATCH 7/7] osx cgo --- .github/workflows/osx.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/osx.yml b/.github/workflows/osx.yml index 5f778bd..0ed2854 100644 --- a/.github/workflows/osx.yml +++ b/.github/workflows/osx.yml @@ -11,7 +11,7 @@ jobs: runs-on: macOS-latest name: macOS test env: - GODEBUG: cgocheck=2 + GOEXPERIMENT: cgocheck2 steps: - name: install gdal run: brew install pkg-config gdal proj geos