Rename UnifiedModelSetup to UnifiedCalibrator and add ET output support #14
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: build | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macOS-latest] | |
| python-version: ["3.10", "3.11", "3.12"] | |
| exclude: | |
| # Skip some combinations to reduce CI time | |
| - os: windows-latest | |
| python-version: "3.10" | |
| - os: macOS-latest | |
| python-version: "3.10" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - name: Setup Python and create virtual environment | |
| run: | | |
| uv python install ${{ matrix.python-version }} | |
| uv venv | |
| - name: Install GDAL (Ubuntu only) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| uv pip install --no-cache-dir Cython | |
| uv pip install --find-links=https://girder.github.io/large_image_wheels --no-cache GDAL | |
| - name: Test GDAL installation (Ubuntu only) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| uv run python -c "from osgeo import gdal" | |
| uv run gdalinfo --version | |
| # 在 jobs.<job_id>.steps 中加入这两步之一(二者一起放且带 if 条件) | |
| - name: Clean old uv cache and env (Windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| Write-Host "🧹 Cleaning old uv cache and virtual environments (Windows)..." | |
| try { | |
| uv cache clean | |
| } catch { | |
| Write-Host "uv cache clean failed or not available - continuing..." | |
| } | |
| # remove .venv directory if exists | |
| Remove-Item -LiteralPath .venv -Recurse -Force -ErrorAction SilentlyContinue | |
| # remove uv.lock if exists | |
| Remove-Item -LiteralPath uv.lock -Force -ErrorAction SilentlyContinue | |
| - name: Clean old uv cache and env (Linux/macOS) | |
| if: runner.os != 'Windows' | |
| shell: bash | |
| run: | | |
| echo "🧹 Cleaning old uv cache and virtual environments (Unix)..." | |
| uv cache clean || true | |
| rm -rf .venv || true | |
| rm -f uv.lock || true | |
| - name: Install dependencies | |
| run: | | |
| uv sync --all-extras | |
| - name: Create hydro_setting.yml (Ubuntu) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| echo 'local_data_path:' > hydro_setting.yml | |
| echo ' datasets-origin: /home/runner/.cache/' >> hydro_setting.yml | |
| sudo cp hydro_setting.yml /home/runner/hydro_setting.yml | |
| - name: Create hydro_setting.yml (macOS) | |
| if: matrix.os == 'macOS-latest' | |
| run: | | |
| echo 'local_data_path:' > hydro_setting.yml | |
| echo ' datasets-origin: /Users/runner/.cache/' >> hydro_setting.yml | |
| sudo cp hydro_setting.yml /Users/runner/hydro_setting.yml | |
| - name: Create hydro_setting.yml (Windows) | |
| if: matrix.os == 'windows-latest' | |
| run: | | |
| echo 'local_data_path:' > hydro_setting.yml | |
| echo ' datasets-origin: C:\Users\runneradmin\.cache\' >> hydro_setting.yml | |
| copy hydro_setting.yml C:\Users\runneradmin\hydro_setting.yml |