aboutsummaryrefslogtreecommitdiff
path: root/subprojects/nk_pugl/.gitlab-ci.yml
diff options
context:
space:
mode:
Diffstat (limited to 'subprojects/nk_pugl/.gitlab-ci.yml')
-rw-r--r--subprojects/nk_pugl/.gitlab-ci.yml94
1 files changed, 94 insertions, 0 deletions
diff --git a/subprojects/nk_pugl/.gitlab-ci.yml b/subprojects/nk_pugl/.gitlab-ci.yml
new file mode 100644
index 0000000..e289a04
--- /dev/null
+++ b/subprojects/nk_pugl/.gitlab-ci.yml
@@ -0,0 +1,94 @@
+stages:
+ - build
+ - deploy
+
+.variables_template: &variables_definition
+ variables:
+ BASE_NAME: "nk_pugl"
+ PKG_CONFIG_PATH: "/opt/lv2/lib/pkgconfig:/opt/${CI_BUILD_NAME}/lib/pkgconfig:/usr/lib/${CI_BUILD_NAME}/pkgconfig"
+
+.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:
+ - meson -Dbuild-examples=true --prefix="/" --libdir="lib" --cross-file "${CI_BUILD_NAME}" build
+ - sed -i -e '/framework/s/-Wl,-O1//g' -e '/framework/s/-Wl,--start-group//g' -e '/framework/s/-Wl,--end-group//g' build/build.ninja
+ - ninja -C build
+ - DESTDIR="${CI_PROJECT_DIR}/${BASE_NAME}-$(cat VERSION)/${CI_BUILD_NAME}" ninja -C build install
+
+.analyze_template: &analyze_definition
+ <<: *common_definition
+ script:
+ - meson -Dbuild-examples=true --prefix="/" --libdir="lib" --cross-file "${CI_BUILD_NAME}" build
+ - sed -i -e '/framework/s/-Wl,-O1//g' -e '/framework/s/-Wl,--start-group//g' -e '/framework/s/-Wl,--end-group//g' build/build.ninja
+ - ninja -C build
+ - DESTDIR="${CI_PROJECT_DIR}/${BASE_NAME}-$(cat VERSION)/${CI_BUILD_NAME}" ninja -C build install
+
+ - CC=clang CXX=clang++ meson -Dbuild-examples=true --prefix="/" --libdir="lib" --cross-file "${CI_BUILD_NAME}" clang
+ - ninja -C clang
+
+ - scan-build --status-bugs meson -Dbuild-examples=true --prefix="/" --libdir="lib" --cross-file "${CI_BUILD_NAME}" scanbuild
+ - scan-build --status-bugs ninja -C scanbuild
+
+.universal_linux_template: &universal_linux_definition
+ image: ventosus/universal-linux-gnu
+ <<: *analyze_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 install -y libglu1-mesa-dev libevdev-dev
+ <<: *universal_linux_definition
+
+i686-linux-gnu:
+ before_script:
+ - apt-get install -y libglu1-mesa-dev:i386 libevdev-dev:i386
+ <<: *universal_linux_definition
+
+arm-linux-gnueabihf:
+ before_script:
+ - apt-get install -y libglu1-mesa-dev:armhf libevdev-dev:armhf
+ <<: *arm_linux_definition
+
+aarch64-linux-gnu:
+ before_script:
+ - apt-get install -y libglu1-mesa-dev:arm64 libevdev-dev:arm64
+ <<: *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)/"