diff options
author | Hanspeter Portner <dev@open-music-kontrollers.ch> | 2017-03-19 16:15:43 +0100 |
---|---|---|
committer | Hanspeter Portner <dev@open-music-kontrollers.ch> | 2017-03-19 16:27:07 +0100 |
commit | bc5d4c26369306d64d2afc9298c97e5e7ec76897 (patch) | |
tree | 4a2dea7357375f20be95512288cb198faf712cbf | |
parent | 797d9328a89b19f0bb7e225ebc79a6f9e37dd86d (diff) | |
download | vm.lv2-bc5d4c26369306d64d2afc9298c97e5e7ec76897.tar.xz |
add gitlab ci recipe.
-rw-r--r-- | .gitlab-ci.yml | 72 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | cmake/arm-linux-gnueabihf.cmake | 18 | ||||
-rw-r--r-- | cmake/i686-linux-gnu.cmake | 7 | ||||
-rw-r--r-- | cmake/i686-w64-mingw32.cmake | 21 | ||||
-rw-r--r-- | cmake/universal-apple-darwin.cmake | 20 | ||||
-rw-r--r-- | cmake/x86_64-linux-gnu.cmake | 4 | ||||
-rw-r--r-- | cmake/x86_64-w64-mingw32.cmake | 21 |
8 files changed, 164 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..2388af5 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,72 @@ +stages: + - build + - deploy + +.variables_template: &variables_definition + variables: + BASE_NAME: "vm.lv2" + PKG_CONFIG_PATH: "/opt/lv2/lib/pkgconfig:/opt/${CI_BUILD_NAME}/lib/pkgconfig:/usr/lib/${CI_BUILD_NAME}/pkgconfig" + TOOLCHAIN_FILE: "${CI_PROJECT_DIR}/cmake/${CI_BUILD_NAME}.cmake" + +.common_template: &common_definition + <<: *variables_definition + stage: build + artifacts: + name: "${BASE_NAME}-$(cat VERSION)-${CI_BUILD_NAME}" + paths: + - "${BASE_NAME}-$(cat VERSION)/" + +.build_template: &build_definition + <<: *common_definition + script: + - mkdir build + - pushd build + - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${CI_PROJECT_DIR} -DPLUGIN_DEST="${BASE_NAME}-$(cat ../VERSION)/${CI_BUILD_NAME}/${BASE_NAME}" -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} .. + - cmake .. # needed for darwin + - make + - make install + +.universal_linux_template: &universal_linux_definition + image: ventosus/universal-linux-gnu + <<: *build_definition + +.arm_linux_template: &arm_linux_definition + image: ventosus/arm-linux-gnueabihf + <<: *build_definition + +.universal_w64_template: &universal_w64_definition + image: ventosus/universal-w64-mingw32 + <<: *build_definition + +.universal_apple_template: &universal_apple_definition + image: ventosus/universal-apple-darwin + <<: *build_definition + +# building in docker +x86_64-linux-gnu: + <<: *universal_linux_definition + +i686-linux-gnu: + <<: *universal_linux_definition + +arm-linux-gnueabihf: + <<: *arm_linux_definition + +x86_64-w64-mingw32: + <<: *universal_w64_definition + +i686-w64-mingw32: + <<: *universal_w64_definition + +universal-apple-darwin: + <<: *universal_apple_definition + +pack: + <<: *variables_definition + stage: deploy + script: + - echo 'packing up...' + artifacts: + name: "${BASE_NAME}-$(cat VERSION)" + paths: + - "${BASE_NAME}-$(cat VERSION)/" @@ -15,7 +15,7 @@ ### Build / install - git clone https://github.com/OpenMusicKontrollers/vm.lv2.git + git clone https://gitlab.com/OpenMusicKontrollers/vm.lv2.git cd vm.lv2 mkdir build cd build diff --git a/cmake/arm-linux-gnueabihf.cmake b/cmake/arm-linux-gnueabihf.cmake new file mode 100644 index 0000000..102583c --- /dev/null +++ b/cmake/arm-linux-gnueabihf.cmake @@ -0,0 +1,18 @@ +# the name of the target operating system +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_PROCESSOR "armv7h") +set(TOOLCHAIN "arm-linux-gnueabihf") + +# which compilers to use for C and C++ +set(CMAKE_C_COMPILER "${TOOLCHAIN}-gcc") +set(CMAKE_CXX_COMPILER "${TOOLCHAIN}-g++") + +# here is the target environment located +set(CMAKE_FIND_ROOT_PATH "usr/${TOOLCHAIN}") + +# adjust the default behaviour of the FIND_XXX() commands: +# search headers and libraries in the target environment, search +# programs in the host environment +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) diff --git a/cmake/i686-linux-gnu.cmake b/cmake/i686-linux-gnu.cmake new file mode 100644 index 0000000..7768048 --- /dev/null +++ b/cmake/i686-linux-gnu.cmake @@ -0,0 +1,7 @@ +# the name of the target operating system +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_PROCESSOR "i686") +set(TOOLCHAIN "i686-linux-gnu") + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" CACHE STRING "c++ flags") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32" CACHE STRING "c flags") diff --git a/cmake/i686-w64-mingw32.cmake b/cmake/i686-w64-mingw32.cmake new file mode 100644 index 0000000..10fe154 --- /dev/null +++ b/cmake/i686-w64-mingw32.cmake @@ -0,0 +1,21 @@ +# the name of the target operating system +set(CMAKE_SYSTEM_NAME Windows) +set(CMAKE_SYSTEM_PROCESSOR "i686") +set(TOOLCHAIN "i686-w64-mingw32") + +# which compilers to use for C and C++ +set(CMAKE_C_COMPILER "${TOOLCHAIN}-gcc") +set(CMAKE_CXX_COMPILER "${TOOLCHAIN}-g++") +set(CMAKE_RC_COMPILER "${TOOLCHAIN}-windres") + +# here is the target environment located +set(CMAKE_FIND_ROOT_PATH "/usr/${TOOLCHAIN}") + +# adjust the default behaviour of the FIND_XXX() commands: +# search headers and libraries in the target environment, search +# programs in the host environment +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) + +set(WINE wine32) diff --git a/cmake/universal-apple-darwin.cmake b/cmake/universal-apple-darwin.cmake new file mode 100644 index 0000000..17476af --- /dev/null +++ b/cmake/universal-apple-darwin.cmake @@ -0,0 +1,20 @@ +# the name of the target operating system +set(CMAKE_SYSTEM_NAME Darwin) +set(CMAKE_SYSTEM_PROCESSOR "x86_64") +set(TOOLCHAIN "universal-apple-darwin") + +set(CMAKE_OSX_ARCHITECTURES "x86_64;i386") + +# which compilers to use for C and C++ +set(CMAKE_C_COMPILER "/usr/${TOOLCHAIN}/bin/x86_64-apple-darwin15-clang") +set(CMAKE_CXX_COMPILER "/usr/${TOOLCHAIN}/bin/x86_64-apple-darwin15-clang++") + +# here is the target environment located +set(CMAKE_FIND_ROOT_PATH "/usr/${TOOLCHAIN}/SDK/MacOSX10.11.sdk") + +# adjust the default behaviour of the FIND_XXX() commands: +# search headers and libraries in the target environment, search +# programs in the host environment +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) diff --git a/cmake/x86_64-linux-gnu.cmake b/cmake/x86_64-linux-gnu.cmake new file mode 100644 index 0000000..7ab5477 --- /dev/null +++ b/cmake/x86_64-linux-gnu.cmake @@ -0,0 +1,4 @@ +# the name of the target operating system +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_PROCESSOR "x86_64") +set(TOOLCHAIN "x86_64-linux-gnu") diff --git a/cmake/x86_64-w64-mingw32.cmake b/cmake/x86_64-w64-mingw32.cmake new file mode 100644 index 0000000..1e61d82 --- /dev/null +++ b/cmake/x86_64-w64-mingw32.cmake @@ -0,0 +1,21 @@ +# the name of the target operating system +set(CMAKE_SYSTEM_NAME Windows) +set(CMAKE_SYSTEM_PROCESSOR "x86_64") +set(TOOLCHAIN "x86_64-w64-mingw32") + +# which compilers to use for C and C++ +set(CMAKE_C_COMPILER "${TOOLCHAIN}-gcc") +set(CMAKE_CXX_COMPILER "${TOOLCHAIN}-g++") +set(CMAKE_RC_COMPILER "${TOOLCHAIN}-windres") + +# here is the target environment located +set(CMAKE_FIND_ROOT_PATH "/usr/${TOOLCHAIN}") + +# adjust the default behaviour of the FIND_XXX() commands: +# search headers and libraries in the target environment, search +# programs in the host environment +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) + +set(WINE wine64) |