Prune-Nightly #1433
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
# 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://[email protected]/tlc-pack/tlc-pack.github.io | |
cd tlc-pack.github.io | |
git config user.name tlcpack-archiver | |
git config user.email [email protected] | |
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 |