-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (42 loc) · 1.28 KB
/
run.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
name: run
on:
push:
branches: ['**']
tags: ['**']
paths-ignore: ['.gitignore', 'LICENSE*', 'LICENCE*', 'README.md', 'SIRF_data_preparation/*']
jobs:
check:
runs-on: ubuntu-latest
container:
image: ghcr.io/synerbi/sirf:latest
options: --user root # https://github.com/actions/checkout/issues/956
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
if test -f apt.txt; then
sudo apt-get update
xargs -a apt.txt sudo apt-get install -y
fi
if test -f environment.yml; then
conda install --file environment.yml
fi
if test -f requirements.txt; then
pip install -r requirements.txt
fi
- name: Test imports
run: |
python <<EOF
from main import Submission, submission_callbacks
from cil.optimisation.algorithms import Algorithm
assert issubclass(Submission, Algorithm)
assert isinstance(submission_callbacks, list)
assert all(callable(callback) for callback in submission_callbacks)
EOF
full:
if: startsWith(github.ref, 'refs/tags')
runs-on: [self-hosted, docker, cuda]
steps:
- uses: actions/checkout@v4
with: {fetch-depth: 0, submodules: recursive}
- run: petric