Skip to content

Commit 93d0304

Browse files
committed
introduce travis ci
1 parent 95188ef commit 93d0304

File tree

6 files changed

+45
-6
lines changed

6 files changed

+45
-6
lines changed

.travis.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
language: python
2+
python:
3+
- 2.7
4+
- 3.4
5+
env:
6+
- EXE_TRAVIS=1
7+
cache: apt
8+
before_install:
9+
- sudo apt-get install iverilog
10+
- sudo apt-get install graphviz
11+
- pip install pygraphviz jinja2
12+
before_script:
13+
- pip freeze
14+
script:
15+
# - export EXE_TRAVIS=1
16+
- make

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.PHONY: all
22
all:
3+
export PYTHON=python3
4+
export PYTHON27=python2.7
35
make -C ./pyverilog
46

57
.PHONY: clean

pyverilog/ast_code_generator/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
PYTHON=python3
1+
ifndef EXE_TRAVIS
2+
PYTHON=python3
3+
else
4+
PYTHON=python
5+
endif
26
#OPT=-m pdb
37
#OPT=-m cProfile -s time
48
#OPT=-m cProfile -o profile.rslt

pyverilog/controlflow/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
ifndef EXE_TRAVIS
2+
PYTHON=python3
3+
else
4+
PYTHON=python
5+
endif
16
PYTHON=python3
27
#PYTHON=python2.7
38
#OPT=-m pdb

pyverilog/dataflow/Makefile

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
PYTHON=python3
1+
ifndef EXE_TRAVIS
2+
PYTHON=python3
3+
else
4+
PYTHON=python
5+
endif
26
#PYTHON=python2.7
37
PYTHON27=python2.7
48
#OPT=-m pdb
@@ -42,11 +46,18 @@ subset:
4246

4347
.PHONY: codegen
4448
codegen:
45-
$(PYTHON) $(OPT) $(CODEGEN) $(SRCS) $(TOP) $(TARGETS) $(CODEGEN_OPT)
49+
$(PYTHON) $(OPT) $(CODEGEN) $(SRCS) $(TOP) $(TARGETS) $(CODEGEN_OPT)
4650

4751
.PHONY: graphgen
4852
graphgen:
49-
$(PYTHON27) $(OPT) $(GRAPHGEN) $(SRCS) $(TOP) $(TARGETS) $(GRAPHGEN_OPT)
53+
ifdef EXE_TRAVIS
54+
ifdef EXE_GRAPHGEN
55+
python --version
56+
$(PYTHON) $(OPT) $(GRAPHGEN) $(SRCS) $(TOP) $(TARGETS) $(GRAPHGEN_OPT)
57+
endif
58+
else
59+
$(PYTHON27) $(OPT) $(GRAPHGEN) $(SRCS) $(TOP) $(TARGETS) $(GRAPHGEN_OPT)
60+
endif
5061

5162
.PHONY: clean
5263
clean:

tests/ast_code_generator_test/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
TEST=*.py
22
ARGS=
3-
4-
PYTHON=python3
3+
if [ -z "${PYTHON}" ];then
4+
PYTHON=python3
5+
fi
56
#PYTHON=python
67
#OPT=-m pdb
78
#OPT=-m cProfile -s time

0 commit comments

Comments
 (0)