diff --git a/.github/workflows/pr_test_cpu.yml b/.github/workflows/pr_test_cpu.yml index 3ffc690ebd..4a91f22109 100644 --- a/.github/workflows/pr_test_cpu.yml +++ b/.github/workflows/pr_test_cpu.yml @@ -19,7 +19,7 @@ jobs: outputs: hash: ${{ steps.hashid.outputs.weights-hash }} steps: - - uses: kornia/workflows/.github/actions/env@v1.11.0 + - uses: kornia/workflows/.github/actions/env@v1.12.0 - uses: actions/cache@v4 id: cache-weights with: @@ -43,8 +43,7 @@ jobs: os: ['Ubuntu-latest', 'Windows-latest'] pytorch-dtype: ['float32', 'float64'] - # TODO: release this workflow - uses: kornia/workflows/.github/workflows/tests.yml@main + uses: kornia/workflows/.github/workflows/tests.yml@v1.12.0 with: os: ${{ matrix.os }} python-version: '["3.8", "3.12"]' @@ -57,7 +56,8 @@ jobs: model-weights- tests-cpu-macos: - uses: kornia/workflows/.github/workflows/tests.yml@main + needs: [pre-tests] + uses: kornia/workflows/.github/workflows/tests.yml@v1.12.0 with: os: 'MacOS-latest' python-version: '["3.8", "3.12"]' @@ -70,7 +70,8 @@ jobs: coverage: - uses: kornia/workflows/.github/workflows/coverage.yml@main + needs: [pre-tests] + uses: kornia/workflows/.github/workflows/coverage.yml@v1.12.0 with: cache-path: weights/ cache-key: model-weights-${{ needs.pre-tests.outputs.hash }} @@ -79,13 +80,14 @@ jobs: model-weights- typing: - uses: kornia/workflows/.github/workflows/mypy.yml@v1.10.1 + uses: kornia/workflows/.github/workflows/mypy.yml@v1.12.0 tutorials: - uses: kornia/workflows/.github/workflows/tutorials.yml@v1.10.1 + uses: kornia/workflows/.github/workflows/tutorials.yml@v1.12.0 docs: - uses: kornia/workflows/.github/workflows/docs.yml@main + needs: [pre-tests] + uses: kornia/workflows/.github/workflows/docs.yml@v1.12.0 with: python-version: '["3.11"]' cache-path: weights/ @@ -94,7 +96,6 @@ jobs: model-weights-${{ needs.pre-tests.outputs.hash }} model-weights- - collector: needs: [coverage, tests-cpu, tutorials, typing, docs] if: always() @@ -106,6 +107,7 @@ jobs: tests-nightly: if: contains(github.event.pull_request.labels.*.name, 'nightly') + needs: [pre-tests] name: ${{ matrix.os }} - torch-nightly, ${{ matrix.pytorch-dtype }} strategy: @@ -114,7 +116,7 @@ jobs: os: ['Ubuntu-latest', 'Windows-latest'] #, 'MacOS-latest'] add it when https://github.com/pytorch/pytorch/pull/89262 be merged pytorch-dtype: ['float32', 'float64'] - uses: kornia/workflows/.github/workflows/tests.yml@main + uses: kornia/workflows/.github/workflows/tests.yml@v1.12.0 with: os: ${{ matrix.os }} pytorch-version: '["nightly"]' diff --git a/.github/workflows/scheduled_test_cpu.yml b/.github/workflows/scheduled_test_cpu.yml index 305ecdc27c..97f3acaeb7 100644 --- a/.github/workflows/scheduled_test_cpu.yml +++ b/.github/workflows/scheduled_test_cpu.yml @@ -11,57 +11,107 @@ concurrency: 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.12.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.10.1 + uses: kornia/workflows/.github/workflows/tests.yml@v1.12.0 with: os: 'Ubuntu-latest' python-version: '["3.8", "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"]' 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.10.1 + uses: kornia/workflows/.github/workflows/tests.yml@v1.12.0 with: os: 'Windows-latest' python-version: '["3.12"]' pytorch-version: '["1.9.1", "2.3.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.10.1 + uses: kornia/workflows/.github/workflows/tests.yml@v1.12.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: - uses: kornia/workflows/.github/workflows/coverage.yml@v1.10.1 + needs: [pre-tests] + uses: kornia/workflows/.github/workflows/coverage.yml@v1.12.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.10.1 + uses: kornia/workflows/.github/workflows/mypy.yml@v1.12.0 tutorials: - uses: kornia/workflows/.github/workflows/tutorials.yml@v1.10.1 + uses: kornia/workflows/.github/workflows/tutorials.yml@v1.12.0 docs: - uses: kornia/workflows/.github/workflows/docs.yml@v1.10.1 + needs: [pre-tests] + uses: kornia/workflows/.github/workflows/docs.yml@v1.12.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-