-
Notifications
You must be signed in to change notification settings - Fork 30
71 lines (68 loc) · 2.39 KB
/
prune_nightly.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# 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