Commit b20ae7fd authored by rmrf's avatar rmrf
Browse files

Add CI

parent b3b35ed3
sudo: false
dist: trusty
language: c++
compiler:
- gcc
branches:
only:
- master
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-7
packages:
- g++-6
- llvm
- cmake
- libelf-dev
- clang
- ninja
cache:
directories:
- TEMP
env:
- BUILD=RELEASE
- TARGET_ARCH=linux64
- SYSTEMC=systemc-2.3.3
- CXX=clang
install:
- mkdir -p DEPENDS && cd DEPENDS
- export SYSTEMC=systemc-2.3.3; export TARGET_ARCH=linux64; export BUILD=RELEASE
- export SYSTEMC_HOME=`pwd`/$SYSTEMC
- echo $SYSTEMC_HOME
- echo $LLVM_LD_FLAGS
- | # Build SystemC
if [ ! -d $SYSTEMC_HOME ]; then
wget https://www.accellera.org/images/downloads/standards/systemc/$SYSTEMC.tar.gz
tar -xzf $SYSTEMC.tar.gz && cd $SYSTEMC
mkdir BUILD && cd BUILD
../configure --enable-static CXXFLAGS="-std=c++11"
make -j 4 && make install
cd ../..
rm -rf $SYSTEMC.tar.gz $SYSTEMC/BUILD
fi
- cd ..
- | # Build clang
cd DEPENDS
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-7.1.0/clang+llvm-7.1.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz
tar xf clang+llvm-7.1.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz
mv clang+llvm-7.1.0-x86_64-linux-gnu-ubuntu-14.04 clang-7.1.0
# Debug
# Setup flags
export LLVM_BUILD_DIR=`pwd`/clang-7.1.0
export LLVMCONFIG=$LLVM_BUILD_DIR/bin/llvm-config
export LLVM_LD_FLAGS=-L$LLVM_BUILD_DIR/lib
export LLVM_CXX_FLAGS="-I/home/travis/build/rseac/systemc-clang/DEPENDS/clang-7.1.0/include -fPIC -fvisibility-inlines-hidden -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -ffunction-sections -fdata-sections -O3 -DNDEBUG -fno-exceptions -fno-rtti -D_GNU_SOURCE -fvisibility-inlines-hidden -Wsign-compare"
export LLVM_LIBS="-lLLVMLTO -lLLVMPasses -lLLVMObjCARCOpts -lLLVMSymbolize -lLLVMDebugInfoPDB -lLLVMDebugInfoDWARF -lLLVMMIRParser -lLLVMFuzzMutate -lLLVMCoverage -lLLVMTableGen -lLLVMDlltoolDriver -lLLVMOrcJIT -lLLVMXCoreDisassembler -lLLVMXCoreCodeGen -lLLVMXCoreDesc -lLLVMXCoreInfo -lLLVMXCoreAsmPrinter -lLLVMSystemZDisassembler -lLLVMSystemZCodeGen -lLLVMSystemZAsmParser -lLLVMSystemZDesc -lLLVMSystemZInfo -lLLVMSystemZAsmPrinter -lLLVMSparcDisassembler -lLLVMSparcCodeGen -lLLVMSparcAsmParser -lLLVMSparcDesc -lLLVMSparcInfo -lLLVMSparcAsmPrinter -lLLVMPowerPCDisassembler -lLLVMPowerPCCodeGen -lLLVMPowerPCAsmParser -lLLVMPowerPCDesc -lLLVMPowerPCInfo -lLLVMPowerPCAsmPrinter -lLLVMNVPTXCodeGen -lLLVMNVPTXDesc -lLLVMNVPTXInfo -lLLVMNVPTXAsmPrinter -lLLVMMSP430CodeGen -lLLVMMSP430Desc -lLLVMMSP430Info -lLLVMMSP430AsmPrinter -lLLVMMipsDisassembler -lLLVMMipsCodeGen -lLLVMMipsAsmParser -lLLVMMipsDesc -lLLVMMipsInfo -lLLVMMipsAsmPrinter -lLLVMLanaiDisassembler -lLLVMLanaiCodeGen -lLLVMLanaiAsmParser -lLLVMLanaiDesc -lLLVMLanaiAsmPrinter -lLLVMLanaiInfo -lLLVMHexagonDisassembler -lLLVMHexagonCodeGen -lLLVMHexagonAsmParser -lLLVMHexagonDesc -lLLVMHexagonInfo -lLLVMBPFDisassembler -lLLVMBPFCodeGen -lLLVMBPFAsmParser -lLLVMBPFDesc -lLLVMBPFInfo -lLLVMBPFAsmPrinter -lLLVMARMDisassembler -lLLVMARMCodeGen -lLLVMARMAsmParser -lLLVMARMDesc -lLLVMARMInfo -lLLVMARMAsmPrinter -lLLVMARMUtils -lLLVMAMDGPUDisassembler -lLLVMAMDGPUCodeGen -lLLVMAMDGPUAsmParser -lLLVMAMDGPUDesc -lLLVMAMDGPUInfo -lLLVMAMDGPUAsmPrinter -lLLVMAMDGPUUtils -lLLVMAArch64Disassembler -lLLVMAArch64CodeGen -lLLVMAArch64AsmParser -lLLVMAArch64Desc -lLLVMAArch64Info -lLLVMAArch64AsmPrinter -lLLVMAArch64Utils -lLLVMObjectYAML -lLLVMLibDriver -lLLVMOption -lLLVMWindowsManifest -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMX86Desc -lLLVMMCDisassembler -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMMCJIT -lLLVMLineEditor -lLLVMInterpreter -lLLVMExecutionEngine -lLLVMRuntimeDyld -lLLVMCodeGen -lLLVMTarget -lLLVMCoroutines -lLLVMipo -lLLVMInstrumentation -lLLVMVectorize -lLLVMScalarOpts -lLLVMLinker -lLLVMIRReader -lLLVMAsmParser -lLLVMInstCombine -lLLVMBitWriter -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMBitReader -lLLVMCore -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle"
echo "llvm-config"
echo $LLVMCONFIG
echo $LLVM_CXX_FLAGS
echo $LLVM_LD_FLAGS
cd ..
before_script:
# - mkdir BUILD && cd BUILD
# - cmake .. -DCMAKE_BUILD_TYPE=$BUILD
script:
- export SYSTEMC=$SYSTEMC_HOME/
- export CXX=$LLVM_BUILD_DIR/bin/clang
- mkdir -p TEMP; cd TEMP;
- cmake ../ -DCMAKE_VERBOSE_MAKEFILE=on && make
- cd ..; rm -rf TEMP
A SystemC Parser using the Clang Front-end
==========================================
`systemc-clang <https://git.uwaterloo.ca/caesr-pub//systemc-clang>`__
parses SystemC 2.3.3. It parses RTL constructs and some TLM 2.0
constructs. This is the maintained repository of an older version
available on `github <https://github.com/anikau31/systemc-clang>`__.
Requirements
------------
- `llvm/clang <https://releases.llvm.org/download.html>`__\ (version
7.0.0)
- `SystemC <http://systemc.org>`__ version 2.3.3. Please see `SystemC
Installation
notes <https://github.com/anikau31/systemc-clang/blob/master/doc/systemc-install.mkd>`__
- c++14 is required. We are using some features that necessitate c++14.
Down-porting it is also possible, but not supported.
Installation
------------
- `Linux <INSTALL-linux.md>`__
- `OSX <INSTALL-osx.md>`__
Contact
-------
If you encounter problems, please create issues with a minimally working
example that illustrates the issue.
For other concerns and comments, please contact us directly. \* `Anirudh
M.
Kaushik <https://ece.uwaterloo.ca/~anikau31/uwhtml/team/anirudh-kaushik/>`__
\* `Hiren Patel <https://caesr.uwaterloo.ca>`__
License
-------
systemc-clang follows the same licensing as clang. Please look at
`LICENSE <https://git.uwaterloo.ca/caesr-pub/systemc-clang/LICENSE.md>`__.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment