@@ -33,81 +33,141 @@ jobs:
3333 fi
3434
3535 build-icetray :
36- name : Unit tests - IceTray
36+ name : Unit tests - IceTray (v1.13.0 - 3.10)
3737 needs : [ check-codeclimate-credentials ]
3838 runs-on : ubuntu-22.04
39+ strategy :
40+ matrix :
41+ torch_version : ['2.7.0']
42+ hardware : ["cpu"]
3943 container :
40- image : icecube/icetray:icetray-prod-v1.8.1-ubuntu20.04-X64
41- options : --user root
44+ # GitHub Actions overwrite the docker container entrypoint
45+ # inspect <image> --format '{{.Config.Entrypoint}}'
46+ image : icecube/icetray:icetray-devel-v1.13.0-ubuntu22.04-2025-02-12
47+
4248 steps :
43- - name : install git
49+ - name : Mimmick Docker Entrypoint
50+ # The entrypoint of the container sets python paths
51+ # Because the entrypoint is skipped by GitHub, we set it here
52+ run : |
53+ echo "I3_SRC=/opt/icetray/share/icetray" >> $GITHUB_ENV
54+ echo "I3_BUILD=/opt/icetray/share/icetray" >> $GITHUB_ENV
55+ echo "I3_TESTDATA=/root/icetray/build/test-data" >> $GITHUB_ENV
56+ echo "I3_PRODDATA=/root/icetray/build/prod-data" >> $GITHUB_ENV
57+ echo "ROOTSYS=/opt/icetray/cernroot" >> $GITHUB_ENV
58+ echo "LD_LIBRARY_PATH=/opt/icetray/lib:/opt/icetray/cernroot/lib:/opt/icetray/lib/tools:$LD_LIBRARY_PATH" >> $GITHUB_ENV
59+ echo "DYLD_LIBRARY_PATH=/opt/icetray/lib:/opt/icetray/cernroot/lib:/opt/icetray/lib/tools:$DYLD_LIBRARY_PATH" >> $GITHUB_ENV
60+ echo "PYTHONPATH=/opt/icetray/lib:/opt/icetray/cernroot/lib:$PYTHONPATH" >> $GITHUB_ENV
61+ echo "PATH=/opt/icetray/bin:$PATH" >> $GITHUB_ENV
62+ echo "HDF5_USE_FILE_LOCKING=FALSE" >> $GITHUB_ENV
63+ - name : Verify IceCube is importable
64+ run : python3 -c "import icecube; print('Import Successful')"
65+ - name : Show python version
66+ run : |
67+ python3 --version
68+ pip --version
69+ pip3 list
70+ python3 -c "import icecube; print(icecube.__path__)"
71+ pip show setuptools
72+
73+ - name : Install git
4474 run : |
4575 apt-get --yes install sudo
4676 sudo apt update --fix-missing --yes
4777 sudo apt upgrade --yes
48- sudo apt-get install --yes git-all
49- - name : Set environment variables
78+ sudo apt-get install --yes git
79+
80+ - uses : actions/checkout@v4
81+
82+ - name : Create virtual environment
83+ shell : bash
5084 run : |
51- echo "PATH=/usr/local/icetray/bin:$PATH" >> $GITHUB_ENV
52- echo "PYTHONPATH=/usr/local/icetray/lib:$PYTHONPATH" >> $GITHUB_ENV
53- echo "LD_LIBRARY_PATH=/usr/local/icetray/lib:/usr/local/icetray/cernroot/lib:/usr/local/icetray/lib/tools:$LD_LIBRARY_PATH" >> $GITHUB_ENV
54- - uses : actions/checkout@v3
85+ python3 -m venv ~/venv --upgrade-deps
86+ source ~/venv/bin/activate
87+ pip --version
88+ python --version
89+ pip show setuptools
90+
5591 - name : Print available disk space before graphnet install
5692 run : df -h
57- - name : Upgrade packages already installed on icecube/icetray
93+
94+ - name : Upgrade packages in virtual environment
95+ shell : bash
5896 run : |
59- pip install --upgrade astropy # Installed version incompatible with numpy 1.23.0 [https://github.com/astropy/astropy/issues/12534]
60- pip install --ignore-installed PyYAML # Distutils installed [https://github.com/pypa/pip/issues/5247]
61- pip install --upgrade psutil # Original version from IceTray Environment incompatible
97+ source ~/venv/bin/activate
98+ pip install --upgrade astropy
99+ pip install --upgrade PyYAML
100+ pip install --upgrade psutil
101+ pip install --upgrade setuptools
102+ pip install --upgrade versioneer
103+ pip show setuptools
104+ pip show versioneer
62105 - name : Install package
63106 uses : ./.github/actions/install
64107 with :
65108 editable : true
109+ use_vm : true
110+ torch_version : ${{ matrix.torch_version }}
111+ hardware : ${{ matrix.hardware }}
66112 - name : Print packages in pip
113+ shell : bash
67114 run : |
115+ source ~/venv/bin/activate
68116 pip show torch
69117 pip show torch-geometric
70118 pip show torch-cluster
71119 pip show torch-sparse
72120 pip show torch-scatter
73121 pip show jammy_flows
74122 - name : Run unit tests and generate coverage report
123+ shell : bash
75124 run : |
125+ source ~/venv/bin/activate
76126 coverage run --source=graphnet -m pytest tests/ --ignore=tests/examples/04_training --ignore=tests/utilities
77127 coverage run -a --source=graphnet -m pytest tests/examples/04_training
78128 coverage run -a --source=graphnet -m pytest tests/utilities
79129 coverage xml -o coverage.xml
80-
130+ coverage report -m
81131 - name : Work around permission issue
82132 run : |
83133 git config --global --add safe.directory /__w/graphnet/graphnet
84134 - name : Publish code coverage
85- uses : paambaati/codeclimate-action@v3 .0.0
135+ uses : paambaati/codeclimate-action@v9 .0.0
86136 if : needs.check-codeclimate-credentials.outputs.has_credentials == 'true'
87137 env :
88138 CC_TEST_REPORTER_ID : ${{ secrets.CODECLIMATE_TEST_REPORTER_ID }}
89- with :
90- coverageCommand : coverage report
139+ with :
91140 coverageLocations : coverage.xml:coverage.py
141+
92142
93- build-matrix :
94- name : Unit tests - Python versions
143+ build-matrix-examples :
144+ name : Examples - Ubuntu 22.04
95145 runs-on : ubuntu-22.04
96146 strategy :
97147 matrix :
98- python-version : [3.8, 3.9, '3.10', '3.11']
148+ python-version : ['3.11']
149+ torch_version : ['2.7.0', '2.6.0', '2.5.0']
150+ hardware : ["cpu"]
99151 steps :
100- - uses : actions/checkout@v3
152+ - uses : actions/checkout@v4
101153 - name : Set up Python ${{ matrix.python-version }}
102154 uses : actions/setup-python@v4
103155 with :
104156 python-version : ${{ matrix.python-version }}
105157 - name : Print available disk space before graphnet install
106158 run : df -h
159+ - name : Show existing environment
160+ run : |
161+ echo "PIP_FLAGS=${PIP_FLAGS}"
162+ python --version
163+ pip --version
164+ pip debug --verbose
107165 - name : Install package
108166 uses : ./.github/actions/install
109167 with :
110168 editable : true
169+ torch_version : ${{ matrix.torch_version }}
170+ hardware : ${{ matrix.hardware }}
111171 - name : Print available disk space after graphnet install
112172 run : df -h
113173 - name : Print packages in pip
@@ -117,32 +177,45 @@ jobs:
117177 pip show torch-cluster
118178 pip show torch-sparse
119179 pip show torch-scatter
180+ pip show dill
120181 pip show numpy
121-
122-
123182 - name : Run unit tests and generate coverage report
124183 run : |
125184 set -o pipefail # To propagate exit code from pytest
126- coverage run --source=graphnet -m pytest tests/ --ignore=tests/utilities --ignore=tests/data/ --ignore=tests/deployment/ --ignore=tests/examples/01_icetray/
127- coverage run -a --source=graphnet -m pytest tests/utilities
128- coverage report -m
185+ pytest tests/examples --ignore=tests/examples/01_icetray/
129186 - name : Print available disk space after unit tests
130187 run : df -h
131188
132- build-macos :
133- name : Unit tests - macOS
134- runs-on : macos-13
189+ build-macos-examples :
190+ # Runtime on macOS is multiplied with a factor 10 by github. Minimize!
191+ name : Examples - macOS 15
192+ runs-on : macos-15
193+ strategy :
194+ fail-fast : false
195+ matrix :
196+ python-version : ['3.11']
197+ torch_version : ['2.7.0']
198+ hardware : ["cpu"]
199+
135200 steps :
136- - uses : actions/checkout@v3
137- - name : Set up Python 3.8
138- uses : actions/setup-python@v4
201+ - uses : actions/checkout@v4
202+
203+ - name : Set up Python ${{ matrix.python-version }}
204+ uses : actions/setup-python@v5
139205 with :
140- python-version : 3.8
141- - name : Install package
206+ python-version : ${{ matrix.python-version }}
207+
208+ - name : Show Python version
209+ run : |
210+ python --version
211+ which python
212+ pip --version
213+
214+ - name : Install dependencies
142215 uses : ./.github/actions/install
143216 with :
144- editable : true
145- hardware : " cpu "
217+ torch_version : ${{ matrix.torch_version }}
218+ hardware : ${{ matrix.hardware }}
146219 - name : Print packages in pip
147220 run : |
148221 pip show torch
@@ -153,15 +226,17 @@ jobs:
153226 - name : Run unit tests and generate coverage report
154227 run : |
155228 set -o pipefail # To propagate exit code from pytest
156- coverage run --source=graphnet -m pytest tests/ --ignore=tests/data/ --ignore=tests/deployment/ --ignore=tests/examples/ --ignore=tests/utilities
157- coverage run -a --source=graphnet -m pytest tests/utilities
158- coverage report -m
229+ pytest tests/examples --ignore=tests/examples/01_icetray/
159230
160231 docs :
161232 name : Documentation Compilation
162233 runs-on : ubuntu-22.04
163234 steps :
164- - uses : actions/checkout@v3
235+ - uses : actions/checkout@v4
236+ - name : Set up Python 3.10
237+ uses : actions/setup-python@v3
238+ with :
239+ python-version : " 3.10"
165240 - name : Install package
166241 uses : ./.github/actions/install
167242 - name : Build documentation
0 commit comments