1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-18 08:22:33 +02:00

Merge remote-tracking branch 'origin/release'

This commit is contained in:
Elias Steurer 2022-02-17 18:13:41 +01:00
commit 907658261e
4 changed files with 174 additions and 17 deletions

View File

@ -1,11 +1,12 @@
stages:
- check
- build
- release
- test
variables:
GIT_STRATEGY: clone
QT_VERSION: 6.2.2
QT_VERSION: "6.2.3"
PYTHON_VERSION: "3.10.1"
CQTDEPLOYER_URL: "https://github.com/QuasarApp/CQtDeployer/releases/download/1.5.4.10/CQtDeployer_1.5.4.10_Linux_x86_64.deb"
@ -52,6 +53,7 @@ build:shared_windows_release:
paths:
- build-x64-windows-release/bin/
build:windows_release:
stage: build
tags:
@ -137,26 +139,170 @@ build:linux_release:
needs:
- check
script:
- apt-get update -y
- apt update -y
# Otherwise libglib2 needs interaction
- export DEBIAN_FRONTEND=noninteractive
- apt-get install mesa-common-dev curl zip unzip tar git pkg-config apt-transport-https ca-certificates gnupg software-properties-common wget software-properties-common wget python3-pip build-essential libgl1-mesa-dev lld ninja-build cmake -y
- apt install mesa-common-dev curl zip unzip tar git pkg-config apt-transport-https ca-certificates gnupg software-properties-common wget software-properties-common wget python3-pip build-essential libgl1-mesa-dev lld ninja-build cmake -y
- pip3 install -U pip
- pip3 install aqtinstall
- mkdir Qt
- aqt install-qt -O ../aqt linux desktop $QT_VERSION gcc_64 -m all
- aqt install-tool -O ../aqt linux desktop tools_ifw
# - wget -q https://github.com/QuasarApp/CQtDeployer/releases/download/1.5.2/CQtDeployer_1.5.2_OfflineInstaller_Linux64.run
- curl -OL $CQTDEPLOYER_URL
- chmod +x ./CQtDeployer_*.deb
- apt-get install ./CQtDeployer_*.deb -y
- python3 ./Tools/setup.py
- python3 ./Tools/build.py -type release -steam -use-aqt -installer
- apt install ./CQtDeployer_*.deb -y
- cd Tools
- python3 setup.py
- python3 build.py -type release -steam -use-aqt -installer
artifacts:
expire_in: "4 weeks"
paths:
- build-x64-linux-release/bin/
release:windows_steam:
stage: build
tags:
- windows10
needs:
- check
script:
- python -m pip install -U pip wheel
- python -m pip install -U aqtinstall
- aqt install-qt -O ../aqt windows desktop $QT_VERSION win64_msvc2019_64 -m all
- aqt install-tool -O ../aqt windows desktop tools_ifw
- cd Tools
- python setup.py
- python build.py -type release -use-aqt -steam
only:
- release
artifacts:
expire_in: "never"
paths:
- build-x64-windows-release/bin/
release:windows_standalone:
stage: build
tags:
- windows10
needs:
- check
script:
- python -m pip install -U pip wheel
- python -m pip install -U aqtinstall
- aqt install-qt -O ../aqt windows desktop $QT_VERSION win64_msvc2019_64 -m all
- aqt install-tool -O ../aqt windows desktop tools_ifw
- cd Tools
- python setup.py
- python build.py -type release -use-aqt -installer
only:
- release
artifacts:
expire_in: "never"
paths:
- build-x64-windows-release/bin/
release:osx_steam:
stage: build
tags:
- osx
needs:
- check
script:
- pip3 install -U pip
- pip3 install aqtinstall
- aqt install-qt -O ../aqt mac desktop $QT_VERSION clang_64 -m all
- aqt install-tool -O ../aqt mac desktop tools_ifw
- cd Tools
- python3 setup.py
- python3 build.py -type release -steam -use-aqt -sign
only:
- release
artifacts:
expire_in: "never"
paths:
- build-x64-osx-release/bin/
release:osx_standalone:
stage: build
tags:
- osx
needs:
- check
script:
- pip3 install -U pip
- pip3 install aqtinstall
- aqt install-qt -O ../aqt mac desktop $QT_VERSION clang_64 -m all
- aqt install-tool -O ../aqt mac desktop tools_ifw
- cd Tools
- python3 setup.py
- python3 build.py -type release -installer -use-aqt -sign
only:
- release
artifacts:
expire_in: "never"
paths:
- build-x64-osx-release/bin/
release:linux_steam:
stage: build
image:
name: ubuntu:20.04
tags:
- gitlab-org-docker
needs:
- check
script:
- apt update -y
# Otherwise libglib2 needs interaction
- export DEBIAN_FRONTEND=noninteractive
- apt install mesa-common-dev curl zip unzip tar git pkg-config apt-transport-https ca-certificates gnupg software-properties-common wget software-properties-common wget python3-pip build-essential libgl1-mesa-dev lld ninja-build cmake -y
- pip3 install -U pip
- pip3 install aqtinstall
- aqt install-qt -O ../aqt linux desktop $QT_VERSION gcc_64 -m all
- aqt install-tool -O ../aqt linux desktop tools_ifw
- curl -OL $CQTDEPLOYER_URL
- chmod +x ./CQtDeployer_*.deb
- apt install ./CQtDeployer_*.deb -y
- cd Tools
- python3 setup.py
- python3 build.py -type release -steam -use-aqt
only:
- release
artifacts:
expire_in: "never"
paths:
- build-x64-linux-release/bin/
release:linux_standalone:
stage: build
image:
name: ubuntu:20.04
tags:
- gitlab-org-docker
needs:
- check
script:
- apt update -y
# Otherwise libglib2 needs interaction
- export DEBIAN_FRONTEND=noninteractive
- apt install mesa-common-dev curl zip unzip tar git pkg-config apt-transport-https ca-certificates gnupg software-properties-common wget software-properties-common wget python3-pip build-essential libgl1-mesa-dev lld ninja-build cmake -y
- pip3 install -U pip
- pip3 install aqtinstall
- aqt install-qt -O ../aqt linux desktop $QT_VERSION gcc_64 -m all
- aqt install-tool -O ../aqt linux desktop tools_ifw
- curl -OL $CQTDEPLOYER_URL
- chmod +x ./CQtDeployer_*.deb
- apt install ./CQtDeployer_*.deb -y
- cd Tools
- python3 setup.py
- python3 build.py -type release -installer -use-aqt
only:
- release
artifacts:
expire_in: "never"
paths:
- build-x64-linux-release/bin/
test:windows_release:
stage: test
tags:

