From 527f3e496032ebafcb58801db189f0ea0fb0b3ab Mon Sep 17 00:00:00 2001 From: Syping Date: Mon, 7 Oct 2019 02:17:33 +0200 Subject: [PATCH] gitlab build in stages --- .gitlab-ci.yml | 43 +++++++++++++++++++---- src/luaengineio/luaengine/LuaEngineIO.cpp | 2 +- src/luaengineos/luaengine/LuaEngineOS.cpp | 10 +----- 3 files changed, 38 insertions(+), 17 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a0f97f3..e6e9c54 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,21 +1,50 @@ stages: - build + - deploy -Windows Portable: +luaengine: stage: build - image: syping/qt5-static-mingw-openssl:5.12.4 + image: syping/qt5-shared-mingw-openssl:5.12.5 variables: QT_SELECT: "qt5-x86_64-w64-mingw32" script: - mkdir -p build - cd build - - qmake-static CONFIG+=WITH_LUAENGINEAPP CONFIG+=WITH_LUAENGINERUN ../luaengineapp.pro - - make -j4 - - cp -Rf src/luaengineapp/release/luaengineapp.exe ../ - - cp -Rf src/luaenginerun/release/luaengine.exe ../ + - qmake-static CONFIG+=WITH_LUAENGINERUN ../luaengineapp.pro + - make ${nproc --all} + - cp -Rf src/luaengineapp/release/luaengine.exe ../ - cd .. + artifacts: + paths: + - "luaengine.exe" + +luaengineapp: + stage: build + image: syping/qt5-static-mingw-openssl:5.12.5 + variables: + QT_SELECT: "qt5-x86_64-w64-mingw32" + script: + - mkdir -p build + - cd build + - qmake-static CONFIG+=WITH_LUAENGINEAPP ../luaengineapp.pro + - make ${nproc --all} + - cp -Rf src/luaengineapp/release/luaengineapp.exe ../ + - cd .. + artifacts: + paths: + - "luaengineapp.exe" + +luaengine: + stage: deploy + image: syping/qt5-shared-mingw-openssl:5.12.5 + script: + - apt-get update -qq + - apt-get install nsis -qq + - nsis artifacts: name: "luaengine-$CI_COMMIT_REF_NAME-${CI_COMMIT_SHA:0:8}" paths: - "luaengine.exe" - - "luaengineapp.exe" + dependencies: + - luaengine + - luaengineapp diff --git a/src/luaengineio/luaengine/LuaEngineIO.cpp b/src/luaengineio/luaengine/LuaEngineIO.cpp index c2b17e6..51957f9 100644 --- a/src/luaengineio/luaengine/LuaEngineIO.cpp +++ b/src/luaengineio/luaengine/LuaEngineIO.cpp @@ -18,8 +18,8 @@ #include "LuaEngineIO.h" #include #include -#include #include +#include #include #ifdef Q_OS_WIN #include "windows.h" diff --git a/src/luaengineos/luaengine/LuaEngineOS.cpp b/src/luaengineos/luaengine/LuaEngineOS.cpp index 3515000..6e3da8b 100644 --- a/src/luaengineos/luaengine/LuaEngineOS.cpp +++ b/src/luaengineos/luaengine/LuaEngineOS.cpp @@ -16,18 +16,10 @@ *****************************************************************************/ #include "LuaEngineOS.h" -#include #include #include -#include #include -#include -#ifdef Q_OS_WIN -#include "windows.h" -#include -#else -#include "unistd.h" -#endif +#include LuaEngineOS::LuaEngineOS(QObject *parent, bool loadBaseLibraries) : LuaEngine(parent, loadBaseLibraries) {