Skip to content

Prune-Nightly

Prune-Nightly #1554

# This workflow prunes the conda and pip nightly repo
# to remove old nightly builds (to keep the storage cost minimal).
# We also synchronize the wheel release page in the main website
# to list all the latest wheel uploded.
name: Prune-Nightly
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '0 8 * * *' # 8 AM UTC
jobs:
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
env:
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('conda/build-environment.yaml') }}
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: tlcpack-build
channel-priority: strict
environment-file: conda/build-environment.yaml
auto-activate-base: false
use-only-tar-bz2: true
- name: Conda info
run: |
conda info
conda list
- name: Wheel-Site-Checkout
if: github.ref == 'refs/heads/main'
env:
GITHUB_TOKEN: ${{ secrets.TLCPACK_GITHUB_TOKEN }}
run: |
git clone https://$GITHUB_TOKEN@github.com/tlc-pack/tlc-pack.github.io
cd tlc-pack.github.io
git config user.name tlcpack-archiver
git config user.email 73483364+tlcpack-archiver@users.noreply.github.com
cd ..
- name: Wheel-Prune-Sync
if: github.ref == 'refs/heads/main'
shell: bash -l {0}
env:
GITHUB_TOKEN: ${{ secrets.TLCPACK_GITHUB_TOKEN }}
run: >-
python -m pip install github3.py requests &&
python wheel/wheel_prune_and_sync.py
- name: Conda-Prune
if: github.ref == 'refs/heads/main'
shell: bash -l {0}
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: >-
python conda/anaconda_prune.py tlcpack/tlcpack-nightly &&
python conda/anaconda_prune.py tlcpack/tlcpack-nightly-libs &&
python conda/anaconda_prune.py tlcpack/tlcpack-nightly-cu100 &&
python conda/anaconda_prune.py tlcpack/tlcpack-nightly-cu100-libs &&
python conda/anaconda_prune.py tlcpack/tlcpack-nightly-cu101 &&
python conda/anaconda_prune.py tlcpack/tlcpack-nightly-cu101-libs &&
python conda/anaconda_prune.py tlcpack/tlcpack-nightly-cu102 &&
python conda/anaconda_prune.py tlcpack/tlcpack-nightly-cu102-libs