From 47903797b0a6a3ce55c6b9a9f7ab2ffe12f526aa Mon Sep 17 00:00:00 2001 From: Chris Josten Date: Mon, 6 Sep 2021 19:20:00 +0200 Subject: [PATCH 1/6] Add experimental CI support --- .gitlab-ci.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..78eef7b --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,27 @@ +variables: &variables + SFOS_VERSION: 4.1.0.24 + +stages: + - build + +image: coderus/sailfishos-platform-sdk:$SFOS_VERSION + +.build: &build + stage: build + artifacts: + paths: + - RPMS/* + script: + - mb2 -t SailfishOS-$SFOS_VERSION-$MER_ARCH build + +build:armv7hl: + variables: + <<: *variables + MER_ARCH: armv7hl + <<: *build + +build:aarch64: + variables: + <<: *variables + MER_ARCH: aarch64 + <<: *build From 5e91a3b5b1db02af7a03d4de1fd7e6b618370369 Mon Sep 17 00:00:00 2001 From: Chris Josten Date: Mon, 6 Sep 2021 19:33:11 +0200 Subject: [PATCH 2/6] CI: copy project to writeable directory before build --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 78eef7b..3edb5ed 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,8 +10,9 @@ image: coderus/sailfishos-platform-sdk:$SFOS_VERSION stage: build artifacts: paths: - - RPMS/* + - /home/nemo/harbour-sailfin/RPMS/* script: + - cp -a . /home/nemo/harbour-sailfin && cd /home/nemo/harbour-sailfin - mb2 -t SailfishOS-$SFOS_VERSION-$MER_ARCH build build:armv7hl: From a9f5cce3c5b17427ed8a7807627aad5d4bc06373 Mon Sep 17 00:00:00 2001 From: Chris Josten Date: Mon, 6 Sep 2021 19:40:17 +0200 Subject: [PATCH 3/6] CI: Fix project path --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3edb5ed..8540bc2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,9 +10,9 @@ image: coderus/sailfishos-platform-sdk:$SFOS_VERSION stage: build artifacts: paths: - - /home/nemo/harbour-sailfin/RPMS/* + - /home/defaultuser/harbour-sailfin/RPMS/* script: - - cp -a . /home/nemo/harbour-sailfin && cd /home/nemo/harbour-sailfin + - cp -a . /home/defaultuser/harbour-sailfin && cd /home/defaultuser/harbour-sailfin - mb2 -t SailfishOS-$SFOS_VERSION-$MER_ARCH build build:armv7hl: From 1283c4ca6678845699ec825e393c9dee75dedb08 Mon Sep 17 00:00:00 2001 From: Chris Josten Date: Mon, 6 Sep 2021 23:02:33 +0200 Subject: [PATCH 4/6] CI: copy to correct user --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8540bc2..ec02e3e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,9 +10,9 @@ image: coderus/sailfishos-platform-sdk:$SFOS_VERSION stage: build artifacts: paths: - - /home/defaultuser/harbour-sailfin/RPMS/* + - /home/mersdk/harbour-sailfin/RPMS/* script: - - cp -a . /home/defaultuser/harbour-sailfin && cd /home/defaultuser/harbour-sailfin + - cp -a . /home/mersdk/harbour-sailfin && cd /home/mersdk/harbour-sailfin - mb2 -t SailfishOS-$SFOS_VERSION-$MER_ARCH build build:armv7hl: From 7ae46b60131851c9e9c4380978e8c694ed99b5a4 Mon Sep 17 00:00:00 2001 From: Chris Josten Date: Tue, 7 Sep 2021 11:59:36 +0200 Subject: [PATCH 5/6] CI: Add qmllint --- .gitlab-ci.yml | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ec02e3e..62000ae 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,27 +1,40 @@ variables: &variables SFOS_VERSION: 4.1.0.24 + BUILD_PATH: /home/mersdk/harbour-sailfin stages: + - lint - build image: coderus/sailfishos-platform-sdk:$SFOS_VERSION +default: + before_script: + - cp -a . $BUILD_PATH && cd $BUILD_PATH -.build: &build +lint:sfos:qmllint: + stage: lint + script: + - sudo zypper --non-interactive install qt5-qtdeclarative-devel-tools + - cd sailfish/qml + # Find all files ending in .qml or .js and pass them as arguments to qmllint + - find -type f \( -name \*.qml -o -name \*.js \) -exec /usr/lib/qt5/bin/qmllint -U \{\} + + allow_failure: true + +.build:sfos: &build stage: build artifacts: paths: - - /home/mersdk/harbour-sailfin/RPMS/* + - $BUILD_PATH/RPMS/ script: - - cp -a . /home/mersdk/harbour-sailfin && cd /home/mersdk/harbour-sailfin - mb2 -t SailfishOS-$SFOS_VERSION-$MER_ARCH build -build:armv7hl: +build:sfos:armv7hl: variables: <<: *variables MER_ARCH: armv7hl <<: *build -build:aarch64: +build:sfos:aarch64: variables: <<: *variables MER_ARCH: aarch64 From f5fc33c002d5ecf5b52af9efad1f249660699f47 Mon Sep 17 00:00:00 2001 From: Chris Josten Date: Tue, 7 Sep 2021 12:18:47 +0200 Subject: [PATCH 6/6] CI: Remove unrecognized -U option in qmllint Apparently older versions do not support this flag --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 62000ae..4bdb747 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,7 +17,7 @@ lint:sfos:qmllint: - sudo zypper --non-interactive install qt5-qtdeclarative-devel-tools - cd sailfish/qml # Find all files ending in .qml or .js and pass them as arguments to qmllint - - find -type f \( -name \*.qml -o -name \*.js \) -exec /usr/lib/qt5/bin/qmllint -U \{\} + + - find -type f \( -name \*.qml -o -name \*.js \) -exec /usr/lib/qt5/bin/qmllint \{\} + allow_failure: true .build:sfos: &build