Update README.md #167
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: PyPI tests | |
on: | |
push: | |
branches: [ "pygmtsar" ] | |
pull_request: | |
branches: [ "pygmtsar" ] | |
permissions: | |
contents: read | |
jobs: | |
S1A_Stack_CPGF_T173: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest"] | |
python-version: ["3.x"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install system dependencies | |
run: | | |
uname -a | |
# prepare system | |
sudo apt update | |
# https://github.com/gmtsar/gmtsar/wiki/GMTSAR-Wiki-Page | |
sudo apt install -y csh subversion autoconf libtiff5-dev libhdf5-dev wget | |
sudo apt install -y liblapack-dev | |
sudo apt install -y gfortran | |
sudo apt install -y g++ | |
sudo apt install -y libgmt-dev | |
sudo apt install -y gmt-dcw gmt-gshhg | |
# gmt-gshhg-full should be installed automatically (it is required to use GMTSAR landmask) | |
sudo apt install -y gmt | |
# add missed package | |
sudo apt install -y make | |
- name: Compile GMTSAR | |
run: | | |
git clone --branch master https://github.com/gmtsar/gmtsar GMTSAR | |
cd GMTSAR | |
# revert recent broken commit | |
git checkout e98ebc0f4164939a4780b1534bac186924d7c998 | |
autoconf | |
./configure --with-orbits-dir=/tmp CFLAGS='-z muldefs' LDFLAGS='-z muldefs' | |
make CFLAGS='-z muldefs' LDFLAGS='-z muldefs' | |
make install | |
# check installation | |
export PATH=$PATH:/home/runner/work/gmtsar/gmtsar/GMTSAR/bin | |
echo "Start gmtsar_sharedir.csh" | |
gmtsar_sharedir.csh | |
- name: Install PyGMTSAR | |
run: | | |
# upgrade package to resolve dependencies | |
pip3 install click --upgrade | |
pip3 install matplotlib seaborn | |
pip3 install pygmtsar | |
- name: Cache dataset | |
uses: actions/cache@v3 | |
with: | |
path: tests/S1A_Stack_CPGF_T173.tar.gz | |
key: S1A_Stack_CPGF_T173.tar.gz | |
restore-keys: S1A_Stack_CPGF_T173 | |
- name: Run test | |
working-directory: tests | |
run: | | |
export PATH=$PATH:/home/runner/work/gmtsar/gmtsar/GMTSAR/bin | |
sh S1A_Stack_CPGF_T173.sh | |
- name: Archive test results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Plots S1A_Stack_CPGF_T173 (${{ matrix.os }}, ${{ matrix.python-version }}) | |
path: tests/*.jpg | |
if-no-files-found: error | |
S1A_2016_Kumamoto_Earthquake: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest"] | |
python-version: ["3.x"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install system dependencies | |
run: | | |
uname -a | |
# prepare system | |
sudo apt update | |
# https://github.com/gmtsar/gmtsar/wiki/GMTSAR-Wiki-Page | |
sudo apt install -y csh subversion autoconf libtiff5-dev libhdf5-dev wget | |
sudo apt install -y liblapack-dev | |
sudo apt install -y gfortran | |
sudo apt install -y g++ | |
sudo apt install -y libgmt-dev | |
sudo apt install -y gmt-dcw gmt-gshhg | |
# gmt-gshhg-full should be installed automatically (it is required to use GMTSAR landmask) | |
sudo apt install -y gmt | |
# add missed package | |
sudo apt install -y make | |
# for old DEM downloading backend | |
sudo apt install -y gdal-bin | |
# tool required for iCloud downloading | |
sudo apt install jq | |
- name: Compile GMTSAR | |
run: | | |
git clone --branch master https://github.com/gmtsar/gmtsar GMTSAR | |
cd GMTSAR | |
# revert recent broken commit | |
git checkout e98ebc0f4164939a4780b1534bac186924d7c998 | |
autoconf | |
./configure --with-orbits-dir=/tmp CFLAGS='-z muldefs' LDFLAGS='-z muldefs' | |
make CFLAGS='-z muldefs' LDFLAGS='-z muldefs' | |
make install | |
# check installation | |
export PATH=$PATH:/home/runner/work/gmtsar/gmtsar/GMTSAR/bin | |
echo "Start gmtsar_sharedir.csh" | |
gmtsar_sharedir.csh | |
- name: Install PyGMTSAR | |
run: | | |
# upgrade package to resolve dependencies | |
pip3 install click --upgrade | |
pip3 install matplotlib seaborn | |
pip3 install pygmtsar | |
- name: Run test | |
working-directory: tests | |
run: | | |
export PATH=$PATH:/home/runner/work/gmtsar/gmtsar/GMTSAR/bin | |
sh ./S1A_2016_Kumamoto_Earthquake.sh force | |
- name: Archive test results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Plots S1A_2016_Kumamoto_Earthquake (${{ matrix.os }}, ${{ matrix.python-version }}) | |
path: tests/*.jpg | |
if-no-files-found: error | |
S1AB_2021_Crete_Earthquake: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest"] | |
python-version: ["3.x"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install system dependencies | |
run: | | |
uname -a | |
# prepare system | |
sudo apt update | |
# https://github.com/gmtsar/gmtsar/wiki/GMTSAR-Wiki-Page | |
sudo apt install -y csh subversion autoconf libtiff5-dev libhdf5-dev wget | |
sudo apt install -y liblapack-dev | |
sudo apt install -y gfortran | |
sudo apt install -y g++ | |
sudo apt install -y libgmt-dev | |
sudo apt install -y gmt-dcw gmt-gshhg | |
# gmt-gshhg-full should be installed automatically (it is required to use GMTSAR landmask) | |
sudo apt install -y gmt gmt-gshhg-full | |
# add missed package | |
sudo apt install -y make | |
# for old DEM downloading backend | |
sudo apt install -y gdal-bin | |
# tool required for iCloud downloading | |
sudo apt install jq | |
- name: Compile GMTSAR | |
run: | | |
git clone --branch master https://github.com/gmtsar/gmtsar GMTSAR | |
cd GMTSAR | |
# revert recent broken commit | |
git checkout e98ebc0f4164939a4780b1534bac186924d7c998 | |
autoconf | |
./configure --with-orbits-dir=/tmp CFLAGS='-z muldefs' LDFLAGS='-z muldefs' | |
make CFLAGS='-z muldefs' LDFLAGS='-z muldefs' | |
make install | |
# check installation | |
export PATH=$PATH:/home/runner/work/gmtsar/gmtsar/GMTSAR/bin | |
echo "Start gmtsar_sharedir.csh" | |
gmtsar_sharedir.csh | |
- name: Install PyGMTSAR | |
run: | | |
# upgrade package to resolve dependencies | |
pip3 install click --upgrade | |
pip3 install matplotlib seaborn | |
pip3 install pygmtsar | |
- name: Run test | |
working-directory: tests | |
run: | | |
export PATH=$PATH:/home/runner/work/gmtsar/gmtsar/GMTSAR/bin | |
sh ./S1AB_2021_Crete_Earthquake.sh force | |
- name: Archive test results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Plots S1AB_2021_Crete_Earthquake (${{ matrix.os }}, ${{ matrix.python-version }}) | |
path: tests/*.jpg | |
if-no-files-found: error |