From a10c4ae454c7552f7e40ad6a208f13f6e1745502 Mon Sep 17 00:00:00 2001 From: Alex38Lyon <55714436+Alex38Lyon@users.noreply.github.com> Date: Fri, 28 Aug 2026 14:23:06 +0200 Subject: [PATCH] Update workflow to install GDAL and change Python version Updated Python version and added GDAL installation steps. Modified dependency checks for GDAL and OGR. --- .github/workflows/pyThtoQgis.yml | 40 ++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pyThtoQgis.yml b/.github/workflows/pyThtoQgis.yml index 5028df8..04329b6 100644 --- a/.github/workflows/pyThtoQgis.yml +++ b/.github/workflows/pyThtoQgis.yml @@ -28,26 +28,52 @@ jobs: - name: Setup Python uses: actions/setup-python@v7 with: - python-version: '3.13' + python-version: '3.12' # ------------------------------------------------------------ - # Installation des dépendances Python + # Installation de GDAL au niveau système + # ------------------------------------------------------------ + - name: Install GDAL system packages + run: | + sudo apt-get update + sudo apt-get install -y \ + gdal-bin \ + libgdal-dev + + # ------------------------------------------------------------ + # Vérification de GDAL + # ------------------------------------------------------------ + - name: Check GDAL + run: | + echo "Version GDAL système :" + gdal-config --version + + echo "Chemin gdal-config :" + which gdal-config + + # ------------------------------------------------------------ + # Installation des bibliothèques Python # ------------------------------------------------------------ - name: Install Python dependencies run: | python -m pip install --upgrade pip + pip install numpy - pip install gdal pip install alive-progress + # Installer exactement la version correspondant + # à la bibliothèque GDAL système + pip install "gdal[numpy]==$(gdal-config --version).*" + # ------------------------------------------------------------ - # Vérification de l'installation + # Vérification des bindings Python GDAL/OGR # ------------------------------------------------------------ - name: Test Python dependencies run: | python -c "import numpy; print('NumPy:', numpy.__version__)" - python -c "from osgeo import ogr, gdal; print('GDAL:', gdal.__version__)" - python -c "import alive_progress; print('alive-progress:', alive_progress.__version__)" + python -c "from osgeo import gdal; print('GDAL Python:', gdal.__version__)" + python -c "from osgeo import ogr; print('OGR OK')" + python -c "from alive_progress import alive_bar; print('alive-progress OK')" # ------------------------------------------------------------ # Exécution de pyThtoQgis @@ -58,7 +84,7 @@ jobs: python pyThtoQgis.py --folder "../../Outputs/SHP/" # ------------------------------------------------------------ - # Enregistrement des résultats + # Enregistrement des résultats dans Git # ------------------------------------------------------------ - name: Commit generated files uses: stefanzweifel/git-auto-commit-action@v7