mirror of https://github.com/openXC7/prjxray.git
infra: Refactor travis.
* Use build stages to be clearer. * Run Python / C++ tests / Format separately. * Reduce duplication Signed-off-by: Tim 'mithro' Ansell <me@mith.ro>
This commit is contained in:
parent
0def5b2eeb
commit
463000bafd
68
.travis.yml
68
.travis.yml
|
|
@ -1,43 +1,33 @@
|
|||
matrix:
|
||||
os: linux
|
||||
dist: trusty
|
||||
language: python
|
||||
python: 3.6
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-trusty-5.0
|
||||
packages:
|
||||
- clang-format-5.0
|
||||
- g++-6
|
||||
|
||||
install:
|
||||
- export CC=gcc-6
|
||||
- export CXX=g++-6
|
||||
- make env
|
||||
|
||||
|
||||
jobs:
|
||||
include:
|
||||
# Job 1) Runs the tests
|
||||
- os: linux
|
||||
dist: trusty
|
||||
language: python
|
||||
python: 3.6
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- g++-6
|
||||
install:
|
||||
- export CC=gcc-6
|
||||
- export CXX=g++-6
|
||||
- make env
|
||||
# State 1 - Tests
|
||||
- stage: "Tests"
|
||||
name: "C++ Tests"
|
||||
script: make test-cpp
|
||||
|
||||
- name: "Python Tests"
|
||||
script: make test-py
|
||||
|
||||
- name: "Format"
|
||||
script:
|
||||
- export CC=gcc-6
|
||||
- export CXX=g++-6
|
||||
- make test
|
||||
# Job 2) Checks the formatting
|
||||
- os: linux
|
||||
dist: trusty
|
||||
language: python
|
||||
python: 3.6
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- llvm-toolchain-trusty-5.0
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- clang-format-5.0
|
||||
- g++-6
|
||||
install:
|
||||
- export CC=gcc-6
|
||||
- export CXX=g++-6
|
||||
- make env
|
||||
script:
|
||||
- export CC=gcc-6
|
||||
- export CXX=g++-6
|
||||
- make format
|
||||
- test $(git status --porcelain | wc -l) -eq 0 || { git diff; false; }
|
||||
|
|
|
|||
Loading…
Reference in New Issue