Skip to content

Commit

Permalink
Merge branch improved_structure into master.
Browse files Browse the repository at this point in the history
- Using a more OO approach, a lot of if-statements vanish as we now have lists of different classes [executables, header-only libraries, shared libraries, static libraries] that all know what to do when they are asked to compile/link. This structure is also easily extendable with new types without the need to change one giant function in a lot of places
- Following this OO approach the assembly of all targets was redesigned so that a target can assemble itself. For this, the targets mentioned in the toml file are first put into a dependency graph and topologically sorted. After this they can be easily constructed serially
- Output is now done via logging, allowing easy filtering of output dependent on user input
- Dialect check is done without temporary files
- Using the pathlib2 library instead of concatenating strings
- Adapted some naming to more standardish naming schemes in python (WIP)
- Using python unittests for the testing
- Disentangled the build function from the argument parsing
  • Loading branch information
GPMueller authored Apr 19, 2018
2 parents 79cc6bd + 4dfe2a8 commit a7bbc88
Show file tree
Hide file tree
Showing 343 changed files with 1,574 additions and 1,183 deletions.
20 changes: 11 additions & 9 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,20 @@ install:
test_script:
# test/hello
- "%PYTHON%/python setup.py develop"
- "clang-build -d\"test/hello\" -V"
- 'build\default\bin\main.exe'
- "%PYTHON%/python -m unittest"
#- "%PYTHON%/python setup.py develop"
#- "clang-build -d\"test/hello\" -V"
#- 'build\main.exe'
# test/mini-project
- "clang-build -d\"test/mini-project\" -V"
- 'build\default\bin\main.exe'
#- "clang-build -d\"test/mini-project\" -V"
#- 'build\main.exe'
# test/mwe-toml
- "clang-build -d\"test/mwe-toml\" -V"
- 'build\myexe\default\bin\runHello.exe'
#- "clang-build -d\"test/mwe-toml\" -V"
#- 'build\runHello.exe'
# test/external-project
- "clang-build -d\"test/external-project\" -V"
- 'build\myexe\default\bin\runHello.exe'
#- "clang-build -d\"test/external-project\" -V"
#- 'build\myexe\runHello.exe'
# test/lib-and-exe
- "clang-build -d\"test/lib-and-exe\" -V"
#- "clang-build -d\"test/lib-and-exe\" -V"
# TODO: need to copy build/mylib/mylib.dll into exe's directory
# - 'build\myexe\default\bin\runLib.exe'
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
AUTHORS
ChangeLog

### Subdirectories ###
*/build/*

Expand Down
40 changes: 8 additions & 32 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,6 @@ matrix:
- sourceline: 'ppa:jonathonf/gcc-7.1'
- sourceline: 'ppa:deadsnakes/ppa'
dist: trusty
- language: python
os: linux
env: DEPLOY=false
python: 2.7
addons:
apt:
packages:
- ca-certificates
- libc++-dev
- g++-7
- clang
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
- sourceline: 'ppa:jonathonf/gcc-7.1'
- sourceline: 'ppa:deadsnakes/ppa'
dist: trusty
- language: cpp
os: osx
env: DEPLOY=true
Expand All @@ -46,33 +30,25 @@ matrix:

install:
- pip install setuptools
- pip install coveralls
- python setup.py develop

script:
- clang --version
- python --version
- pip --version
# test/hello
- clang-build -d"test/hello" -V
- ./build/default/bin/main
# test/mini-project
- clang-build -d"test/mini-project" -V
- ./build/default/bin/main
# test/mwe-toml
- clang-build -d"test/mwe-toml" -V
- ./build/myexe/default/bin/runHello
# test/external-project
- clang-build -d"test/external-project" -V
- ./build/myexe/default/bin/runHello
# test/lib-and-exe
- clang-build -d"test/lib-and-exe" -V
# TODO: need to copy build/mylib/mylib.so into exe's directory on linux
# - ./build/myexe/default/bin/runLib
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then python setup.py test; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then coverage run --source clang_build setup.py test; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then coverage report -m; fi

after_success:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then coveralls; fi

deploy:
provider: pypi
user: "$PYPIUSER"
password: "$PYPIPASSWORD"
skip_cleanup: true
on:
all_branches: true
condition: $DEPLOY = true
Loading

0 comments on commit a7bbc88

Please sign in to comment.