Skip to content

Commit

Permalink
update test ubuntu and go versions (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbonfort authored Sep 12, 2024
1 parent ea45bb1 commit 40a5ad8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 22 deletions.
43 changes: 21 additions & 22 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,46 +12,49 @@ jobs:
env:
GOEXPERIMENT: cgocheck2
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-20.04', 'ubuntu-22.04' ]
go: [ '1.22' ]
os: [ 'ubuntu-20.04', 'ubuntu-22.04', 'ubuntu-24.04' ]
go: [ '1.23' ]
name: Go ${{ matrix.go }} + GDAL on ${{ matrix.os }} test
steps:
- name: APT
run: sudo apt-get update && sudo apt-get install gcc g++ pkg-config libgdal-dev
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Coverage Tests
run: go test . -race
install-gdal:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
gdal: [ 'release/3.6', 'release/3.7', 'release/3.8', 'release/3.9', 'master' ]
steps:
- name: optgdal
run: sudo mkdir /optgdal && sudo chown -R $USER /optgdal
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: cache gdal lib
id: cache-gdal
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: /optgdal
key: ubuntu-22.04-install-gdal-${{ matrix.gdal }}-${{ hashFiles('.github/workflows/build-gdal.sh') }}
key: ubuntu-24.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-22.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
go: [ '1.21', '1.22' ]
go: [ '1.22', '1.23' ]
gdal: [ 'release/3.6', 'release/3.7', 'release/3.8', 'release/3.9', 'master' ]
name: Go ${{ matrix.go }} + GDAL ${{ matrix.gdal }} test
steps:
Expand All @@ -60,22 +63,18 @@ jobs:
- name: optgdal
run: sudo mkdir /optgdal && sudo chown -R $USER /optgdal
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: cache gdal lib
id: cache-gdal
uses: actions/cache@v3
uses: actions/cache@v4
with:
fail-on-cache-miss: true
path: /optgdal
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
with:
script: |
core.setFailed('gdal installation not recovered from cache')
key: ubuntu-24.04-install-gdal-${{ matrix.gdal }}-${{ hashFiles('.github/workflows/build-gdal.sh') }}
- name: Setup Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
cache: false
go-version: ${{ matrix.go }}
- name: ldconfig
run: sudo ldconfig /optgdal/lib
Expand All @@ -90,12 +89,12 @@ jobs:
env:
PKG_CONFIG_PATH: /optgdal/lib/pkgconfig/
- name: Send coverage
if: ${{ matrix.go == '1.22' && matrix.gdal == 'master' }}
if: ${{ matrix.go == '1.23' && matrix.gdal == 'release/3.9' }}
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov
- name: golangci-lint
if: ${{ matrix.go == '1.22' && matrix.gdal == 'master' }}
if: ${{ matrix.go == '1.23' && matrix.gdal == 'release/3.9' }}
uses: reviewdog/action-golangci-lint@v1
env:
PKG_CONFIG_PATH: /optgdal/lib/pkgconfig/
Expand Down
4 changes: 4 additions & 0 deletions godal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1816,6 +1816,10 @@ void godalGridCreate(cctx *ctx, char *pszAlgorithm, GDALGridAlgorithm eAlgorithm
}

void *ppOptions;
//#define __STRINGIFY(TEXT) #TEXT
//#define __WARNING(TEXT) __STRINGIFY(GCC warning TEXT)
//#define WARNING(VALUE) __WARNING(__STRINGIFY(N = VALUE))
//_Pragma (WARNING(GDAL_VERSION_NUM))
#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3, 7, 0)
ret = GDALGridParseAlgorithmAndOptions(pszAlgorithm, &eAlgorithm, &ppOptions);
#else
Expand Down

0 comments on commit 40a5ad8

Please sign in to comment.