Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hgn/builddriver
Python Package to Execute & Capture Build Pipelines (support for gcc, llvm, ...)
https://github.com/hgn/builddriver
build-tool builder clang cmake gcc llvm make package python python3
Last synced: about 2 months ago
JSON representation
Python Package to Execute & Capture Build Pipelines (support for gcc, llvm, ...)
- Host: GitHub
- URL: https://github.com/hgn/builddriver
- Owner: hgn
- Created: 2019-06-20T20:08:30.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-03T18:51:40.000Z (over 4 years ago)
- Last Synced: 2024-11-10T20:24:05.114Z (3 months ago)
- Topics: build-tool, builder, clang, cmake, gcc, llvm, make, package, python, python3
- Language: Python
- Homepage:
- Size: 35.2 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Build Driver
Possible integration into build:
```
Building project-foo, this may take a while
Compiling failed for compilation unit 'lib-bar'
Error: ‘stderr’ undeclared (first use in this function) in function qux.c line 23
The complete build log is available at '/tmp/build-392193.log'
```A simple GCC/LLVM (clang) output parser. It reads lines from compiler and
makefile runs, parse, split them and provides parsed information in a
harmonized format.It is possible to configure what you want: access to the pased information?
Counters? Affected files?## Installation
Simple install this module via pip (pip for Python 2 is also supported)
```
pip3 install --user builddriver
```## Usage
### As Python Module
```
import builddriverresult = builddriver.execute('make -C path/to/makfile')
# now wait until make finished, after that the following
# function can be used:
result.returncode()
result.errors_no()
result.warnings_no()
result.taillog()
result.build_duration()
result.build_duration_human()
result.log()
result.tmp_name()
result.tmp_file_rm()
list(result.errors())
list(result.warnings())
```### As Python Executable
Compiling the Linux Kernel (not a "good" example, because there is usually no
warning in the build, except you increase the warning level somehow):```sh
$ python3 -m builddriver make -j16 V=2 O=../linux-build
builddriver executing: 'make -j16 V=2 O=../linux-build'
Compilation SUCCEED in 297.833702 seconds
Number of warnings: 0
```