@@ -126,7 +126,7 @@ jobs:
126126 MATRIX_PYTHON_VERSION : ${{ matrix.python-version }}
127127 run : |
128128 export > $GITHUB_WORKSPACE/env_dump.txt
129- bash $GITHUB_WORKSPACE/.github/workflows/ci_ubuntu .sh
129+ bash $GITHUB_WORKSPACE/.github/workflows/ci_build_wheel_ubuntu .sh
130130 - name : Create opengate_core Wheel Mac
131131 if : matrix.os == 'macos-15'
132132 env :
@@ -135,7 +135,7 @@ jobs:
135135 shell : bash -l {0}
136136 run : |
137137 export > $GITHUB_WORKSPACE/env_dump.txt
138- bash $GITHUB_WORKSPACE/.github/workflows/ci_macos .sh
138+ bash $GITHUB_WORKSPACE/.github/workflows/ci_build_wheel_macos .sh
139139 - name : Create opengate_core Wheel Windows
140140 if : matrix.os == 'windows-2025'
141141 env :
@@ -144,7 +144,7 @@ jobs:
144144 shell : bash -l {0}
145145 run : |
146146 export > $GITHUB_WORKSPACE\\env_dump.txt
147- bash $GITHUB_WORKSPACE\\.github\\workflows\\ci_windows .sh
147+ bash $GITHUB_WORKSPACE\\.github\\workflows\\ci_build_wheel_windows .sh
148148 - name : Upload wheels
149149 uses : actions/upload-artifact@v4
150150 with :
@@ -244,7 +244,7 @@ jobs:
244244 - name : Upload wheels
245245 uses : actions/upload-artifact@v4
246246 with :
247- name : dist-${{ matrix.os }}-${{ matrix.python-version }}-opengate-core
247+ name : dist-${{ matrix.os }}-${{ matrix.python-version }}-opengate-core-ci_or_tag
248248 path : dist/
249249
250250 build_opengate_core_novis_wheel :
@@ -327,6 +327,7 @@ jobs:
327327 run : |
328328 mkdir dist_opengate_core dist_opengate dist_opengate_core_novis
329329 mv dist/opengate_core_novis-* dist_opengate_core_novis/ || true
330+ mv dist/opengate_core_ci* dist_opengate_core/ || true
330331 mv dist/opengate_core-* dist_opengate_core/
331332 mv dist/opengate-* dist_opengate/
332333 - name : Publish to PyPI opengate_core_novis
@@ -401,7 +402,7 @@ jobs:
401402# NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
402403# SSH_PASS: ${{ secrets.SSH_PASS }}
403404
404- test_wheel :
405+ test_wheel_pr :
405406 runs-on : ${{ matrix.os }}
406407 needs : [build_opengate_wheel, build_opengate_core_wheel_pr]
407408 strategy :
@@ -413,85 +414,12 @@ jobs:
413414 - os : macos-15
414415 python-version : ' 3.10'
415416 steps :
416- - uses : actions/download-artifact@v4
417- with :
418- pattern : dist-*
419- merge-multiple : true
420- path : dist/
421- - name : Set up Python ${{ matrix.python-version }}
422- uses : actions/setup-python@v5
423- with :
424- python-version : ${{ matrix.python-version }}
425- - name : Run tests
426- shell : bash {0}
427- run : |
428- if [[ ${{ matrix.python-version }} == "3.10" ]]; then
429- export PYTHONFOLDER="cp310-cp310"
430- elif [[ ${{ matrix.python-version }} == "3.11" ]]; then
431- export PYTHONFOLDER="cp311-cp311"
432- elif [[ ${{ matrix.python-version }} == "3.12" ]]; then
433- export PYTHONFOLDER="cp312-cp312"
434- elif [[ ${{ matrix.python-version }} == "3.13" ]]; then
435- export PYTHONFOLDER="cp313-cp313"
436- fi
437- if [[ ${{ matrix.os }} == "ubuntu-24.04" ]]; then
438- export OSNAME="manylinux"
439- export PLATFORM="x86_"
440- pip install torch --extra-index-url https://download.pytorch.org/whl/cpu
441- elif [[ ${{ matrix.os }} == "macos-15" ]]; then
442- export OSNAME="macosx"
443- export PLATFORM="arm"
444- which python
445- python --version
446- pip install torch
447- elif [[ ${{ matrix.os }} == "windows-2025" ]]; then
448- export OSNAME="win"
449- export PLATFORM="amd"
450- pip install torch
451- fi
452- pip install SimpleITK
453- pip install "gaga_phsp>=0.7.6"
454- pip install dist/opengate_core-*-${PYTHONFOLDER}-${OSNAME}*_${PLATFORM}64.whl
455- pip install dist/opengate-*.whl
456- export GIT_SSL_NO_VERIFY=1
457- if [[ ${{ matrix.os }} == "ubuntu-24.04" ]]; then
458- path=`opengate_library_path.py -p site_packages`
459- export LD_LIBRARY_PATH="${path}/opengate_core.libs":${LD_LIBRARY_PATH}
460- fi
461- if [[ ${{ matrix.os }} == "windows-2025" ]]; then
462- path=`opengate_library_path.py -p site_packages`
463- export LD_LIBRARY_PATH="${path}/opengate_core.libs":${LD_LIBRARY_PATH}
464- export PATH="${path}\\opengate_core.libs":${PATH}
465- fi
466- dashboard_path=`opengate_library_path.py -p tests`
467- pip freeze
468- sha=${{ github.sha }}
469- sha=$sha$OSNAME$PYTHONFOLDER
470- if [ "${{ github.event_name }}" = "schedule" ]; then
471- OutputTest=$(opengate_tests)
472- else
473- OutputTest=$(opengate_tests -r -s $sha)
474- fi
475- echo "$OutputTest"
476- ls $dashboard_path/../output_dashboard/
477- cp -r $dashboard_path/../output_dashboard .
478- OutputTest=$(echo "$OutputTest" | tail -1)
479- if [[ "$OutputTest" != "True" ]]; then
480- exit -1
481- else
482- exit 0
483- fi
484- - name : Upload results
485- uses : actions/upload-artifact@v4
486- if : always()
487- with :
488- name : results_json-${{ matrix.os }}-${{ matrix.python-version }}
489- path : output_dashboard/dashboard_output*.json
417+ - uses : ./.github/workflows/actions
490418
491419 publish_test :
492420 runs-on : ubuntu-24.04
493421 if : ${{ (always()) && (github.ref == 'refs/heads/master') }}
494- needs : [test_wheel ]
422+ needs : [test_wheel_pr ]
495423 steps :
496424 - name : Checkout github repo
497425 uses : actions/checkout@v4
0 commit comments