Commit 4a0a49e4 authored by Georg Martin Reinke's avatar Georg Martin Reinke
Browse files

use cmake for CI

parent 4573b526
variables: variables:
DOCKER_IMAGE: dpsim-dev-${CI_COMMIT_REF_NAME} DOCKER_IMAGE: dpsim-dev-${CI_COMMIT_REF_NAME}
GIT_SUBMODULE_STRATEGY: recursive GIT_SUBMODULE_STRATEGY: recursive
LD_LIBRARY_PATH: /usr/local/lib
stages: stages:
- prepare - prepare
- build-cim
- build - build
- test
docker: docker:
stage: prepare stage: prepare
...@@ -16,37 +13,15 @@ docker: ...@@ -16,37 +13,15 @@ docker:
tags: tags:
- shell - shell
build-cim:
stage: build-cim
script:
- mkdir -p Source/CIM-XML-Parser/build
- sed -i '/^add_library/ s/STATIC/SHARED/' Source/CIM-XML-Parser/thirdparty/arabica/CMakeLists.txt
- cd Source/CIM-XML-Parser/build
- cmake -DBUILD_SHARED_LIBS=ON ..
- make
image: ${DOCKER_IMAGE}
artifacts:
paths:
- Source/CIM-XML-Parser/build
tags:
- docker
build: build:
stage: build stage: build
script: script:
- cp Source/CIM-XML-Parser/build/{libCIMParser.so,thirdparty/arabica/libarabica.so} /usr/local/lib - mkdir Source/build
- make -C Source - cd Source/build
- cmake ..
- make
image: ${DOCKER_IMAGE} image: ${DOCKER_IMAGE}
tags: tags:
- docker - docker
test: # no testing for now
stage: test
script:
- cp Source/CIM-XML-Parser/build/{libCIMParser.so,thirdparty/arabica/libarabica.so} /usr/local/lib
- make -C Source tests
- cd Source/Tests
- python3 run_tests.py
image: ${DOCKER_IMAGE}
tags:
- docker
cmake_minimum_required(VERSION 3.0)
project(DPsim)
find_package(Eigen3 REQUIRED)
add_subdirectory(CIM-XML-Parser)
file(GLOB SOURCES *.cpp Components/*.cpp Examples/*.cpp)
add_executable(DPSolver ${SOURCES})
target_link_libraries(DPSolver Eigen3::Eigen CIMParser -lrt -lvillas-ext)
Supports Markdown
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