-
Notifications
You must be signed in to change notification settings - Fork 365
53 lines (50 loc) · 1.59 KB
/
build.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
# Continuous integration tests executed on push and pull request actions
# see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install system requirements
run: |
sudo xargs apt-get update
sudo xargs apt-get -y install < requirements.unix
- name: Install pip requirements
run: |
python -m pip install --upgrade pip
pip install -U -r requirements.txt
pip install -U pytest coveralls
pip install -U flake8
pip install -U setuptools wheel
- name: Build ops
run: |
bazel build tensorflow_graphics/... --define=BASEDIR=$(pwd) --sandbox_writable_path=$(pwd)
bazel clean --expunge
- name: Run python tests and coverage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MESA_GL_VERSION_OVERRIDE: 4.5
MESA_GLSL_VERSION_OVERRIDE: 450
run: |
coverage run --source tensorflow_graphics -m py.test
coveralls --service=github
- name: Linter
run: |
flake8 --config=.flake8 tensorflow_graphics/
- name: Build pip package and install
run: |
python setup.py sdist bdist_wheel
pip install dist/*.whl
- name: Test install
run: |
cd $(mktemp -d) && python -c 'import tensorflow_graphics as tfg'