From d02c2292d3cb61d57b9dfe8f959a3706fc35efac Mon Sep 17 00:00:00 2001 From: Thomas Bonfort Date: Mon, 11 Sep 2023 16:01:01 +0200 Subject: [PATCH] update CI env versions (#112) --- .github/workflows/osx.yml | 4 ++-- .github/workflows/ubuntu.yml | 35 +++++++++++++++++------------------ 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.github/workflows/osx.yml b/.github/workflows/osx.yml index 866f807..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 @@ -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..91fec0c 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 + GOEXPERIMENT: cgocheck2 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.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 @@ -41,23 +42,21 @@ 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: 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 + runs-on: ubuntu-22.04 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 @@ -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 @@ -91,12 +90,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/