diff --git a/.github/workflows/copyright.yml b/.github/workflows/copyright.yml index 03a8a7406..3cf47bc3b 100644 --- a/.github/workflows/copyright.yml +++ b/.github/workflows/copyright.yml @@ -8,33 +8,19 @@ on: pull_request: jobs: - # caching of these jobs: - # - docker-20-03-py3-pip- (shared) - # - ubuntu py37 pip- - # - os-latest-pip- (shared) copyright: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.9 - uses: actions/setup-python@v3 + - uses: actions/checkout@v6 + - name: Set up Python 3.10 + uses: actions/setup-python@v6 with: - python-version: 3.9 - - name: cache weekly timestamp - id: pip-cache - run: | - echo "::set-output name=datew::$(date '+%Y-%V')" - - name: cache for pip - uses: actions/cache@v3 - id: cache - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ steps.pip-cache.outputs.datew }} + python-version: '3.10' + cache: 'pip' - name: Install dependencies run: | find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \; - python -m pip install --upgrade pip wheel - python -m pip install -r https://raw.githubusercontent.com/Project-MONAI/MONAI/dev/requirements-dev.txt + python -m pip install --upgrade pip wheel wheel-stub python -m pip install -r requirements.txt - name: Copyright check run: | diff --git a/.github/workflows/guidelines.yml b/.github/workflows/guidelines.yml index 34540731d..3127e6eee 100644 --- a/.github/workflows/guidelines.yml +++ b/.github/workflows/guidelines.yml @@ -8,33 +8,19 @@ on: pull_request: jobs: - # caching of these jobs: - # - docker-20-03-py3-pip- (shared) - # - ubuntu py37 pip- - # - os-latest-pip- (shared) guidelines: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.9 - uses: actions/setup-python@v3 + - uses: actions/checkout@v6 + - name: Set up Python 3.10 + uses: actions/setup-python@v6 with: - python-version: 3.9 - - name: cache weekly timestamp - id: pip-cache - run: | - echo "::set-output name=datew::$(date '+%Y-%V')" - - name: cache for pip - uses: actions/cache@v3 - id: cache - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ steps.pip-cache.outputs.datew }} + python-version: '3.10' + cache: 'pip' - name: Install dependencies run: | find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \; - python -m pip install --upgrade pip wheel - python -m pip install -r https://raw.githubusercontent.com/Project-MONAI/MONAI/dev/requirements-dev.txt + python -m pip install --upgrade pip wheel wheel-stub python -m pip install -r requirements.txt - name: Guidelines notebook format check run: | diff --git a/.github/workflows/pep8.yml b/.github/workflows/pep8.yml index 2c48786f9..800edd56b 100644 --- a/.github/workflows/pep8.yml +++ b/.github/workflows/pep8.yml @@ -8,33 +8,19 @@ on: pull_request: jobs: - # caching of these jobs: - # - docker-20-03-py3-pip- (shared) - # - ubuntu py37 pip- - # - os-latest-pip- (shared) pep8: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.9 - uses: actions/setup-python@v3 + - uses: actions/checkout@v6 + - name: Set up Python 3.10 + uses: actions/setup-python@v6 with: - python-version: 3.9 - - name: cache weekly timestamp - id: pip-cache - run: | - echo "::set-output name=datew::$(date '+%Y-%V')" - - name: cache for pip - uses: actions/cache@v3 - id: cache - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ steps.pip-cache.outputs.datew }} + python-version: '3.10' + cache: 'pip' - name: Install dependencies run: | find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \; - python -m pip install --upgrade pip wheel - python -m pip install -r https://raw.githubusercontent.com/Project-MONAI/MONAI/dev/requirements-dev.txt + python -m pip install --upgrade pip wheel wheel-stub python -m pip install -r requirements.txt - name: PEP8 check run: | diff --git a/.github/workflows/test-modified.yml b/.github/workflows/test-modified.yml index 7ba65e228..974c27be1 100644 --- a/.github/workflows/test-modified.yml +++ b/.github/workflows/test-modified.yml @@ -16,11 +16,12 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: Set up Python 3.10 - uses: actions/setup-python@v3 + uses: actions/setup-python@v6 with: python-version: '3.10' + cache: 'pip' - name: Install MONAI id: monai-install env: @@ -30,17 +31,17 @@ jobs: find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \; df -h which python - python -m pip install -U pip wheel + python -m pip install -U pip wheel wheel-stub # Force CPU-only PyTorch wheels so we don't download huge CUDA/nvidia-* wheels in CI. # Keep PyPI available for torch's dependencies. - python -m pip install --index-url https://download.pytorch.org/whl/cpu --extra-index-url https://pypi.org/simple torch torchvision torchaudio + pip install --index-url https://download.pytorch.org/whl/cpu --extra-index-url https://pypi.org/simple torch torchvision torchaudio - python -m pip install -r https://raw.githubusercontent.com/Project-MONAI/MONAI/dev/requirements-dev.txt - python -m pip install -r requirements.txt + pip install --no-build-isolation -r https://raw.githubusercontent.com/Project-MONAI/MONAI/dev/requirements-dev.txt + pip install -r requirements.txt # Avoid PEP517 build isolation (which can re-install torch and pull CUDA wheels). - BUILD_MONAI=0 python -m pip install --no-build-isolation git+https://github.com/Project-MONAI/MONAI#egg=MONAI - python -m pip list + BUILD_MONAI=0 pip install --no-build-isolation git+https://github.com/Project-MONAI/MONAI#egg=MONAI + pip list - name: Notebook quick check shell: bash run: |