-
Notifications
You must be signed in to change notification settings - Fork 9
44 lines (38 loc) · 1.59 KB
/
python-package-z-pnn.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: build
on: [push]
jobs:
build-linux:
runs-on: ubuntu-22.04
strategy:
max-parallel: 5
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
architecture: "x64"
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
conda install numpy tqdm gdal matplotlib -c conda-forge
conda install scikit-image scipy scikit-learn -c conda-forge
conda install -c conda-forge gcc=12.1.0
conda install -c conda-forge libstdcxx-ng=12
- name: Test with pytest
run: |
conda install pytest
conda install -c conda-forge coverage
- name: Run tests and collect coverage
run: |
coverage run -p main.py -i example/WV3_example.mat -o ./Output_Example -s WV3 -m Z-PNN --coregistration --use_cpu --from_scratch --epochs 2
coverage run -p main.py -i example/WV3_example.mat -o ./Output_Example -s WV3 -m PanNet-TA-FR --use_cpu --from_scratch --epochs 2
coverage run -p main.py -i example/WV3_example.mat -o ./Output_Example -s WV3 -m Z-DRPNN --coregistration --use_cpu --from_scratch --show_results --save_weights -lr 1e-5 -b 0.5 --epochs 2
coverage combine
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2