Skip to content

Commit

Permalink
CI lint check (dmlc#93)
Browse files Browse the repository at this point in the history
* CI for lint check

* init submodule before run lint

* install ubuntu core for lint docker

* remove generator import in dgl
  • Loading branch information
lingfanyu authored Oct 19, 2018
1 parent 3683a77 commit dce1f44
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 4 deletions.
23 changes: 21 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
#!/usr/bin/env groovy

def setup() {
sh 'easy_install nose'
def init_git_submodule() {
sh 'git submodule init'
sh 'git submodule update'
}

def setup() {
sh 'easy_install nose'
init_git_submodule()
}

def build_dgl() {
sh 'if [ -d build ]; then rm -rf build; fi; mkdir build'
dir('python') {
Expand Down Expand Up @@ -36,6 +40,21 @@ def example_test(dev) {
pipeline {
agent none
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') {
parallel {
stage('CPU') {
Expand Down
14 changes: 14 additions & 0 deletions docker/Dockerfile.ci_lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# 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
3 changes: 3 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ docker build -t dgl-cpu -f Dockerfile.ci_cpu .

### GPU image
docker build -t dgl-gpu -f Dockerfile.ci_gpu .

### Lint image
docker build -t dgl-lint -f Dockerfile.ci_lint .
2 changes: 0 additions & 2 deletions python/dgl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from . import backend
from . import data
from . import function
from . import generator
from . import nn

from ._ffi.runtime_ctypes import TypeCode
Expand All @@ -10,6 +9,5 @@

from .base import ALL
from .batched_graph import *
from .generator import *
from .graph import DGLGraph
from .subgraph import DGLSubGraph

0 comments on commit dce1f44

Please sign in to comment.