View File

@ -1,13 +1,23 @@
# Variable must be around "" to be equal!
if("${CPACK_IFW_ROOT}" STREQUAL "")
# Hardcoded Qt paths that are used by the QtMaintanance tool for now...
if(WIN32)
set(SCREENPLAY_IFW_ROOT "C:/Qt/Tools/QtInstallerFramework/4.2")
if(${GITLAB_CI})
set(SCREENPLAY_IFW_ROOT "${CMAKE_SOURCE_DIR}/../aqt/Tools/QtInstallerFramework/4.2")
else()
set(SCREENPLAY_IFW_ROOT "C:/Qt/Tools/QtInstallerFramework/4.2")
endif()
elseif(UNIX)
set(SCREENPLAY_IFW_ROOT "$ENV{HOME}/Qt/Tools/QtInstallerFramework/4.2")
if(${GITLAB_CI})
set(SCREENPLAY_IFW_ROOT "${CMAKE_SOURCE_DIR}/../aqt/Tools/QtInstallerFramework/4.2")
else()
set(SCREENPLAY_IFW_ROOT "$ENV{HOME}/Qt/Tools/QtInstallerFramework/4.2")
endif()
endif()
message(STATUS "[CPACK_IFW_ROOT] Not set. Using hardcoded value: ${SCREENPLAY_IFW_ROOT}")
message(STATUS "WARNING: MAKE SURE YOU HAVE THIS EXACT VERSION INSTALLED VIA THE QTMAINTANANCE TOOL!")
message(AUTHOR_WARNING "[CPACK_IFW_ROOT] Not set. Using hardcoded value: ${SCREENPLAY_IFW_ROOT}")
message(AUTHOR_WARNING "WARNING: MAKE SURE YOU HAVE THIS EXACT VERSION INSTALLED VIA THE QTMAINTANANCE TOOL!")
else()
message(STATUS "[CPACK_IFW_ROOT] = ${SCREENPLAY_IFW_ROOT}")
endif()

