Skip to content

Commit

Permalink
CI: introduce setup-msys2@v2 setup action (#2508)
Browse files Browse the repository at this point in the history
Thanks @nilason, @neteler and @hellik for your feedback. It has indeed been a build env issue.
Will create a follow up PR for backporting...

* use msys2-setup

* specify location

* get OSGeo4W includes for cairo

* try to deactivate fontconfig

* remove msys2 cairo

* link osgeo4w cairo

* link osgeo4w cairo libs

* no fontconfig
  • Loading branch information
ninsbl committed Aug 4, 2022
1 parent c0a83a3 commit 53b69fb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/osgeo4w.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ jobs:
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v2
- uses: msys2/setup-msys2@v2
with:
path-type: inherit
location: D:\
update: true
install: tar libintl make bison flex diffutils git dos2unix zip mingw-w64-x86_64-toolchain mingw-w64-x86_64-fftw mingw-w64-x86_64-lapack mingw-w64-x86_64-pkgconf mingw-w64-x86_64-gcc mingw-w64-x86_64-ccache mingw-w64-x86_64-zlib mingw-w64-x86_64-libiconv mingw-w64-x86_64-bzip2 mingw-w64-x86_64-gettext mingw-w64-x86_64-libsystre mingw-w64-x86_64-libtre-git mingw-w64-x86_64-libwinpthread-git mingw-w64-x86_64-libpng mingw-w64-x86_64-pcre mingw-w64-x86_64-python3-six

- name: Install OSGeo4W
run: |
Expand All @@ -35,17 +41,14 @@ jobs:
(New-Object System.Net.WebClient).DownloadFile($url, $exe)
Start-Process ('.\'+$exe) -ArgumentList '-A -g -k -q -s http://download.osgeo.org/osgeo4w/v2/ -P proj-devel,gdal-devel,geos-devel,libtiff-devel,libpng-devel,pdal-devel,netcdf-devel,cairo-devel,fftw,freetype-devel,gdal-ecw,gdal-mrsid,liblas-devel,libxdr,libpq-devel,pdcurses,python3-matplotlib,python3-numpy,python3-ply,python3-pywin32,python3-six,python3-wxpython,regex-devel,wxwidgets-devel,zstd-devel' -Wait
- name: Install MSYS2 packages
run: C:\msys64\usr\bin\pacman.exe --noconfirm -S tar libintl make bison flex diffutils git dos2unix zip mingw-w64-x86_64-toolchain mingw-w64-x86_64-cairo mingw-w64-x86_64-fftw mingw-w64-x86_64-lapack mingw-w64-x86_64-pkg-config mingw-w64-x86_64-gcc mingw-w64-x86_64-ccache mingw-w64-x86_64-zlib mingw-w64-x86_64-libiconv mingw-w64-x86_64-bzip2 mingw-w64-x86_64-gettext mingw-w64-x86_64-libsystre mingw-w64-x86_64-libtre-git mingw-w64-x86_64-libwinpthread-git mingw-w64-x86_64-libpng mingw-w64-x86_64-pcre mingw-w64-x86_64-python3-six

- name: Compile GRASS GIS
run: C:\msys64\usr\bin\bash.exe -l (''+(Get-Location)+'\.github\workflows\build_osgeo4w.sh') (Get-Location)
run: D:\msys64\usr\bin\bash.exe -l (''+(Get-Location)+'\.github\workflows\build_osgeo4w.sh') (Get-Location)

- name: Test executing of the grass command
run: .github/workflows/test_simple.bat 'C:\OSGeo4W\opt\grass\grass83.bat'

- name: Test executing of the grass command in bash
run: C:\msys64\usr\bin\bash.exe .github/workflows/test_simple.sh
run: D:\msys64\usr\bin\bash.exe .github/workflows/test_simple.sh

- name: Run tests
run: .github/workflows/test_thorough.bat 'C:\OSGeo4W\opt\grass\grass83.bat' 'C:\OSGeo4W\bin\python3'
7 changes: 4 additions & 3 deletions mswindows/osgeo4w/build_osgeo4w.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export ARCH=x86_64-w64-mingw32
--with-blas \
--with-lapack-includes=/mingw64/include/lapack \
--with-freetype \
--with-freetype-includes=/mingw64/include/freetype2 \
--with-freetype-includes=${OSGEO4W_ROOT_MSYS}/include/freetype2 \
--with-proj-share=${OSGEO4W_ROOT_MSYS}/share/proj \
--with-proj-includes=${OSGEO4W_ROOT_MSYS}/include \
--with-proj-libs=${OSGEO4W_ROOT_MSYS}/lib \
Expand All @@ -66,8 +66,9 @@ export ARCH=x86_64-w64-mingw32
--with-zstd \
--with-odbc \
--with-cairo \
--with-cairo-includes=${SRC}/include \
--with-cairo-ldflags="-L${SRC}/mswindows/osgeo4w/lib -lcairo -lfontconfig" \
--with-cairo-includes=${OSGEO4W_ROOT_MSYS}/include \
--with-cairo-libs=$OSGEO4W_ROOT_MSYS/lib \
--with-cairo-ldflags="-L${SRC}/mswindows/osgeo4w/lib -lcairo" \
--with-opengl=windows \
--with-bzlib \
--with-liblas=${SRC}/mswindows/osgeo4w/liblas-config \
Expand Down

0 comments on commit 53b69fb

Please sign in to comment.