-
Notifications
You must be signed in to change notification settings - Fork 5
548 lines (548 loc) · 22.9 KB
/
ci-test-ctx.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
# Trigger the workflow on push or pull request
on:
pull_request:
push:
branches:
- main
env:
# Increase this value to reset cache
ISIS_CACHE_NUMBER: 34
ASAP_CACHE_NUMBER: 7
ASP_CACHE_NUMBER: 4
jobs:
cache_asp:
name: Cache ASP distribution
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- name: Cache ASP tarball
id: cache-asap
uses: actions/cache@v3
with:
path: "/tmp/sp.tar.bz2"
key: asp-env-${{ runner.os }}-${{ env.ASP_CACHE_NUMBER }}-${{ hashFiles('asap.yml') }}
- name: Download ASP tarball to tmp
run: |
wget -c https://github.com/NeoGeographyToolkit/StereoPipeline/releases/download/3.3.0/StereoPipeline-3.3.0-Linux.tar.bz2 -O /tmp/sp.tar.bz2 --progress=dot:giga
ls /tmp/sp.tar.bz2
cache_isis_env:
name: Cache ISIS conda environment
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- name: Cache ISIS conda env
id: cache-isis
uses: actions/cache@v3
with:
path: "isis-env.tar.gz"
key: isis-env-${{ runner.os }}-${{ env.ISIS_CACHE_NUMBER }}-${{ hashFiles('isis.yml') }}
- name: setup isis conda env
if: steps.cache-isis.outputs.cache-hit != 'true'
uses: conda-incubator/[email protected]
with:
miniforge-variant: Mambaforge
channels: usgs-astrogeology,conda-forge,defaults
activate-environment: isis_for_asp
environment-file: isis.yml
auto-update-conda: true
use-only-tar-bz2: true
- name: patch cspice so file
if: steps.cache-isis.outputs.cache-hit != 'true'
run: |
ls $CONDA/envs/isis_for_asp/lib/
ln -s $CONDA/envs/isis_for_asp/lib/libcspice.so $CONDA/envs/isis_for_asp/lib/libcspice.so.66
- name: conda info for isis
if: steps.cache-isis.outputs.cache-hit != 'true'
run: |
echo $PATH
conda env config vars list
conda info
conda list
- name: synce base kernels 1
if: steps.cache-isis.outputs.cache-hit != 'true'
run: downloadIsisData base $CONDA/envs/isis_for_asp/data/ --include='*/' --include="kernels.*.db"
- name: synce base kernels 2
if: steps.cache-isis.outputs.cache-hit != 'true'
run: downloadIsisData base $CONDA/envs/isis_for_asp/data/ --exclude='kernels/' --exclude="dems/" --exclude="testData/"
- name: rsync base kernels
if: steps.cache-isis.outputs.cache-hit != 'true'
run: |
mkdir -p $CONDA/envs/isis_for_asp/data/base/kernels/spk/
mkdir -p $CONDA/envs/isis_for_asp/data/base/kernels/lsk/
mkdir -p $CONDA/envs/isis_for_asp/data/base/kernels/pck/
mkdir -p $CONDA/envs/isis_for_asp/data/base/dems/
wget https://github.com/AndrewAnnex/asap_stereo_test_data/raw/master/de430.bsp -O $CONDA/envs/isis_for_asp/data/base/kernels/spk/de430.bsp
wget https://github.com/AndrewAnnex/asap_stereo_test_data/raw/master/mar097.bsp -O $CONDA/envs/isis_for_asp/data/base/kernels/spk/mar097.bsp
wget https://github.com/AndrewAnnex/asap_stereo_test_data/raw/master/naif0012.tls -O $CONDA/envs/isis_for_asp/data/base/kernels/lsk/naif0012.tls
wget https://github.com/AndrewAnnex/asap_stereo_test_data/raw/master/pck00009.tpc -O $CONDA/envs/isis_for_asp/data/base/kernels/pck/pck00009.tpc
wget https://github.com/AndrewAnnex/asap_stereo_test_data/raw/master/molaMarsPlanetaryRadius0005_cropped.cub -O $CONDA/envs/isis_for_asp/data/base/dems/molaMarsPlanetaryRadius0005.cub
ls $CONDA/envs/isis_for_asp/data/base/kernels/spk/ -lahtr
ls $CONDA/envs/isis_for_asp/data/base/kernels/lsk/ -lahtr
ls $CONDA/envs/isis_for_asp/data/base/kernels/pck/ -lahtr
ls $CONDA/envs/isis_for_asp/data/base/dems/ -lahtr
- name: synce mro kernels 1
if: steps.cache-isis.outputs.cache-hit != 'true'
run: downloadIsisData mro $CONDA/envs/isis_for_asp/data/ --exclude='spk/' --exclude="sclk/" --exclude="ck/" --exclude="fk/" --exclude="iak/" --exclude="testData"
- name: synce mro kernels 2
if: steps.cache-isis.outputs.cache-hit != 'true'
run: downloadIsisData mro $CONDA/envs/isis_for_asp/data/ --include='*/' --include="kernels.*.db" --include="*.db" --exclude="*"
- name: synce mro kernels 3
if: steps.cache-isis.outputs.cache-hit != 'true'
run: downloadIsisData mro $CONDA/envs/isis_for_asp/data/ --include="*pck/*"
- name: rsync mro data
if: steps.cache-isis.outputs.cache-hit != 'true'
run: |
mkdir -p $CONDA/envs/isis_for_asp/data/mro/kernels/spk/
mkdir -p $CONDA/envs/isis_for_asp/data/mro/kernels/sclk/
mkdir -p $CONDA/envs/isis_for_asp/data/mro/kernels/ck/
mkdir -p $CONDA/envs/isis_for_asp/data/mro/kernels/pck/
mkdir -p $CONDA/envs/isis_for_asp/data/mro/kernels/iak/
mkdir -p $CONDA/envs/isis_for_asp/data/mro/kernels/fk/
wget https://github.com/AndrewAnnex/asap_stereo_test_data/raw/master/mro_v15.tf -O $CONDA/envs/isis_for_asp/data/mro/kernels/fk/mro_v15.tf
wget https://github.com/AndrewAnnex/asap_stereo_test_data/raw/master/MRO_SCLKSCET.00090.65536.tsc -O $CONDA/envs/isis_for_asp/data/mro/kernels/sclk/MRO_SCLKSCET.00090.65536.tsc
wget https://github.com/AndrewAnnex/asap_stereo_test_data/raw/master/mroctxAddendum005.ti -O $CONDA/envs/isis_for_asp/data/mro/kernels/iak/mroctxAddendum005.ti
wget https://github.com/AndrewAnnex/asap_stereo_test_data/raw/master/mro_sc_psp_061219_061225_subset.bc -O $CONDA/envs/isis_for_asp/data/mro/kernels/ck/mro_sc_psp_061219_061225.bc
wget https://github.com/AndrewAnnex/asap_stereo_test_data/raw/master/mro_sc_psp_081028_081103_subset.bc -O $CONDA/envs/isis_for_asp/data/mro/kernels/ck/mro_sc_psp_081028_081103.bc
wget https://github.com/AndrewAnnex/asap_stereo_test_data/raw/master/mro_psp1_ssd_mro110c_subset.bsp -O $CONDA/envs/isis_for_asp/data/mro/kernels/spk/mro_psp1_ssd_mro110c.bsp
wget https://github.com/AndrewAnnex/asap_stereo_test_data/raw/master/mro_psp9_ssd_mro110c_subset.bsp -O $CONDA/envs/isis_for_asp/data/mro/kernels/spk/mro_psp9_ssd_mro110c.bsp
wget https://github.com/AndrewAnnex/asap_stereo_test_data/raw/master/pck00009.tpc -O $CONDA/envs/isis_for_asp/data/mro/kernels/pck/pck00009.tpc
ls $CONDA/envs/isis_for_asp/data/mro/kernels/spk/ -lahtr
ls $CONDA/envs/isis_for_asp/data/mro/kernels/sclk/ -lahtr
ls $CONDA/envs/isis_for_asp/data/mro/kernels/ck/ -lahtr
ls $CONDA/envs/isis_for_asp/data/mro/kernels/pck/ -lahtr
ls $CONDA/envs/isis_for_asp/data/mro/kernels/iak/ -lahtr
ls $CONDA/envs/isis_for_asp/data/mro/kernels/fk/ -lahtr
- name: show contents of data
if: steps.cache-isis.outputs.cache-hit != 'true'
run: ls -R $CONDA/envs/isis_for_asp/data/
- name: pack isis conda env
if: steps.cache-isis.outputs.cache-hit != 'true'
run: |
tar -czf isis-env.tar.gz $CONDA/envs/isis_for_asp
pwd
ls -lahtr
cache_asap_env:
name: Cache ASAP conda environment
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- name: Cache ASAP conda env
id: cache-asap
uses: actions/cache@v3
with:
path: "asap-env.tar.gz"
key: asap-env-${{ runner.os }}-${{ env.ASAP_CACHE_NUMBER }}-${{ hashFiles('asap.yml') }}
- name: setup asap conda env
if: steps.cache-asap.outputs.cache-hit != 'true'
uses: conda-incubator/[email protected]
with:
activate-environment: asap
miniforge-variant: Mambaforge
channels: conda-forge
environment-file: asap.yml
python-version: '3.11'
auto-update-conda: true
use-only-tar-bz2: false
- name: add ASP and ISIS to PATH of asap conda
if: steps.cache-asap.outputs.cache-hit != 'true'
run: |
conda env config vars set ISISROOT=$CONDA/envs/isis_for_asp
conda env config vars set ISISDATA=$CONDA/envs/isis_for_asp/data
conda env config vars set ISISTESTDATA=$CONDA/envs/isis_for_asp/testdata
conda env config vars set PATH=$PATH:/tmp/sp/bin:$CONDA/envs/isis_for_asp/bin
- name: conda info
if: steps.cache-asap.outputs.cache-hit != 'true'
run: |
echo $PATH
conda env config vars list
conda info
conda list
- name: pack asap conda env
if: steps.cache-asap.outputs.cache-hit != 'true'
run: |
tar -cvzf asap-env.tar.gz $CONDA/envs/asap
pwd
ls -lahtr
test_basic:
name: Basic ASAP Tests
needs: [ cache_asp, cache_isis_env, cache_asap_env ]
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- name: Setup default miniconda
uses: conda-incubator/[email protected]
with:
miniforge-variant: Mambaforge
- name: Get ASP from cache
uses: actions/cache@v3
with:
path: "/tmp/sp.tar.bz2"
key: asp-env-${{ runner.os }}-${{ env.ASP_CACHE_NUMBER }}-${{ hashFiles('asap.yml') }}
- name: Extract ASP tarball to tmp
run: |
mkdir /tmp/sp
tar -xf /tmp/sp.tar.bz2 -C /tmp/sp --strip-components 1
rm /tmp/sp.tar.bz2
ls /tmp/sp
- name: Get ISIS Conda environment from cache
uses: actions/cache@v3
with:
path: "isis-env.tar.gz"
key: isis-env-${{ runner.os }}-${{ env.ISIS_CACHE_NUMBER }}-${{ hashFiles('isis.yml') }}
- name: Unpack ISIS Conda environment
run: |
mkdir -p $CONDA/envs/isis_for_asp
tar -xvf isis-env.tar.gz -C /
rm isis-env.tar.gz
- name: Get ASAP Conda environment from cache
uses: actions/cache@v3
with:
path: "asap-env.tar.gz"
key: asap-env-${{ runner.os }}-${{ env.ASAP_CACHE_NUMBER }}-${{ hashFiles('asap.yml') }}
- name: Unpack ASAP Conda environment
run: |
mkdir -p $CONDA/envs/asap
tar -xvf asap-env.tar.gz -C /
rm asap-env.tar.gz
- name: show contents of data
run: ls -R $CONDA/envs/isis_for_asp/data/
- name: Check contents of isis env
run: |
pwd
echo $CONDA
ls -lahtr
ls $CONDA/
ls $CONDA/envs/isis_for_asp -lahtr
ls $CONDA/envs/isis_for_asp/bin -lahtr
ls $CONDA/envs/isis_for_asp/data/base/kernels/lsk/ -lahtr
- name: Install asap
run: |
conda activate asap
pip install -e .
- name: Conda info for asap
run: |
conda activate asap
echo $PATH
conda env config vars list
conda info
conda list
- name: Check isis shared libraries
run: |
conda activate asap
ldd `which qview`
- name: Test for asap
run: |
conda activate asap
asap
asap ctx
asap hirise
asap common
- name: Test readme rendering
run: |
conda activate asap
python -m readme_renderer README.rst
test_runner:
name: ASAP test CTX pipeline
needs: [cache_asp, cache_isis_env, cache_asap_env]
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- name: Setup default miniconda
uses: conda-incubator/[email protected]
with:
miniforge-variant: Mambaforge
- name: Get ASP from cache
uses: actions/cache@v3
with:
path: "/tmp/sp.tar.bz2"
key: asp-env-${{ runner.os }}-${{ env.ASP_CACHE_NUMBER }}-${{ hashFiles('asap.yml') }}
- name: Extract ASP tarball to tmp
run: |
mkdir /tmp/sp
tar -xf /tmp/sp.tar.bz2 -C /tmp/sp --strip-components 1
rm /tmp/sp.tar.bz2
ls /tmp/sp
- name: Get ISIS Conda environment from cache
uses: actions/cache@v3
with:
path: "isis-env.tar.gz"
key: isis-env-${{ runner.os }}-${{ env.ISIS_CACHE_NUMBER }}-${{ hashFiles('isis.yml') }}
- name: Unpack ISIS Conda environment
run: |
mkdir -p $CONDA/envs/isis_for_asp
tar -xzf "isis-env.tar.gz" -C /
rm isis-env.tar.gz
- name: Get ASAP Conda environment from cache
uses: actions/cache@v3
with:
path: "asap-env.tar.gz"
key: asap-env-${{ runner.os }}-${{ env.ASAP_CACHE_NUMBER }}-${{ hashFiles('asap.yml') }}
- name: Unpack ASAP Conda environment
run: |
mkdir -p $CONDA/envs/asap
tar -xvf asap-env.tar.gz -C /
rm asap-env.tar.gz
- name: show contents of data
run: ls -R $CONDA/envs/isis_for_asp/data/
- name: Check contents of isis env
run: |
pwd
echo $CONDA
ls -lahtr
ls $CONDA/
ls $CONDA/envs/isis_for_asp -lahtr
ls $CONDA/envs/isis_for_asp/bin -lahtr
ls $CONDA/envs/isis_for_asp/data/base/kernels/lsk/ -lahtr
- name: Install asap
run: |
conda activate asap
pip install -e .
- name: conda info for asap
run: |
conda activate asap
echo $PATH
conda env config vars list
conda info
conda list
- name: check isis shared libraries
run: |
conda activate asap
ldd `which qview`
- name: test for asap
run: |
conda activate asap
asap
- name: asap step 1
timeout-minutes: 5
run: |
conda activate asap
asap ctx step-1 B03_010644_1889_XN_08N001W P02_001902_1889_XI_08N001W
- name: look before you leap
run: |
conda activate asap
ls ./* -lahtr
head -n 20 ./*.IMG
env | grep ISIS
pwd
- name: asap step 2
timeout-minutes: 1
run: |
conda activate asap
asap ctx step-2
- name: asap stereo quality report
run: |
conda activate asap
ls
asap common get_stereo_quality_report ./B03_010644_1889_XN_08N001W.lev1eo.cub ./P02_001902_1889_XI_08N001W.lev1eo.cub
ls
- name: asap 4 & rescale images for test
run: |
conda activate asap
asap ctx step-3
- name: asap step 4
run: |
conda activate asap
asap ctx step-4
- name: asap step 5 (and get stereo conf files)
run: |
conda activate asap
wget https://raw.githubusercontent.com/NeoGeographyToolkit/StereoPipeline/master/examples/CTX/stereo.nonmap
wget https://raw.githubusercontent.com/NeoGeographyToolkit/StereoPipeline/master/examples/CTX/stereo.map
asap ctx step-5 ./stereo.nonmap
- name: asap step 6
run: |
conda activate asap
asap ctx step-6 ./stereo.nonmap
- name: asap step 7-8
run: |
conda activate asap
asap ctx step-7 --mpp 100 --dem_hole_fill_len 50
asap ctx step-8
- name: asap 1st round previews
run: |
conda activate asap
ls -lahtr $(pwd)/B03_010644_1889_XN_08N001W_P02_001902_1889_XI_08N001W/results_ba/
gdal_translate -of PNG $(pwd)/B03_010644_1889_XN_08N001W_P02_001902_1889_XI_08N001W/results_ba/B03_010644_1889_XN_08N001W_P02_001902_1889_XI_08N001W_ba-GoodPixelMap.tif ./good_pixel_map_1.png
ls -lahtr $(pwd)/B03_010644_1889_XN_08N001W_P02_001902_1889_XI_08N001W/results_ba/dem/
gdal_translate -of PNG $(pwd)/B03_010644_1889_XN_08N001W_P02_001902_1889_XI_08N001W/results_ba/dem/B03_010644_1889_XN_08N001W_P02_001902_1889_XI_08N001W_ba_100_0-DEM-hillshade.tif ./hillshade_1.png
- name: Archive First Round Previews
uses: actions/upload-artifact@v3
with:
name: first-round
path: |
good_pixel_map_1.png
hillshade_1.png
- name: asap step 9
run: |
conda activate asap
asap ctx step-9 --refdem $(pwd)/B03_010644_1889_XN_08N001W_P02_001902_1889_XI_08N001W/results_ba/dem/B03_010644_1889_XN_08N001W_P02_001902_1889_XI_08N001W_ba_100_0-DEM.tif --mpp 25
- name: asap step 10-11
run: |
conda activate asap
asap ctx step-10 --refdem $(pwd)/B03_010644_1889_XN_08N001W_P02_001902_1889_XI_08N001W/results_ba/dem/B03_010644_1889_XN_08N001W_P02_001902_1889_XI_08N001W_ba_100_0-DEM.tif ./stereo.map
asap ctx step-11 --refdem $(pwd)/B03_010644_1889_XN_08N001W_P02_001902_1889_XI_08N001W/results_ba/dem/B03_010644_1889_XN_08N001W_P02_001902_1889_XI_08N001W_ba_100_0-DEM.tif ./stereo.map
asap ctx step-7 --mpp 50 --run results_map_ba
asap ctx step-8 --run results_map_ba
- name: asap step 12
run: |
conda activate asap
asap ctx step-12 None
- name: asap 2nd round previews
run: |
conda activate asap
gdal_translate -of PNG $(pwd)/B03_010644_1889_XN_08N001W_P02_001902_1889_XI_08N001W/results_map_ba/B03_010644_1889_XN_08N001W_P02_001902_1889_XI_08N001W_ba-GoodPixelMap.tif ./good_pixel_map_2.png
gdal_translate -of PNG $(pwd)/B03_010644_1889_XN_08N001W_P02_001902_1889_XI_08N001W/results_map_ba/dem/B03_010644_1889_XN_08N001W_P02_001902_1889_XI_08N001W_ba_50_0-DEM-hillshade.tif ./hillshade_2.png
- name: Archive 2nd Round Previews
uses: actions/upload-artifact@v3
with:
name: second-round
path: |
good_pixel_map_2.png
hillshade_2.png
- name: list contents of results_map_ba/dem
run: ls $(pwd)/B03_010644_1889_XN_08N001W_P02_001902_1889_XI_08N001W/results_map_ba/dem/ -lahtr
- name: asap step 13-17
timeout-minutes: 2
run: |
conda activate asap
asap ctx step-13 --highest_accuracy False --max-num-reference-points 100000 --max-num-source-points 10000
asap ctx step-14 --mpp 50
asap ctx step-15
asap ctx step_8 --run results_map_ba --output_folder dem_align
asap ctx step_14 --mpp 25 --just_ortho True
- name: asap final previews
run: |
conda activate asap
gdal_translate -ot Byte -scale 0 1 -of PNG $(pwd)/B03_010644_1889_XN_08N001W_P02_001902_1889_XI_08N001W/results_map_ba/dem_align/B03_010644_1889_XN_08N001W_P02_001902_1889_XI_08N001W_map_ba_align_25_0-DRG.tif ./vis_f.png
gdal_translate -of PNG $(pwd)/B03_010644_1889_XN_08N001W_P02_001902_1889_XI_08N001W/results_map_ba/dem_align/B03_010644_1889_XN_08N001W_P02_001902_1889_XI_08N001W_map_ba_align_50_0-DEM-hillshade.tif ./hillshade_f.png
- name: LS directories to see what was made
continue-on-error: true
if: always()
run: |
ls -lahtr
ls ./B03_010644_1889_XN_08N001W_P02_001902_1889_XI_08N001W/* -lahtr
ls ./*/*/* -lahtr
- name: Archive Final Previews
uses: actions/upload-artifact@v3
if: always()
with:
name: final_ctx
path: |
*.log
hillshade_f.png
vis_f.png
./B03_010644_1889_XN_08N001W_P02_001902_1889_XI_08N001W/*.json
test_notebook:
name: ASAP test Notebook CTX pipeline
needs: [cache_asp, cache_isis_env, cache_asap_env]
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- name: Setup default miniconda
uses: conda-incubator/[email protected]
with:
miniforge-variant: Mambaforge
- name: Get ASP from cache
uses: actions/cache@v3
with:
path: "/tmp/sp.tar.bz2"
key: asp-env-${{ runner.os }}-${{ env.ASP_CACHE_NUMBER }}-${{ hashFiles('asap.yml') }}
- name: Extract ASP tarball to tmp
run: |
mkdir /tmp/sp
tar -xf /tmp/sp.tar.bz2 -C /tmp/sp --strip-components 1
rm /tmp/sp.tar.bz2
ls /tmp/sp
- name: Get ISIS Conda environment from cache
uses: actions/cache@v3
with:
path: "isis-env.tar.gz"
key: isis-env-${{ runner.os }}-${{ env.ISIS_CACHE_NUMBER }}-${{ hashFiles('isis.yml') }}
- name: Unpack ISIS Conda environment
run: |
mkdir -p $CONDA/envs/isis_for_asp
tar -xvf isis-env.tar.gz -C /
rm isis-env.tar.gz
- name: Get ASAP Conda environment from cache
uses: actions/cache@v3
with:
path: "asap-env.tar.gz"
key: asap-env-${{ runner.os }}-${{ env.ASAP_CACHE_NUMBER }}-${{ hashFiles('asap.yml') }}
- name: Unpack ASAP Conda environment
run: |
mkdir -p $CONDA/envs/asap
tar -xvf asap-env.tar.gz -C /
rm asap-env.tar.gz
- name: show contents of data
run: ls -R $CONDA/envs/isis_for_asp/data/
- name: Check contents of isis env
run: |
pwd
echo $CONDA
ls -lahtr
ls $CONDA/
ls $CONDA/envs/isis_for_asp -lahtr
ls $CONDA/envs/isis_for_asp/bin -lahtr
ls $CONDA/envs/isis_for_asp/data/base/kernels/lsk/ -lahtr
- name: Install asap
run: |
conda activate asap
pip install -e .
- name: Conda info for asap
run: |
conda activate asap
echo $PATH
conda env config vars list
conda info
conda list
- name: Check isis shared libraries
run: |
conda activate asap
ldd `which qview`
- name: Test for asap
run: |
conda activate asap
asap
- name: Download stereo parameter files
run: |
wget https://raw.githubusercontent.com/NeoGeographyToolkit/StereoPipeline/master/examples/CTX/stereo.nonmap
wget https://raw.githubusercontent.com/NeoGeographyToolkit/StereoPipeline/master/examples/CTX/stereo.map
- name: Asap notebook run
timeout-minutes: 30
run: |
conda activate asap
asap ctx notebook_pipeline_make_dem B03_010644_1889_XN_08N001W P02_001902_1889_XI_08N001W ./stereo.nonmap --config2 ./stereo.map --img_gsd 25 --dem_gsd 50 --step_kwargs '{"step_13": "--highest_accuracy False --max-num-reference-points 100000 --max-num-source-points 10000"}'
- name: LS directories to see what was made
continue-on-error: true
if: always()
run: |
ls -lahtr
ls ./B03_010644_1889_XN_08N001W_P02_001902_1889_XI_08N001W/* -lahtr
ls ./*/*/* -lahtr
- name: Archive Final Notebook from Papermill
uses: actions/upload-artifact@v3
if: always()
with:
name: final_notebook
path: |
*.log
*.ipynb
./B03_010644_1889_XN_08N001W_P02_001902_1889_XI_08N001W/*.json