-
Notifications
You must be signed in to change notification settings - Fork 11
54 lines (45 loc) · 1.37 KB
/
build-test.yml
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
# This workflow will upload a Python Package to Release asset
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions
name: Build Test
on:
# push or pull request to main or dev branch
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Free disk space
run: |
sudo rm -rf /usr/local/cuda-* /opt/cuda
sudo rm -rf /usr/local/cuda
bash -x .github/workflows/scripts/free-disk-space.sh
- name: Cache Python packages
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install CUDA 11.7
run: |
bash -x .github/workflows/scripts/cuda-install.sh 11.7 ubuntu-20.04
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install build
- name: Build package
run: BUILD_OPS=1 python -m build