diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index 07f9096e..d1790f63 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -251,3 +251,44 @@ jobs: run: anaconda --token ${{ env.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.whl --version ${{ env.PACKAGE_VERSION }} env: ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }} + + cleanup_packages: + name: Clean up anaconda packages + strategy: + fail-fast: false + matrix: + repository: [ + "dppy/dpctl", + "dppy/dpnp", + "dppy/numba-dpex", + "dppy/numba-mlir", + "dppy/dpbench", + "dppy/dpcpp-llvm-spirv", + ] + runs-on: 'ubuntu-latest' + defaults: + run: + shell: bash -el {0} + steps: + - uses: conda-incubator/setup-miniconda@v2 + with: + run-post: false + channel-priority: "disabled" + channels: conda-forge + python-version: "3.11" + + - name: Install anaconda-client + run: conda install anaconda-client + + - name: Checkout repo + uses: actions/checkout@v2 + with: + repository: IntelPython/devops-tools + fetch-depth: 0 + + - name: Cleanup old packages + run: | + python scripts/cleanup-old-packages.py \ + --verbose --dry-run \ + --package ${{matrix.repository}} --label dev \ + --max-priority 2