-
Notifications
You must be signed in to change notification settings - Fork 63
86 lines (73 loc) · 2.39 KB
/
ci.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
name: CI
on:
push:
branches:
- development
- stable
pull_request:
schedule:
- cron: 0 0 * * 0 # weekly
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install build dependencies
uses: ./.github/actions/install-build-dependencies
- name: Build Python wheel
run: |
make bdist_wheel
if [ "$(uname)" != "Darwin" ]; then
make bdist_wheel-linux-rename
fi
env:
CC: clang
CXX: clang++
BAZEL_OPTS: --batch
BAZEL_FETCH_OPTS: --config=ci
BAZEL_BUILD_OPTS: --config=ci
- name: Upload Python wheel
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.os }}-wheel
path: dist/*.whl
if-no-files-found: error
retention-days: 7
test:
needs: build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python: [3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Download Python wheel
uses: actions/download-artifact@v2
with:
name: ${{ matrix.os }}-wheel
- name: Install wheel
run: python -m pip install *.whl
- name: Install test dependencies
run: python -m pip install -r tests/requirements.txt
# DGL creates ~/.dgl on first run and I have found that this will fail
# if run from pytest.
- name: Initialize DGL
run: |
python -c 'import dgl; print(dgl.__version__)'
shell: bash
- name: Test
run: make install-test