Unverified Commit dce1f44d authored by Lingfan Yu's avatar Lingfan Yu Committed by GitHub
Browse files

CI lint check (#93)

* CI for lint check

* init submodule before run lint

* install ubuntu core for lint docker

* remove generator import in dgl
parent 3683a774
#!/usr/bin/env groovy #!/usr/bin/env groovy
def setup() { def init_git_submodule() {
sh 'easy_install nose'
sh 'git submodule init' sh 'git submodule init'
sh 'git submodule update' sh 'git submodule update'
} }
def setup() {
sh 'easy_install nose'
init_git_submodule()
}
def build_dgl() { def build_dgl() {
sh 'if [ -d build ]; then rm -rf build; fi; mkdir build' sh 'if [ -d build ]; then rm -rf build; fi; mkdir build'
dir('python') { dir('python') {
...@@ -36,6 +40,21 @@ def example_test(dev) { ...@@ -36,6 +40,21 @@ def example_test(dev) {
pipeline { pipeline {
agent none agent none
stages { stages {
stage('Lint Check') {
agent {
docker {
image 'lingfanyu/dgl-lint'
}
}
stages {
stage('CHECK') {
steps {
init_git_submodule()
sh 'tests/scripts/task_lint.sh'
}
}
}
}
stage('Build and Test') { stage('Build and Test') {
parallel { parallel {
stage('CPU') { stage('CPU') {
......
# CI docker for lint
# Adapted from github.com/dmlc/tvm/docker/Dockerfile.ci_lint
FROM ubuntu:16.04
COPY install/ubuntu_install_core.sh /install/ubuntu_install_core.sh
RUN bash /install/ubuntu_install_core.sh
COPY install/ubuntu_install_python.sh /install/ubuntu_install_python.sh
RUN bash /install/ubuntu_install_python.sh
RUN apt-get install -y doxygen graphviz
RUN pip3 install cpplint pylint mypy
...@@ -5,3 +5,6 @@ docker build -t dgl-cpu -f Dockerfile.ci_cpu . ...@@ -5,3 +5,6 @@ docker build -t dgl-cpu -f Dockerfile.ci_cpu .
### GPU image ### GPU image
docker build -t dgl-gpu -f Dockerfile.ci_gpu . docker build -t dgl-gpu -f Dockerfile.ci_gpu .
### Lint image
docker build -t dgl-lint -f Dockerfile.ci_lint .
from . import backend from . import backend
from . import data from . import data
from . import function from . import function
from . import generator
from . import nn from . import nn
from ._ffi.runtime_ctypes import TypeCode from ._ffi.runtime_ctypes import TypeCode
...@@ -10,6 +9,5 @@ from ._ffi.base import DGLError, __version__ ...@@ -10,6 +9,5 @@ from ._ffi.base import DGLError, __version__
from .base import ALL from .base import ALL
from .batched_graph import * from .batched_graph import *
from .generator import *
from .graph import DGLGraph from .graph import DGLGraph
from .subgraph import DGLSubGraph from .subgraph import DGLSubGraph
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment