-
-
Notifications
You must be signed in to change notification settings - Fork 434
176 lines (160 loc) · 5.32 KB
/
Copy pathosgeo4w.yml
File metadata and controls
176 lines (160 loc) · 5.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
---
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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2.32.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@1e711832882e03603e9013181a87885b10af8a98 # v0.3.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\grass86.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
# Obfuscated usage of GitHub Actions features, Windows CMD shell limits analysis
shell: cmd /D /E:ON /V:OFF /S /C "CALL C:/OSGeo4W/OSGeo4W.bat "{0}"" # zizmor: ignore[misfeature]
- 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"
# Obfuscated usage of GitHub Actions features, Windows CMD shell limits analysis
shell: cmd /D /E:ON /V:OFF /S /C "CALL C:/OSGeo4W/OSGeo4W.bat "{0}"" # zizmor: ignore[misfeature]
- 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
# Obfuscated usage of GitHub Actions features, Windows CMD shell limits analysis
shell: cmd /D /E:ON /V:OFF /S /C "CALL C:/OSGeo4W/OSGeo4W.bat "{0}"" # zizmor: ignore[misfeature]
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.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\grass86.bat' '%O4WROOT%\bin\python3'
env:
O4WROOT: ${{ steps.osgeo4w.outputs.root }}
- name: Make HTML test report available
if: ${{ always() }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: testreport-${{ matrix.os }}
path: testreport
retention-days: 3