Tests on CPU (scheduled) #518
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
name: Tests on CPU (scheduled) | |
on: | |
push: | |
branches: [main, test-me-*] | |
schedule: | |
- cron: "0 4 * * *" | |
workflow_call: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
pre-tests: | |
runs-on: ubuntu-latest | |
outputs: | |
hash: ${{ steps.hashid.outputs.weights-hash }} | |
steps: | |
- uses: kornia/workflows/.github/actions/env@v1.13.0 | |
- uses: actions/cache@v4 | |
id: cache-weights | |
with: | |
path: weights/ | |
key: model-weights-${{ hashFiles('.github/download-models-weights.py') }} | |
enableCrossOsArchive: true | |
- name: Download models weights... | |
if: steps.cache-weights.outputs.cache-hit != 'true' | |
run: python .github/download-models-weights.py -t weights/ | |
- name: write hashid | |
id: hashid | |
run: echo "weights-hash=${{ hashFiles('.github/download-models-weights.py') }}" >> "$GITHUB_OUTPUT" | |
tests-cpu-ubuntu: | |
needs: [pre-tests] | |
strategy: | |
fail-fast: false | |
matrix: | |
# os: ['Ubuntu-latest', 'Windows-latest', 'MacOS-latest'] | |
pytorch-dtype: ['float32', 'float64'] | |
uses: kornia/workflows/.github/workflows/tests.yml@v1.13.0 | |
with: | |
os: 'Ubuntu-latest' | |
python-version: '["3.9", "3.10", "3.11", "3.12"]' | |
pytorch-version: '["1.9.1", "1.10.2", "1.11.0", "1.12.1", "1.13.1", "2.0.1", "2.1.2", "2.2.2", "2.3.1", "2.4.0", "2.5.1"]' | |
pytorch-dtype: ${{ matrix.pytorch-dtype }} | |
pytest-extra: '--runslow' | |
cache-path: weights/ | |
cache-key: model-weights-${{ needs.pre-tests.outputs.hash }} | |
cache-restore-keys: | | |
model-weights-${{ needs.pre-tests.outputs.hash }} | |
model-weights- | |
tests-cpu-windows: | |
needs: [pre-tests] | |
strategy: | |
fail-fast: true | |
matrix: | |
pytorch-dtype: ['float32', 'float64'] | |
uses: kornia/workflows/.github/workflows/tests.yml@v1.13.0 | |
with: | |
os: 'Windows-latest' | |
python-version: '["3.12"]' | |
pytorch-version: '["1.9.1", "2.5.1"]' | |
pytorch-dtype: ${{ matrix.pytorch-dtype }} | |
cache-path: weights/ | |
cache-key: model-weights-${{ needs.pre-tests.outputs.hash }} | |
cache-restore-keys: | | |
model-weights-${{ needs.pre-tests.outputs.hash }} | |
model-weights- | |
tests-cpu-mac: | |
needs: [pre-tests] | |
strategy: | |
fail-fast: true | |
matrix: | |
pytorch-dtype: ['float32', 'float64'] | |
uses: kornia/workflows/.github/workflows/tests.yml@v1.13.0 | |
with: | |
os: 'MacOS-latest' | |
pytorch-dtype: ${{ matrix.pytorch-dtype }} | |
cache-path: weights/ | |
cache-key: model-weights-${{ needs.pre-tests.outputs.hash }} | |
cache-restore-keys: | | |
model-weights-${{ needs.pre-tests.outputs.hash }} | |
model-weights- | |
coverage: | |
needs: [pre-tests] | |
uses: kornia/workflows/.github/workflows/coverage.yml@v1.13.0 | |
with: | |
cache-path: weights/ | |
cache-key: model-weights-${{ needs.pre-tests.outputs.hash }} | |
cache-restore-keys: | | |
model-weights-${{ needs.pre-tests.outputs.hash }} | |
model-weights- | |
typing: | |
uses: kornia/workflows/.github/workflows/mypy.yml@v1.13.0 | |
tutorials: | |
uses: kornia/workflows/.github/workflows/tutorials.yml@v1.13.0 | |
docs: | |
needs: [pre-tests] | |
uses: kornia/workflows/.github/workflows/docs.yml@v1.13.0 | |
with: | |
python-version: '["3.11"]' | |
cache-path: weights/ | |
cache-key: model-weights-${{ needs.pre-tests.outputs.hash }} | |
cache-restore-keys: | | |
model-weights-${{ needs.pre-tests.outputs.hash }} | |
model-weights- |