-
Notifications
You must be signed in to change notification settings - Fork 15
133 lines (114 loc) · 4.6 KB
/
Copy pathci.yml
File metadata and controls
133 lines (114 loc) · 4.6 KB
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
name: imSim CI
on:
push:
branches:
- main
- releases/*
pull_request:
branches:
- main
- releases/*
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
py: [ "3.13" ]
CC: [ gcc ]
CXX: [ g++ ]
defaults:
run:
# cf. https://github.com/conda-incubator/setup-miniconda#important
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.py }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.py }}
- name: Verify python and pip versions
run: |
python --version
pip --version
- name: Audit disk usage and remove unneeded tooling
run: |
df -h
sudo rm -rf /usr/lib/jvm
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/.ghcup
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/local/chromium
df -h
- name: Setup conda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: false
#conda-version: "25.11.1"
activate-environment: stack
python-version: ${{ matrix.py }}
condarc-file: etc/.condarc
- name: Install conda deps
run: |
# conda update -n base conda
conda info
conda list
conda install -y --file etc/standalone_conda_requirements.txt || true
conda info
conda list
df -h
- name: Install skyCatalogs from source
run: |
git clone https://github.com/LSSTDESC/skyCatalogs.git
cd skyCatalogs
git checkout v2.4.0
pip install --no-build-isolation --no-deps -e .
cd ..
- name: Try newer healpy
run: |
pip install healpy>=1.17.3 --upgrade
- name: Cache data
id: cache-data
uses: actions/cache@v4
with:
path: rubin_sim_data
key: "2024-05-10" # Update the key if we ever change the data.
- name: Install rubin_sim_data
if: steps.cache-data.outputs.cache-hit != 'true'
run: |
mkdir rubin_sim_data
mkdir rubin_sim_data/sims_sed_library
# Just get the skybrightness, throughputs, and SED data for now.
curl https://s3df.slac.stanford.edu/groups/rubin/static/sim-data/rubin_sim_data/skybrightness_may_2021.tgz | tar -C rubin_sim_data -xz
curl https://s3df.slac.stanford.edu/groups/rubin/static/sim-data/rubin_sim_data/throughputs_2023_09_07.tgz | tar -C rubin_sim_data -xz
curl https://s3df.slac.stanford.edu/groups/rubin/static/sim-data/sed_library/seds_170124.tar.gz | tar -C rubin_sim_data/sims_sed_library -xz
- name: Install imSim
run:
pip install .
- name: Install test deps
run:
conda install -y pytest nose pytest-durations pytest-xdist || true
- name: Run tests
run: |
export RUBIN_SIM_DATA_DIR=`pwd`/rubin_sim_data
eups list lsst_distrib
setup -r . -j
setup -r skyCatalogs -j
eups list | grep LOCAL
galsim --version
pytest --durations=10 -n 1 -v
- name: Check example config files
run: |
echo $PWD
ls /home/runner/work/imSim
export IMSIM_HOME=/home/runner/work/imSim
export RUBIN_SIM_DATA_DIR=`pwd`/rubin_sim_data
export SIMS_SED_LIBRARY_DIR=`pwd`/rubin_sim_data/sims_sed_library
# Just check that they haven't gotten stale and produce errors.
cd examples
galsim flat.yaml image.counts_per_pixel=500
galsim flat_with_sed.yaml image.counts_per_pixel=5
galsim imsim-user-instcat.yaml image.nobjects=10
galsim imsim-user-skycat.yaml image.nobjects=10
galsim imsim-user-instcat-comcam.yaml
galsim imsim-user-skycat-comcam.yaml