forked from Emerge-Lab/PufferDrive
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (68 loc) · 1.98 KB
/
Copy pathinstall.yml
File metadata and controls
82 lines (68 loc) · 1.98 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
72
73
74
75
76
77
78
79
80
81
82
name: install
on:
push:
pull_request:
jobs:
pre-commit:
name: pre-commit
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Run pre-commit on all files
uses: pre-commit/action@v3.0.1
with:
extra_args: --all-files --show-diff-on-failure
test:
name: test ${{ matrix.py }} - ${{ matrix.os }} - ${{ matrix.env }}
needs: pre-commit
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
py: ["3.11", "3.10"]
env: ["pip"]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Conda
if: matrix.env == 'conda'
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.py }}
miniconda-version: "latest"
activate-environment: test-env
auto-update-conda: true
- name: Setup Python for pip
if: matrix.env == 'pip'
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py }}
- name: Check disk space (before cleanup)
if: runner.os == 'Linux'
run: df -h
- name: Free up disk space (Linux only)
if: runner.os == 'Linux'
run: |
echo "Before cleanup:"
df -h
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
sudo apt-get clean
sudo rm -rf ~/.cache/pip /tmp/* /var/tmp/*
echo "After cleanup:"
df -h
- name: Upgrade pip
run: python -m pip install -U pip
- name: Check disk space (before install)
if: runner.os == 'Linux'
run: df -h
- name: Install pufferlib
run: pip install -e .
- name: Check disk space (after install)
if: runner.os == 'Linux'
run: df -h