Skip to content

Enforcing unit8 and float32 types in the prediction files #55

Enforcing unit8 and float32 types in the prediction files

Enforcing unit8 and float32 types in the prediction files #55

Workflow file for this run

name: Build Universal Wheel
on:
push:
branches: [ master,update ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-22.04
TARGET: ubuntu
CMD_BUILD: python -m build --wheel
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install dependencies
run: |
pip install --upgrade pip
pip install build
- name: Built wheel for ${{matrix.TARGET}}
run: ${{matrix.CMD_BUILD}}
- name: Upload Python wheel
uses: actions/upload-artifact@v4
with:
name: Python wheel
path: ${{github.workspace}}/dist/raidionicsseg-*.whl
if-no-files-found: error
setup-test-data:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Download test resources
working-directory: tests
run: |
pip install requests
python -c "from download_resources import download_resources; download_resources('../test_data')"
- name: Upload test resources
uses: actions/upload-artifact@v4
with:
name: test-resources
path: ./test_data
test:
needs: [build, setup-test-data]
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-22.04
python-version: "3.9"
- os: ubuntu-22.04
python-version: "3.10"
- os: ubuntu-22.04
python-version: "3.11"
- os: ubuntu-22.04
python-version: "3.12"
- os: ubuntu-22.04
python-version: "3.13"
- os: ubuntu-24.04
python-version: "3.9"
- os: ubuntu-24.04
python-version: "3.10"
- os: ubuntu-24.04
python-version: "3.11"
- os: ubuntu-24.04
python-version: "3.12"
- os: ubuntu-24.04
python-version: "3.13"
- os: windows-2022
python-version: "3.9"
- os: windows-2022
python-version: "3.10"
- os: windows-2022
python-version: "3.11"
- os: windows-2022
python-version: "3.12"
- os: windows-2022
python-version: "3.13"
- os: windows-2025
python-version: "3.9"
- os: windows-2025
python-version: "3.10"
- os: windows-2025
python-version: "3.11"
- os: windows-2025
python-version: "3.12"
- os: windows-2025
python-version: "3.13"
- os: macos-13
python-version: "3.9"
- os: macos-13
python-version: "3.10"
- os: macos-13
python-version: "3.11"
- os: macos-13
python-version: "3.12"
- os: macos-14
python-version: "3.10"
- os: macos-14
python-version: "3.11"
- os: macos-14
python-version: "3.12"
- os: macos-14
python-version: "3.13"
- os: macos-15
python-version: "3.10"
- os: macos-15
python-version: "3.11"
- os: macos-15
python-version: "3.12"
- os: macos-15
python-version: "3.13"
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: "Python wheel"
- name: Install wheel
run: |
python -m pip install --upgrade pip
pip install --find-links=${{github.workspace}} --no-cache-dir --force-reinstall raidionicsseg-*
shell: bash
- name: Test CLI
run: raidionicsseg --help
- name: Clone repo
uses: actions/checkout@v4
- name: Cleanup test environment on Linux/macOS
if: runner.os != 'Windows'
run: rm -rf test_env/
- name: Cleanup test environment on Windows
if: runner.os == 'Windows'
shell: pwsh
run: |
if (Test-Path "test_env") {
Remove-Item -Recurse -Force "test_env"
}
- name: Create clean test environment
run: |
mkdir test_env
cp -r tests test_env/
- name: Download test resources
uses: actions/download-artifact@v4
with:
name: test-resources
path: ./test-env/unit_tests_results_dir
- name: Integration tests
run: |
pip install pytest pytest-cov pytest-timeout requests
cd test_env
pytest -vvv --cov=raidionicsseg tests/generic_tests --cov-report=xml --timeout=1500 --log-cli-level=DEBUG
- name: Upload coverage to Codecov
if: ${{ matrix.os == 'ubuntu-22.04' && matrix.python-version == '3.9' }}
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: dbouget/raidionics_seg_lib
verbose: true