aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2017-05-05 16:47:17 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2017-05-05 17:50:53 +0200
commitd497d53f1a7cb79751038eb25dd4de80718d44bb (patch)
treec0496712aa517f6e101dc0c61ce4454c471f449c
parent45464eeefe2e32e3ad84d66efde64adaef017208 (diff)
downloadsynthpod-d497d53f1a7cb79751038eb25dd4de80718d44bb.tar.xz
add gitlab ci recipe.
-rw-r--r--.gitlab-ci.yml84
-rw-r--r--.travis.yml46
-rw-r--r--CMakeLists.txt5
-rw-r--r--VERSION2
-rw-r--r--bin/CMakeLists.txt3
-rw-r--r--cmake/arm-linux-gnueabihf.cmake24
-rw-r--r--cmake/i686-linux-gnu.cmake13
-rw-r--r--cmake/i686-w64-mingw32.cmake27
-rw-r--r--cmake/universal-apple-darwin.cmake25
-rw-r--r--cmake/x86_64-linux-gnu.cmake10
-rw-r--r--cmake/x86_64-w64-mingw32.cmake27
-rw-r--r--sandbox_ui.lv2/CMakeLists.txt11
12 files changed, 229 insertions, 48 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 00000000..1c586e6f
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,84 @@
+stages:
+ - build
+ - deploy
+
+.variables_template: &variables_definition
+ variables:
+ BASE_NAME: "synthpod"
+ 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 -DBUILD_ALSA=1 -DBUILD_DOT=1 -DBUILD_DUMMY=1 -DBUILD_JACK=1 -DBUILD_UI=1 -DBUILD_SANDBOX_X11=1 -DBUILD_SANDBOX_SHOW=1 -DBUILD_SANDBOX_KX=1 -DBUILD_SANDBOX_GTK2=0 -DBUILD_SANDBOX_GTK3=0 -DBUILD_SANDBOX_QT4=0 -DBUILD_SANDBOX_QT5=0 -DCMAKE_INSTALL_PREFIX="/opt/${BASE_NAME}" -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} ..
+ - cmake .. # needed for darwin
+ - make
+ - make install
+ - popd
+ - mkdir -p "${BASE_NAME}-$(cat VERSION)/${CI_BUILD_NAME}/opt"
+ - cp -r "/opt/${BASE_NAME}" "${BASE_NAME}-$(cat VERSION)/${CI_BUILD_NAME}/opt/${BASE_NAME}"
+
+.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:
+ before_script:
+ - apt-get update
+ - apt-get install -y -q libjack-dev libasound2-dev libzita-alsa-pcmi-dev uuid-dev libxcb-icccm4-dev
+ <<: *universal_linux_definition
+
+i686-linux-gnu:
+ before_script:
+ - apt-get update
+ - apt-get install -y -q libjack-dev:i386 libasound2-dev:i386 libzita-alsa-pcmi-dev:i386 uuid-dev:i386 libxcb-icccm4-dev:i386
+ <<: *universal_linux_definition
+
+#arm-linux-gnueabihf:
+# before_script:
+# - apt-get update
+# - apt-get install -y -q libjack-dev:armhf libasound2-dev:armhf libzita-alsa-pcmi-dev:armhf uuid-dev:armhf libxcb-icccm4-dev:armhf
+# <<: *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)/"
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 84f35d42..00000000
--- a/.travis.yml
+++ /dev/null
@@ -1,46 +0,0 @@
-sudo: require
-dist: trusty
-language: c
-os: linux
-compiler:
- - gcc
- # - clang
-before_install:
- - wget http://lv2plug.in/spec/lv2-1.12.0.tar.bz2
- - wget http://download.drobilla.net/serd-0.22.0.tar.bz2
- - wget http://download.drobilla.net/sord-0.14.0.tar.bz2
- - wget http://download.drobilla.net/sratom-0.4.6.tar.bz2
- - wget http://download.drobilla.net/lilv-0.22.0.tar.bz2
- - wget http://kokkinizita.linuxaudio.org/linuxaudio/downloads/zita-alsa-pcmi-0.2.0.tar.bz2
- - wget https://github.com/nanomsg/nanomsg/releases/download/0.8-beta/nanomsg-0.8-beta.tar.gz
- - tar xjf lv2-1.12.0.tar.bz2
- - tar xjf serd-0.22.0.tar.bz2
- - tar xjf sord-0.14.0.tar.bz2
- - tar xjf sratom-0.4.6.tar.bz2
- - tar xjf lilv-0.22.0.tar.bz2
- - tar xjf zita-alsa-pcmi-0.2.0.tar.bz2
- - tar xzf nanomsg-0.8-beta.tar.gz
-
- - if [ "$CC" = "clang" ]; then sudo add-apt-repository -y ppa:h-rayflood/llvm-upper; fi
- - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- - sudo add-apt-repository -y ppa:enlightenment-git/ppa
- - sudo apt-get update -qq
-install:
- - if [ "$CC" = "clang" ]; then sudo apt-get install -y clang-3.6 libstdc++-5-dev; fi
- - if [ "$CC" = "gcc" ]; then sudo apt-get install -y gcc-5 g++-5; fi
- - sudo apt-get install -y libjack-dev libasound2-dev libefl-dev libxcb-icccm4-dev
- - pushd lv2-1.12.0 && ./waf configure --no-plugins --prefix=/usr && ./waf build && sudo ./waf install && popd
- - pushd serd-0.22.0 && ./waf configure --no-utils --prefix=/usr && ./waf build && sudo ./waf install && popd
- - pushd sord-0.14.0 && ./waf configure --no-utils --prefix=/usr && ./waf build && sudo ./waf install && popd
- - pushd sratom-0.4.6 && ./waf configure --prefix=/usr && ./waf build && sudo ./waf install && popd
- - pushd lilv-0.22.0 && ./waf configure --no-utils --prefix=/usr && ./waf build && sudo ./waf install && popd
- - pushd zita-alsa-pcmi-0.2.0 && sudo make -C libs PREFIX=/usr LIBDIR=lib install && popd
- - pushd nanomsg-0.8-beta && ./configure --prefix=/usr && make && sudo make install && popd
-before_script:
- - if [ "$CC" = "clang" ]; then export CXX="clang++-3.6" CC="clang-3.6" CFLAGS="-ffreestanding"; fi
- - if [ "$CC" = "gcc" ]; then export CXX="g++-5" CC="gcc-5"; fi
- - mkdir build && pushd build
- - cmake -DBUILD_JACK=1 -DBUILD_ALSA=1 -DBUILD_DUMMY=1 -DBUILD_SANDBOX_LIB=1 -DBUILD_SANDBOX_X11=1 -DBUILD_SANDBOX_GTK2=0 -DBUILD_SANDBOX_GTK3=0 -DBUILD_SANDBOX_QT4=0 -DBUILD_SANDBOX_QT5=0 -DBUILD_SANDBOX_EFL=1 -DBUILD_SANDBOX_SHOW=1 -DBUILD_SANDBOX_KX=1 -DCMAKE_BUILD_TYPE=Release ..
- - popd
-script:
- - pushd build && make && sudo make install && popd
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d13e4708..2b63a741 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -175,6 +175,11 @@ include_directories(${LV2_INCLUDE_DIRS})
pkg_search_module(SRATOM REQUIRED sratom-0>=0.4)
include_directories(${SRATOM_INCLUDE_DIRS})
+if(DEFINED STATIC_LILV)
+ set(SRATOM_LDFLAGS ${LIBS} ${STATIC_SRATOM} ${STATIC_SORD} ${STATIC_SERD})
+ set(LILV_LDFLAGS ${LIBS} ${STATIC_LILV} ${SRATOM_LDFLAGS})
+endif()
+
set(BIN_LIBS
m rt pthread
${UV_LDFLAGS}
diff --git a/VERSION b/VERSION
index 3e2a5158..67ffbfa7 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.1.4879
+0.1.4883
diff --git a/bin/CMakeLists.txt b/bin/CMakeLists.txt
index 335a60d7..c8dda4e4 100644
--- a/bin/CMakeLists.txt
+++ b/bin/CMakeLists.txt
@@ -69,7 +69,8 @@ endif()
if(BUILD_ALSA)
# zita_alsa_pcmi
- find_library(ZITA_ALSA_PCMI_LIBRARY NAMES zita-alsa-pcmi)
+ find_library(ZITA_ALSA_PCMI_LIBRARY NAMES zita-alsa-pcmi libzita-alsa-pcmi
+ PATHS ${TOOLCHAIN})
find_path(ZITA_ALSA_PCMI_INCLUDE_DIR zita-alsa-pcmi.h)
if(NOT (ZITA_ALSA_PCMI_LIBRARY AND ZITA_ALSA_PCMI_INCLUDE_DIR))
message(FATAL_ERROR "zita-alsa-pcmi not found")
diff --git a/cmake/arm-linux-gnueabihf.cmake b/cmake/arm-linux-gnueabihf.cmake
new file mode 100644
index 00000000..9873dadf
--- /dev/null
+++ b/cmake/arm-linux-gnueabihf.cmake
@@ -0,0 +1,24 @@
+# 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)
+
+set(STATIC_LILV "/opt/${TOOLCHAIN}/lib/liblilv-0.a")
+set(STATIC_SRATOM "/opt/${TOOLCHAIN}/lib/libsratom-0.a")
+set(STATIC_SERD "/opt/${TOOLCHAIN}/lib/libserd-0.a")
+set(STATIC_SORD "/opt/${TOOLCHAIN}/lib/libsord-0.a")
+set(LIBS ${LIBS} dl m)
diff --git a/cmake/i686-linux-gnu.cmake b/cmake/i686-linux-gnu.cmake
new file mode 100644
index 00000000..c6c800c2
--- /dev/null
+++ b/cmake/i686-linux-gnu.cmake
@@ -0,0 +1,13 @@
+# 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")
+
+set(STATIC_LILV "/opt/${TOOLCHAIN}/lib/liblilv-0.a")
+set(STATIC_SRATOM "/opt/${TOOLCHAIN}/lib/libsratom-0.a")
+set(STATIC_SERD "/opt/${TOOLCHAIN}/lib/libserd-0.a")
+set(STATIC_SORD "/opt/${TOOLCHAIN}/lib/libsord-0.a")
+set(LIBS ${LIBS} dl m)
diff --git a/cmake/i686-w64-mingw32.cmake b/cmake/i686-w64-mingw32.cmake
new file mode 100644
index 00000000..384811ab
--- /dev/null
+++ b/cmake/i686-w64-mingw32.cmake
@@ -0,0 +1,27 @@
+# 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(STATIC_LILV "/opt/${TOOLCHAIN}/lib/liblilv-0.a")
+set(STATIC_SRATOM "/opt/${TOOLCHAIN}/lib/libsratom-0.a")
+set(STATIC_SERD "/opt/${TOOLCHAIN}/lib/libserd-0.a")
+set(STATIC_SORD "/opt/${TOOLCHAIN}/lib/libsord-0.a")
+set(LIBS ${LIBS} "-static-libgcc -Wl,-Bstatic -luserenv")
+
+set(WINE wine32)
diff --git a/cmake/universal-apple-darwin.cmake b/cmake/universal-apple-darwin.cmake
new file mode 100644
index 00000000..0546c987
--- /dev/null
+++ b/cmake/universal-apple-darwin.cmake
@@ -0,0 +1,25 @@
+# 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}")
+
+# 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(STATIC_LILV "/opt/${TOOLCHAIN}/lib/liblilv-0.a")
+set(STATIC_SRATOM "/opt/${TOOLCHAIN}/lib/libsratom-0.a")
+set(STATIC_SERD "/opt/${TOOLCHAIN}/lib/libserd-0.a")
+set(STATIC_SORD "/opt/${TOOLCHAIN}/lib/libsord-0.a")
diff --git a/cmake/x86_64-linux-gnu.cmake b/cmake/x86_64-linux-gnu.cmake
new file mode 100644
index 00000000..01e34a58
--- /dev/null
+++ b/cmake/x86_64-linux-gnu.cmake
@@ -0,0 +1,10 @@
+# the name of the target operating system
+set(CMAKE_SYSTEM_NAME Linux)
+set(CMAKE_SYSTEM_PROCESSOR "x86_64")
+set(TOOLCHAIN "x86_64-linux-gnu")
+
+set(STATIC_LILV "/opt/${TOOLCHAIN}/lib/liblilv-0.a")
+set(STATIC_SRATOM "/opt/${TOOLCHAIN}/lib/libsratom-0.a")
+set(STATIC_SERD "/opt/${TOOLCHAIN}/lib/libserd-0.a")
+set(STATIC_SORD "/opt/${TOOLCHAIN}/lib/libsord-0.a")
+set(LIBS ${LIBS} dl m)
diff --git a/cmake/x86_64-w64-mingw32.cmake b/cmake/x86_64-w64-mingw32.cmake
new file mode 100644
index 00000000..a569cd0a
--- /dev/null
+++ b/cmake/x86_64-w64-mingw32.cmake
@@ -0,0 +1,27 @@
+# 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(STATIC_LILV "/opt/${TOOLCHAIN}/lib/liblilv-0.a")
+set(STATIC_SRATOM "/opt/${TOOLCHAIN}/lib/libsratom-0.a")
+set(STATIC_SERD "/opt/${TOOLCHAIN}/lib/libserd-0.a")
+set(STATIC_SORD "/opt/${TOOLCHAIN}/lib/libsord-0.a")
+set(LIBS ${LIBS} "-static-libgcc -Wl,-Bstatic -luserenv")
+
+set(WINE wine64)
diff --git a/sandbox_ui.lv2/CMakeLists.txt b/sandbox_ui.lv2/CMakeLists.txt
new file mode 100644
index 00000000..fc400cf2
--- /dev/null
+++ b/sandbox_ui.lv2/CMakeLists.txt
@@ -0,0 +1,11 @@
+# sandbox_slave
+add_library(sandbox_slave.lib OBJECT
+ sandbox_slave.c)
+set_target_properties(sandbox_slave.lib PROPERTIES POSITION_INDEPENDENT_CODE true) # -fPIC
+set_target_properties(sandbox_slave.lib PROPERTIES INTERPROCEDURAL_OPTIMIZATION true) # -flto
+
+# sandbox_master
+add_library(sandbox_master.lib OBJECT
+ sandbox_master.c)
+set_target_properties(sandbox_master.lib PROPERTIES POSITION_INDEPENDENT_CODE true) # -fPIC
+set_target_properties(sandbox_master.lib PROPERTIES INTERPROCEDURAL_OPTIMIZATION true) # -flto