checks: Update pre-commit config and tools versions #17839
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: OSGeo4W | |
on: | |
push: | |
branches: | |
- main | |
- releasebranch_* | |
pull_request: | |
permissions: {} | |
jobs: | |
build: | |
name: ${{ matrix.os }} build and tests | |
concurrency: | |
group: >- | |
${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}-${{ | |
matrix.os }} | |
cancel-in-progress: true | |
runs-on: ${{ matrix.os }} | |
env: | |
PYTHONWARNINGS: always | |
strategy: | |
matrix: | |
os: | |
- windows-2022 | |
fail-fast: false | |
steps: | |
- name: Set git to use LF | |
run: | | |
git config --global core.autocrlf false | |
git config --global core.eol lf | |
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
with: | |
persist-credentials: false | |
- uses: msys2/setup-msys2@fb197b72ce45fb24f17bf3f807a388985654d1f2 # v2.29.0 | |
id: msys2 | |
with: | |
path-type: inherit | |
location: D:\ | |
update: true | |
msystem: MINGW64 | |
install: >- | |
bison | |
diffutils | |
dos2unix | |
flex | |
git | |
libintl | |
make | |
tar | |
zip | |
pacboy: >- | |
bzip2 | |
ccache | |
fftw | |
gcc | |
gettext | |
libiconv | |
libsystre | |
libtre | |
libwinpthread-git | |
openblas | |
pcre | |
pkgconf | |
toolchain | |
zlib | |
- name: Setup OSGeo4W environment | |
uses: echoix/setup-OSGeo4W@f4311523e39f2c8b10e34ebbc3f2ff437ecfb9ed # v0.2.0 | |
id: osgeo4w | |
with: | |
package-dir: "D:/OSGeo4W_pkg" | |
packages: | | |
cairo-devel | |
freetype-devel | |
gdal-devel | |
geos-devel | |
libjpeg-turbo-devel | |
liblas-devel | |
libpng-devel | |
libpq-devel | |
libtiff-devel | |
netcdf-devel | |
proj-devel | |
python3-core | |
python3-jupyter | |
python3-matplotlib | |
python3-numpy | |
python3-pip | |
python3-pywin32 | |
python3-wxpython | |
sqlite3-devel | |
zstd-devel | |
- name: Set number of cores for compilation | |
run: | | |
echo "MAKEFLAGS=-j$(nproc)" >> "${GITHUB_ENV}" | |
shell: msys2 {0} | |
- name: Compile GRASS | |
shell: msys2 {0} | |
run: | | |
.github/workflows/build_osgeo4w.sh | |
env: | |
MSYS2_LOCATION: ${{ steps.msys2.outputs.msys2-location }} | |
- name: Print installed versions | |
if: always() | |
shell: msys2 {0} | |
run: .github/workflows/print_versions.sh | |
- name: Test executing of the grass command | |
run: .github/workflows/test_simple.bat '%O4WROOT%\opt\grass\grass85.bat' | |
env: | |
O4WROOT: ${{ steps.osgeo4w.outputs.root }} | |
- name: Test executing of the grass command in bash | |
shell: msys2 {0} | |
run: .github/workflows/test_simple.sh | |
- name: Install additional python packages | |
run: | | |
python -m pip install ^ | |
pytest ^ | |
pytest-timeout | |
shell: cmd /D /E:ON /V:OFF /S /C "CALL C:/OSGeo4W/OSGeo4W.bat "{0}"" | |
- name: Run pytest with a single worker | |
run: | | |
call %OSGEO4W_ROOT%\opt\grass\etc\env.bat | |
set PYTHONPATH=%GISBASE%\etc\python;%PYTHONPATH% | |
path %GISBASE%\lib;%GISBASE%\bin;%PATH% | |
pytest ^ | |
@.github/workflows/pytest_args_ci.txt ^ | |
--junitxml=pytest.junit.xml ^ | |
-k "not testsuite" | |
shell: cmd /D /E:ON /V:OFF /S /C "CALL C:/OSGeo4W/OSGeo4W.bat "{0}"" | |
- name: Run pytest with a single worker (for gunittest-based tests) | |
run: | | |
call %OSGEO4W_ROOT%\opt\grass\etc\env.bat | |
set PYTHONPATH=%GISBASE%\etc\python;%PYTHONPATH% | |
path %GISBASE%\lib;%GISBASE%\bin;%PATH%;%OSGEO4W_ROOT%\opt\grass | |
pytest ^ | |
@.github/workflows/pytest_args_ci.txt ^ | |
@.github/workflows/pytest_args_deselect.txt ^ | |
@.github/workflows/pytest_args_gunittest.txt ^ | |
--junitxml=pytest.gunittest.junit.xml | |
shell: cmd /D /E:ON /V:OFF /S /C "CALL C:/OSGeo4W/OSGeo4W.bat "{0}"" | |
- name: Upload test results to Codecov | |
if: ${{ !cancelled() }} | |
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1 | |
with: | |
exclude: gui | |
flags: ${{ matrix.os }}-pytest-python | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Run tests | |
run: .github/workflows/test_thorough.bat '%O4WROOT%\opt\grass\grass85.bat' '%O4WROOT%\bin\python3' | |
env: | |
O4WROOT: ${{ steps.osgeo4w.outputs.root }} | |
- name: Make HTML test report available | |
if: ${{ always() }} | |
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
with: | |
name: testreport-${{ matrix.os }} | |
path: testreport | |
retention-days: 3 |