@@ -33,51 +33,101 @@ 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
@@ -89,25 +139,36 @@ jobs:
89139 with :
90140 coverageCommand : coverage report
91141 coverageLocations : coverage.xml:coverage.py
142+
92143
93- build-matrix :
94- name : Unit tests - Python versions
144+ build-matrix-examples :
145+ name : Examples - Ubuntu 22.04
95146 runs-on : ubuntu-22.04
96147 strategy :
97148 matrix :
98- python-version : [3.8, 3.9, '3.10', '3.11']
149+ python-version : ['3.11']
150+ torch_version : ['2.7.0', '2.6.0', '2.5.0']
151+ hardware : ["cpu"]
99152 steps :
100- - uses : actions/checkout@v3
153+ - uses : actions/checkout@v4
101154 - name : Set up Python ${{ matrix.python-version }}
102155 uses : actions/setup-python@v4
103156 with :
104157 python-version : ${{ matrix.python-version }}
105158 - name : Print available disk space before graphnet install
106159 run : df -h
160+ - name : Show existing environment
161+ run : |
162+ echo "PIP_FLAGS=${PIP_FLAGS}"
163+ python --version
164+ pip --version
165+ pip debug --verbose
107166 - name : Install package
108167 uses : ./.github/actions/install
109168 with :
110169 editable : true
170+ torch_version : ${{ matrix.torch_version }}
171+ hardware : ${{ matrix.hardware }}
111172 - name : Print available disk space after graphnet install
112173 run : df -h
113174 - name : Print packages in pip
@@ -117,32 +178,45 @@ jobs:
117178 pip show torch-cluster
118179 pip show torch-sparse
119180 pip show torch-scatter
181+ pip show dill
120182 pip show numpy
121-
122-
123183 - name : Run unit tests and generate coverage report
124184 run : |
125185 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
186+ pytest tests/examples --ignore=tests/examples/01_icetray/
129187 - name : Print available disk space after unit tests
130188 run : df -h
131189
132- build-macos :
133- name : Unit tests - macOS
134- runs-on : macos-13
190+ build-macos-examples :
191+ # Runtime on macOS is multiplied with a factor 10 by github. Minimize!
192+ name : Examples - macOS 15
193+ runs-on : macos-15
194+ strategy :
195+ fail-fast : false
196+ matrix :
197+ python-version : ['3.11']
198+ torch_version : ['2.7.0']
199+ hardware : ["cpu"]
200+
135201 steps :
136- - uses : actions/checkout@v3
137- - name : Set up Python 3.8
138- uses : actions/setup-python@v4
202+ - uses : actions/checkout@v4
203+
204+ - name : Set up Python ${{ matrix.python-version }}
205+ uses : actions/setup-python@v5
139206 with :
140- python-version : 3.8
141- - name : Install package
207+ python-version : ${{ matrix.python-version }}
208+
209+ - name : Show Python version
210+ run : |
211+ python --version
212+ which python
213+ pip --version
214+
215+ - name : Install dependencies
142216 uses : ./.github/actions/install
143217 with :
144- editable : true
145- hardware : " cpu "
218+ torch_version : ${{ matrix.torch_version }}
219+ hardware : ${{ matrix.hardware }}
146220 - name : Print packages in pip
147221 run : |
148222 pip show torch
@@ -153,15 +227,17 @@ jobs:
153227 - name : Run unit tests and generate coverage report
154228 run : |
155229 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
230+ pytest tests/examples --ignore=tests/examples/01_icetray/
159231
160232 docs :
161233 name : Documentation Compilation
162234 runs-on : ubuntu-22.04
163235 steps :
164- - uses : actions/checkout@v3
236+ - uses : actions/checkout@v4
237+ - name : Set up Python 3.10
238+ uses : actions/setup-python@v3
239+ with :
240+ python-version : " 3.10"
165241 - name : Install package
166242 uses : ./.github/actions/install
167243 - name : Build documentation
0 commit comments