-
Notifications
You must be signed in to change notification settings - Fork 11
71 lines (59 loc) · 2.16 KB
/
Copy pathrun_extensive_test.yml
File metadata and controls
71 lines (59 loc) · 2.16 KB
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 will install Python dependencies, run tests using tox
name: Extensive Tox Tests
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
steps:
# Clean out runner data we don't use, should free up ~15 GB
- name: "Make space on runner by removing tools we don't need using rmz, a fast version of rm."
run: |
df -h
DOWNLOAD_URL="https://github.com/SUPERCILEX/fuc/releases/download/3.1.1/x86_64-unknown-linux-gnu-rmz"
time curl --location --output rmz "$DOWNLOAD_URL"
chmod +x rmz
sudo mv rmz /usr/bin/rmz
rmz --version
sudo time rmz --force \
/usr/share/swift || true
# Can be deleted: https://dev.to/mathio/squeezing-disk-space-from-github-actions-runners-an-engineers-guide-3pjg
df -h
- uses: actions/checkout@v4
# https://github.com/actions/cache
- name: Restore tox dir cache and save after run
id: restore-tox
uses: actions/cache@v4
env:
cache-name: cache-tox-data
with:
path: .tox
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('pyproject.toml', 'tox.ini', '.tox/*/CACHEDIR.TAG') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip' # caching pip dependencies
cache-dependency-path: |
pyproject.toml
tox.ini
- name: Install python dependencies
run: |
python -m pip install tox
- name: Fetch dataset (175M)
run: |
tox -e trainingdata
- name: Run inference_CI
run: |
tox -e inference_CI
# Show disk usage
- run: df -h
- run: du -hsc .tox/* ~/.cache/pip