diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..e336fd8c --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,25 @@ +version: 2 + +jobs: + build: + docker: + - image: debian:stretch + steps: + - run: + name: Installing sudo + command: 'apt-get update && apt-get install -y sudo && rm -rf /var/lib/apt/lists/*' + - run: + name: Installing Build System + command: 'apt-get update && apt-get install -y git build-essential libboost-system-dev cmake python2.7' + - checkout + - run: git submodule sync + - run: git submodule update --init + - run: + name: Creating Build Files + command: 'cd svgnative && cmake -Bbuild/linux -H.' + - run: + name: Creating Binary Files + command: 'cd svgnative && cmake --build build/linux' + - run: + name: Run tests + command: 'cd svgnative && /usr/bin/python2.7 script/runTest.py --test=test' diff --git a/.gitmodules b/.gitmodules index 215b42cd..4fd15bbd 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,4 +4,4 @@ branch = modifications [submodule "third_party/cpp-base64"] path = third_party/cpp-base64 - url = https://github.com/ReneNyffenegger/cpp-base64 + url = git@github.com:ReneNyffenegger/cpp-base64.git diff --git a/svgnative/CMakeLists.txt b/svgnative/CMakeLists.txt index 5383314e..eb7b5125 100755 --- a/svgnative/CMakeLists.txt +++ b/svgnative/CMakeLists.txt @@ -3,11 +3,12 @@ cd build cmake -Bbuild/win64 -H. -G "Visual Studio 15 2017 Win64" cmake -Bbuild/win32 -H. -G "Visual Studio 15 2017" cmake -Bbuild/mac -H. -G "Xcode" +cmake -Bbuild/linux -H. cmake --build build/win64 --config Release ]] -cmake_minimum_required(VERSION 3.10.0) +cmake_minimum_required(VERSION 3.7.2) project(SVGNativeViewer) enable_language(CXX) set(CMAKE_CXX_STANDARD 14) diff --git a/svgnative/script/runTest.py b/svgnative/script/runTest.py index 7479698c..4f33247f 100755 --- a/svgnative/script/runTest.py +++ b/svgnative/script/runTest.py @@ -159,7 +159,7 @@ def readLine(p): c = p.stdout.read(1) return line -def exportTestFilesSequential(files, args): +def exportTestFilesSequential(files, args, hasError): p = None isExpectedFileMissing = False inputFile = files.nextPath() @@ -178,28 +178,31 @@ def exportTestFilesSequential(files, args): p = Popen([args.program, inputFile, expectedFile]) if p == None: print('Error opening testapp') - return -1 + hasError = -1 + return hasError print('Created missing expectation file: ' + expectedFile) else: p = Popen([args.program, inputFile, actualFile]) if p == None: print('Error opening testapp') - return -1 + hasError = -1 + return hasError p.wait() if not compare_text_files(expectedFile, actualFile, diffFile): - print(u'\u274c' + ' ' + inputFile + ' failed.') + print(' ' + inputFile + ' FAILED.') + hasError = -1 else: - print(u'\u2713' + ' ' + inputFile + ' passed.') + print(' ' + inputFile + ' passed.') - exportTestFilesSequential(files, args) - return 0 + hasError = exportTestFilesSequential(files, args, hasError) + return hasError def runTestApp(args): filesIterator = DirectoryIterator(args.path, args.recursive) files = filesIterator.fileArray() testexpectations = filesIterator.testExpectations() - error = exportTestFilesSequential(filesIterator, args) + error = exportTestFilesSequential(filesIterator, args, 0) if error == -1: return error diff --git a/third_party/cpp-base64 b/third_party/cpp-base64 new file mode 160000 index 00000000..6420804f --- /dev/null +++ b/third_party/cpp-base64 @@ -0,0 +1 @@ +Subproject commit 6420804f7ba10e8c3049c6e3b59ec88c88d808a6 diff --git a/third_party/stylesheet b/third_party/stylesheet new file mode 160000 index 00000000..c81c4be1 --- /dev/null +++ b/third_party/stylesheet @@ -0,0 +1 @@ +Subproject commit c81c4be1195e47226b992e26050c3c99ae18510f