View File

@ -17,6 +17,10 @@ option(SCREENPLAY_STEAM "For FOSS distribution so we do not bundle proprietary c
option(SCREENPLAY_TESTS "Enables UI tests." OFF)
option(SCREENPLAY_CREATE_INSTALLER "Indicates whether an installer via the Qt Installer Framework is created." OFF)
# Gitlab CI has many ENV variables. We use this one to check if the current build happens inside the CI
if(DEFINED ENV{CI_COMMIT_MESSAGE})
set(GITLAB_CI true)
endif()
# Add our *.cmake diretory to the CMAKE_MODULE_PATH, so that our includes are found
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH})
@ -105,6 +109,7 @@ message(STATUS "[PROJECT] CMAKE_TOOLCHAIN_FILE = ${CMAKE_TOOLCHAIN_FILE}")
message(STATUS "[PROJECT] VCPKG_PATH = ${VCPKG_PATH}")
message(STATUS "[PROJECT] VCPKG_TARGET_TRIPLET = ${VCPKG_TARGET_TRIPLET}")
message(STATUS "[PROJECT] CMAKE_PREFIX_PATH = ${CMAKE_PREFIX_PATH}")
message(STATUS "[PROJECT] CMAKE_VERSION = ${CMAKE_VERSION}")
if(${SCREENPLAY_CREATE_INSTALLER})
include(${CMAKE_CURRENT_SOURCE_DIR}/CMake/CreateIFWInstaller.cmake)

View File

@ -19,7 +19,6 @@ cmake_build_type = ""
executable_file_ending = ""
deploy_command = ""
aqt_path = ""
ifw_root_path = ""
cmake_bin_path = ""
file_endings = [".ninja_deps", ".ninja", ".ninja_log", ".lib", ".a", ".dylib", ".exp",
@ -138,7 +137,6 @@ if __name__ == "__main__":
build_tests = "ON"
if args.create_installer:
create_installer = "ON"
ifw_root_path = ("{aqt_path}\\Tools\\QtInstallerFramework\\4.2").format(aqt_path=aqt_path)
cmake_configure_command = 'cmake ../ \
-DCMAKE_PREFIX_PATH={prefix_path} \
@ -148,7 +146,6 @@ if __name__ == "__main__":
-DSCREENPLAY_STEAM={steam} \
-DSCREENPLAY_TESTS={tests} \
-DSCREENPLAY_CREATE_INSTALLER={installer} \
-DSCREENPLAY_IFW_ROOT:STRING={ifw} \
-G "CodeBlocks - Ninja" \
-B.'.format(
prefix_path=qt_path,
@ -157,8 +154,7 @@ if __name__ == "__main__":
toolchain=cmake_toolchain_file,
steam=steam_build,
tests = build_tests,
installer= create_installer,
ifw= ifw_root_path)
installer= create_installer)
build_folder = root_path.joinpath(f"build-{cmake_target_triplet}-{args.build_type}")
clean_build_dir(build_folder)