jgrss/evi #293 #452
Workflow file for this run
This file contains 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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
# Quality: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v2 | |
# - uses: actions/setup-python@v2 | |
# with: | |
# python-version: 3.8 | |
# - name: Install Python Poetry | |
# uses: abatilo/[email protected] | |
# with: | |
# poetry-version: 1.1.13 | |
# - name: Configure poetry | |
# shell: bash | |
# run: python -m poetry config virtualenvs.in-project true | |
# - name: View poetry version | |
# run: poetry --version | |
# - name: Install dependencies | |
# run: | | |
# python -m poetry install | |
# - name: Lint with flake8 | |
# run: | | |
# # stop the build if there are Python syntax errors or undefined names | |
# python -m poetry run flake8 . --exclude .venv --count --select=E9,F63,F7,F82 --show-source --statistics | |
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
# python -m poetry run flake8 . --exclude .venv --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
Tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip # caching pip dependencies based on changes to pyproject.toml | |
- name: Install GDAL binaries | |
run: | | |
# Temporary? dpkg fix: https://askubuntu.com/questions/1276111/error-upgrading-grub-efi-amd64-signed-special-device-old-ssd-does-not-exist | |
sudo rm /var/cache/debconf/config.dat | |
sudo dpkg --configure -a | |
# Install GDAL | |
sudo apt update && sudo apt upgrade -y && sudo apt install -y | |
sudo apt install software-properties-common -y | |
sudo add-apt-repository ppa:ubuntugis/ppa | |
sudo apt update -y && sudo apt install -y | |
sudo apt install libmysqlclient-dev default-libmysqlclient-dev -y | |
sudo apt install gdal-bin libgdal-dev libgl1 libspatialindex-dev g++ -y | |
export CPLUS_INCLUDE_PATH=/usr/include/gdal | |
export C_INCLUDE_PATH=/usr/include/gdal | |
export LD_LIBRARY_PATH=/usr/local/lib | |
- name: Install Python packages | |
run: | | |
# Install Python GDAL | |
pip install -U pip setuptools>=59.5.0 wheel | |
pip install numpy>=1.19.0 | |
GDAL_VERSION=$(gdal-config --version | awk -F'[.]' '{print $1"."$2"."$3}') | |
pip install GDAL==$GDAL_VERSION --no-cache-dir | |
pip install arosics --no-deps | |
- name: Install GeoWombat | |
run: | | |
# Remove compiled Cython files | |
rm -rf src/geowombat/moving/*.so | |
pip install .[stac,web,ml,coreg,stac,perf,tests] | |
if: steps.cache-gwenv.outputs.cache-hit != 'true' | |
- name: Unittests | |
run: | | |
python -m unittest | |
# Version: | |
# needs: Tests | |
# if: github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'chore(release):') | |
# runs-on: ubuntu-latest | |
# concurrency: release | |
# steps: | |
# - uses: actions/checkout@v2 | |
# with: | |
# fetch-depth: 0 | |
# token: ${{ secrets.GW_TOKEN }} | |
# - uses: actions/setup-python@v2 | |
# with: | |
# python-version: 3.8.12 | |
# - name: Python Semantic Release | |
# run: | | |
# pip install -U pip setuptools wheel | |
# pip install Cython>=0.29.* numpy>=1.19.0 | |
# python -m pip install python-semantic-release | |
# # Add credentials | |
# git config user.name "github-actions" | |
# git config user.email "[email protected]" | |
# # Bump GeoWombat version | |
# semantic-release publish | |
# env: | |
# GH_TOKEN: ${{ secrets.GW_TOKEN }} | |
# https://github.com/fnkr/github-action-ghr | |
# Release: | |
# needs: Version | |
# if: github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'chore(release):') | |
# name: Upload release | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v2 | |
# - uses: actions/setup-python@v2 | |
# with: | |
# python-version: 3.8.12 | |
# token: ${{ secrets.GW_TOKEN }} | |
# - uses: syphar/restore-virtualenv@v1 | |
# id: cache-gwenv | |
# with: | |
# requirement_files: setup.cfg | |
# - uses: syphar/restore-pip-download-cache@v1 | |
# if: steps.cache-gwenv.outputs.cache-hit != 'true' | |
# - name: Release version | |
# uses: fnkr/github-action-ghr@v1 | |
# if: startsWith(github.ref, 'refs/tags/') | |
# env: | |
# GHR_PATH: . | |
# GHR_COMPRESS: gz | |
# GHR_DELETE: true | |
# GHR_REPLACE: true | |
# GITHUB_TOKEN: ${{ secrets.GW_TOKEN }} |