mirror of
https://github.com/QuasarApp/CMake.git
synced 2025-05-02 12:39:41 +00:00
added support of QuasarApp CI steps (test deploy release)
This commit is contained in:
parent
682c00fca7
commit
bd794b7bde
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2018-2019 QuasarApp.
|
# Copyright (C) 2018-2020 QuasarApp.
|
||||||
# Distributed under the MIT software license, see the accompanying
|
# Distributed under the MIT software license, see the accompanying
|
||||||
# Everyone is permitted to copy and distribute verbatim copies
|
# Everyone is permitted to copy and distribute verbatim copies
|
||||||
# of this license document, but changing it is not allowed.
|
# of this license document, but changing it is not allowed.
|
||||||
|
123
QuasarAppCITargets.cmake
Normal file
123
QuasarAppCITargets.cmake
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
#
|
||||||
|
# Copyright (C) 2018-2020 QuasarApp.
|
||||||
|
# Distributed under the MIT software license, see the accompanying
|
||||||
|
# Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
# of this license document, but changing it is not allowed.
|
||||||
|
#
|
||||||
|
|
||||||
|
if(DEFINED QUASARAPP_DEFAULT_TARGETS)
|
||||||
|
return()
|
||||||
|
else()
|
||||||
|
set(QUASARAPP_DEFAULT_TARGETS 1)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
function(initQmake)
|
||||||
|
|
||||||
|
set(Q_MAKE ${Qt5_DIR}/bin/qmake)
|
||||||
|
if (WIN32)
|
||||||
|
set(Q_MAKE ${Qt5_DIR}/bin/qmake.exe)
|
||||||
|
endif (WIN32)
|
||||||
|
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(initTests testExec arg)
|
||||||
|
|
||||||
|
ADD_CUSTOM_TARGET(
|
||||||
|
deployTest
|
||||||
|
COMMAND ${testExec} ${arg}
|
||||||
|
COMMENT "=================== Deploy Test ==================="
|
||||||
|
)
|
||||||
|
|
||||||
|
initQmake()
|
||||||
|
|
||||||
|
ADD_CUSTOM_TARGET(
|
||||||
|
test
|
||||||
|
COMMAND cqtdeployer -bin ${testExec} -qmake ${Q_MAKE}
|
||||||
|
COMMENT "=================== Run Test ==================="
|
||||||
|
DEPENDS deployTest
|
||||||
|
)
|
||||||
|
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(initTests testExec)
|
||||||
|
|
||||||
|
ADD_CUSTOM_TARGET(
|
||||||
|
deployTest
|
||||||
|
COMMAND ${testExec}
|
||||||
|
COMMENT "=================== Deploy Test ==================="
|
||||||
|
)
|
||||||
|
|
||||||
|
initQmake()
|
||||||
|
|
||||||
|
ADD_CUSTOM_TARGET(
|
||||||
|
test
|
||||||
|
COMMAND cqtdeployer -bin ${testExec} -qmake ${Q_MAKE}
|
||||||
|
COMMENT "=================== Run Test ==================="
|
||||||
|
DEPENDS deployTest
|
||||||
|
)
|
||||||
|
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(initTests )
|
||||||
|
|
||||||
|
ADD_CUSTOM_TARGET(
|
||||||
|
test
|
||||||
|
COMMENT "=================== Run Test ==================="
|
||||||
|
)
|
||||||
|
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(initDeploy targets)
|
||||||
|
|
||||||
|
if(DEFINED targets)
|
||||||
|
initQmake()
|
||||||
|
|
||||||
|
ADD_CUSTOM_TARGET(
|
||||||
|
deploy
|
||||||
|
COMMAND cqtdeployer -bin ${targets} -qmake ${Q_MAKE}
|
||||||
|
COMMENT "=================== Run deploy ==================="
|
||||||
|
DEPENDS deployTest
|
||||||
|
)
|
||||||
|
else(DEFINED testExec)
|
||||||
|
ADD_CUSTOM_TARGET(
|
||||||
|
deploy
|
||||||
|
COMMENT "=================== Run deploy ==================="
|
||||||
|
)
|
||||||
|
endif(DEFINED testExec)
|
||||||
|
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(initRelease)
|
||||||
|
|
||||||
|
ADD_CUSTOM_TARGET(
|
||||||
|
release
|
||||||
|
COMMENT "=================== Run release ==================="
|
||||||
|
)
|
||||||
|
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(initDeploy)
|
||||||
|
|
||||||
|
ADD_CUSTOM_TARGET(
|
||||||
|
deploy
|
||||||
|
COMMENT "=================== Run deploy ==================="
|
||||||
|
)
|
||||||
|
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(initRelease)
|
||||||
|
|
||||||
|
ADD_CUSTOM_TARGET(
|
||||||
|
release
|
||||||
|
COMMENT "=================== Run release ==================="
|
||||||
|
)
|
||||||
|
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(initAll)
|
||||||
|
initTests()
|
||||||
|
initDeploy()
|
||||||
|
initRelease()
|
||||||
|
|
||||||
|
endfunction()
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2018-2019 QuasarApp.
|
# Copyright (C) 2018-2020 QuasarApp.
|
||||||
# Distributed under the MIT software license, see the accompanying
|
# Distributed under the MIT software license, see the accompanying
|
||||||
# Everyone is permitted to copy and distribute verbatim copies
|
# Everyone is permitted to copy and distribute verbatim copies
|
||||||
# of this license document, but changing it is not allowed.
|
# of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2018-2019 QuasarApp.
|
# Copyright (C) 2018-2020 QuasarApp.
|
||||||
# Distributed under the MIT software license, see the accompanying
|
# Distributed under the MIT software license, see the accompanying
|
||||||
# Everyone is permitted to copy and distribute verbatim copies
|
# Everyone is permitted to copy and distribute verbatim copies
|
||||||
# of this license document, but changing it is not allowed.
|
# of this license document, but changing it is not allowed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2018-2019 QuasarApp.
|
# Copyright (C) 2018-2020 QuasarApp.
|
||||||
# Distributed under the MIT software license, see the accompanying
|
# Distributed under the MIT software license, see the accompanying
|
||||||
# Everyone is permitted to copy and distribute verbatim copies
|
# Everyone is permitted to copy and distribute verbatim copies
|
||||||
# of this license document, but changing it is not allowed.
|
# of this license document, but changing it is not allowed.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user