cron-conda #576
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# daily tests for different OS with conda | |
name: cron-conda | |
on: | |
schedule: | |
- cron: "0 3 * * *" # at 03:00 UTC | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
concurrency: | |
# automatically cancel the previously triggered workflows when there's a newer version | |
group: conda-tests-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
cron-conda: | |
if: github.repository == 'Project-MONAI/MONAI' | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.9", "3.10"] | |
runs-on: ${{ matrix.os }} | |
env: | |
QUICKTEST: True | |
steps: | |
- if: runner.os == 'windows' | |
name: Config pagefile (Windows only) | |
uses: al-cheb/configure-pagefile-action@v1.4 | |
with: | |
minimum-size: 8GB | |
maximum-size: 16GB | |
disk-root: "D:" | |
- uses: actions/checkout@v4 | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
auto-activate-base: false | |
environment-file: environment-dev.yml | |
activate-environment: monai | |
- name: Env info (CPU ${{ runner.os }}) | |
shell: bash -el {0} | |
run: | | |
conda info | |
conda list | |
- if: runner.os == 'windows' | |
name: Windows only install | |
shell: bash -el {0} | |
run: | | |
conda activate monai | |
# this `cpuonly` and -c conda-forge is needed to reduce the paging file size on a github instance | |
# force to install `cpuonly==2.0.0` is to fix the same issue as: | |
# https://github.com/pytorch/vision/issues/4240 | |
conda install pytorch torchvision torchaudio cpuonly==2.0.0 -c pytorch -c conda-forge | |
conda deactivate | |
- name: Test env (CPU ${{ runner.os }}) | |
shell: bash -el {0} | |
run: | | |
conda activate monai | |
$(pwd)/runtests.sh --build --unittests | |
conda deactivate |