@@ -57,16 +57,26 @@ jobs:
57
57
working-directory : flooding/Sentinel2_Water_Extraction
58
58
59
59
test-poetry :
60
- name : Test using Poetry on Python ${{ matrix.python }}
61
- runs-on : ubuntu-22.04
60
+ name :
61
+ Test on ${{ matrix.runner }}, using Poetry with Python ${{ matrix.python
62
+ }}
63
+ runs-on : ${{ matrix.runner }}
62
64
strategy :
63
65
fail-fast : false
64
66
matrix :
67
+ runner :
68
+ - macos-12
69
+ - ubuntu-22.04
65
70
python :
66
71
- " 3.8"
67
72
- " 3.9"
68
73
- " 3.10"
69
74
- " 3.11"
75
+ include :
76
+ - runner : macos-12
77
+ pip-cache-dir : ~/Library/Caches/pip
78
+ - runner : ubuntu-22.04
79
+ pip-cache-dir : ~/.cache/pip
70
80
steps :
71
81
- name : Check out repository
72
82
uses : actions/checkout@v3.3.0
@@ -79,19 +89,25 @@ jobs:
79
89
- name : Cache pip
80
90
uses : actions/cache@v3.2.3
81
91
with :
82
- path : ~/.cache/ pip
92
+ path : ${{ matrix. pip-cache-dir }}
83
93
key :
84
94
${{ runner.os }}-pip-${{ secrets.CACHE_SEED }}-${{ matrix.python
85
95
}}-${{
86
96
hashFiles('./flooding/Sentinel2_Water_Extraction/poetry.lock') }}
87
97
restore-keys : |
88
98
${{ runner.os }}-pip-${{ secrets.CACHE_SEED }}-${{ matrix.python }}-
89
99
90
- - name : Update package registry
100
+ - name : Update package registry on Linux
91
101
run : sudo apt-get update
102
+ if : startsWith(runner.os, 'Linux')
92
103
93
- - name : Install GDAL
104
+ - name : Install GDAL on Linux
94
105
run : sudo apt-get --assume-yes install libgdal-dev
106
+ if : startsWith(runner.os, 'Linux')
107
+
108
+ - name : Install GDAL on MacOS
109
+ run : brew install gdal
110
+ if : startsWith(runner.os, 'macOS')
95
111
96
112
- name : Upgrade pip
97
113
run : pip install --upgrade pip
0 commit comments