Skip to content

Commit 0e25dd6

Browse files
committed
update workflow to be explicit about freesurfer
1 parent 6f64f07 commit 0e25dd6

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

.github/workflows/run_on_test_data.yaml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@ name: Run petdeface on test data
22

33
on:
44
workflow_dispatch:
5+
push:
6+
branches: [ main, dev ]
7+
paths:
8+
- 'petdeface/**'
9+
- 'pyproject.toml'
10+
- 'uv.lock'
511
pull_request:
12+
branches: [ main, dev ]
613
paths:
714
- 'petdeface/**'
815
- 'pyproject.toml'
@@ -11,6 +18,8 @@ on:
1118
jobs:
1219
test-petdeface:
1320
runs-on: self-hosted
21+
env:
22+
FREESURFER_HOME: /usr/local/freesurfer/7.4.1
1423

1524
steps:
1625
- name: Checkout repository
@@ -26,6 +35,21 @@ jobs:
2635
with:
2736
version: latest
2837

38+
- name: Setup FreeSurfer environment
39+
run: |
40+
# Add FreeSurfer to PATH
41+
export PATH=$FREESURFER_HOME:$PATH
42+
43+
# Source FreeSurfer setup script if it exists
44+
if [ -f "$FREESURFER_HOME/SetUpFreeSurfer.sh" ]; then
45+
source $FREESURFER_HOME/SetUpFreeSurfer.sh
46+
fi
47+
48+
# Check if FreeSurfer is available
49+
which mideface || echo "mideface not found in PATH"
50+
echo "FREESURFER_HOME: $FREESURFER_HOME"
51+
echo "PATH: $PATH"
52+
2953
- name: Build package with uv
3054
run: |
3155
uv build
@@ -36,5 +60,5 @@ jobs:
3660
3761
- name: Run petdeface on test data with uv run
3862
run: |
39-
uv run --with dist/*.whl petdeface petdeface/data/ data_defaced/ --participant-label sub-01
63+
uv run --with dist/*.whl petdeface petdeface/data/ data_defaced/ participant --participant-label sub-01
4064

0 commit comments

Comments
 (0)