COIN: Add initial set of Debian packaging instructions

Task-number: COIN-954
Change-Id: I3373d51733048689375d3272afd3864380519e3c
Reviewed-by: Toni Saario <toni.saario@qt.io>
This commit is contained in:
Toni Saario 2022-10-12 14:15:32 +03:00 committed by Simo Fält
parent a3f2857ebc
commit 0685b5b9b0
4 changed files with 235 additions and 0 deletions

View File

@ -24,6 +24,9 @@ instructions:
- condition: property
property: features
not_contains_value: "TargetBuildOnly"
- condition: property
property: features
not_contains_value: "DebianPackaging"
- type: Group
instructions:
- !include "{{qt/qtbase}}/cmake_cross_compilation_module_build_instructions.yaml"
@ -48,3 +51,15 @@ instructions:
- condition: property
property: target.arch
equals_value: ARM64
- condition: property
property: features
not_contains_value: "DebianPackaging"
- type: Group
instructions:
- type: Group
instructions:
- !include "{{qt/qtbase}}/debian/debian_build_module.yaml"
enable_if:
condition: property
property: features
contains_value: "DebianPackaging"

View File

@ -17,6 +17,10 @@ instructions:
- condition: property
property: features
not_contains_value: "TargetBuildOnly"
- condition: property
property: features
not_contains_value: "DebianPackaging"
- type: Group
instructions:
- type: Group
@ -53,3 +57,15 @@ instructions:
- condition: property
property: target.arch
equals_value: ARM64
- condition: property
property: features
not_contains_value: "DebianPackaging"
- type: Group
instructions:
- type: Group
instructions:
- !include "{{qt/qtbase}}/debian/debian_build_module.yaml"
enable_if:
condition: property
property: features
contains_value: "DebianPackaging"

View File

@ -0,0 +1,102 @@
type: Group
enable_if:
condition: property
property: features
contains_value: DebianPackaging
instructions:
- !include "{{qt/qtbase}}/debian/prepare_debian_env.yaml"
- type: EnvironmentVariable
variableName: GIT_SSH_COMMAND
variableValue: "ssh -o StrictHostKeyChecking=no"
- type: ChangeDirectory
directory: "{{.AgentWorkingDir}}"
- type: MakeDirectory
directory: output/debian_packages
- type: MakeDirectory
directory: debian_packages
- type: ExecuteCommand
command: "git clone git@git.qt.io:tqtc-debian/package_generator.git"
maxTimeInSeconds: 900
maxTimeBetweenOutput: 900
userMessageOnFailure: "Failed to clone package generator repo"
disable_if:
condition: runtime
env_var: COIN_SKIP_DEBIAN
contains_value: "MISSING_DEBIAN_INST"
- type: ExecuteCommand
command: "git clone -b 6.6 git@git.qt.io:tqtc-debian/qt6-{{.Env.TESTED_MODULE_PLAIN_COIN}}.git"
maxTimeInSeconds: 900
maxTimeBetweenOutput: 900
userMessageOnFailure: "Failed to clone debian packaging repo"
disable_if:
condition: runtime
env_var: COIN_SKIP_DEBIAN
contains_value: "MISSING_DEBIAN_INST"
- type: ExecuteCommand
command: "wget -q {{.CoinDownloadURL}}/{{.Env.MODULE_SOURCES_RELATIVE_STORAGE_PATH}}"
maxTimeInSeconds: 900
maxTimeBetweenOutput: 900
userMessageOnFailure: "Failed get sources"
disable_if:
condition: runtime
env_var: COIN_SKIP_DEBIAN
contains_value: "MISSING_DEBIAN_INST"
- type: ExecuteCommand
command: "mv sources_unix.tar.gz qt-{{.Env.QT_REPO_MODULE_VERSION}}-{{.Env.TESTED_MODULE_PLAIN_COIN}}-src_{{.Env.QT_REPO_MODULE_VERSION}}.orig.tar.gz"
maxTimeInSeconds: 900
maxTimeBetweenOutput: 900
userMessageOnFailure: "Failed rename src pkg"
disable_if:
condition: runtime
env_var: COIN_SKIP_DEBIAN
contains_value: "MISSING_DEBIAN_INST"
- type: ChangeDirectory
directory: "{{.AgentWorkingDir}}/qt6-{{.Env.TESTED_MODULE_PLAIN_COIN}}"
disable_if:
condition: runtime
env_var: COIN_SKIP_DEBIAN
contains_value: "MISSING_DEBIAN_INST"
# rc is required currently by the script
- type: ExecuteCommand
command: "../package_generator/generate_packaging.sh --qt-version {{.Env.QT_REPO_MODULE_VERSION}} --deb-rev 1 --release tqtc-focal"
maxTimeInSeconds: 900
maxTimeBetweenOutput: 900
userMessageOnFailure: "Failed to generate pkg"
disable_if:
condition: runtime
env_var: COIN_SKIP_DEBIAN
contains_value: "MISSING_DEBIAN_INST"
- type: ChangeDirectory
directory: "{{.AgentWorkingDir}}"
- type: ExecuteCommand
command: "dpkg-source -b qt6-{{.Env.TESTED_MODULE_PLAIN_COIN}}"
maxTimeInSeconds: 900
maxTimeBetweenOutput: 900
userMessageOnFailure: "Failed dpkg-source"
disable_if:
condition: runtime
env_var: COIN_SKIP_DEBIAN
contains_value: "MISSING_DEBIAN_INST"
- type: ExecuteCommand
command: ["sbuild",
"--build-dep-resolver=aptitude",
"-sAd", "tqtc-focal",
"-c", "{{.Env.COIN_SBUILD_CHROOT}}",
"--build-dir", "output/debian_packages",
"--extra-package={{.AgentWorkingDir}}/debian_packages/",
"--extra-package={{.AgentWorkingDir}}/output/debian_packages/",
"qt-{{.Env.QT_REPO_MODULE_VERSION}}-{{.Env.TESTED_MODULE_PLAIN_COIN}}-src_{{.Env.QT_REPO_MODULE_VERSION}}-1.dsc"]
maxTimeInSeconds: 18000
maxTimeBetweenOutput: 1800
userMessageOnFailure: "Failed build debian packages"
disable_if:
condition: runtime
env_var: COIN_SKIP_DEBIAN
contains_value: "MISSING_DEBIAN_INST"
- type: UploadArtifact
archiveDirectory: "{{.AgentWorkingDir}}/output"
transferType: UploadModuleBuildArtifact
maxTimeInSeconds: 1200
maxTimeBetweenOutput: 1200

View File

@ -0,0 +1,102 @@
type: Group
enable_if:
condition: property
property: features
contains_value: DebianPackaging
instructions:
- type: EnvironmentVariable
variableName: COIN_SBUILD_CHROOT
variableValue: "stable-arm64-sbuild"
enable_if:
condition: property
property: target.arch
equals_value: AARCH64
- type: EnvironmentVariable
variableName: COIN_SBUILD_CHROOT
variableValue: "stable-amd64-sbuild"
disable_if:
condition: property
property: target.arch
equals_value: AARCH64
- type: EnvironmentVariable
variableName: COIN_SBUILD_DISTRO
variableValue: "arm64-focal"
enable_if:
condition: property
property: target.arch
equals_value: AARCH64
- type: EnvironmentVariable
variableName: COIN_SBUILD_DISTRO
variableValue: "amd64-focal"
disable_if:
condition: property
property: target.arch
equals_value: AARCH64
- type: EnvironmentVariable
variableName: COIN_SKIP_DEBIAN
variableValue: "MISSING_DEBIAN_INST"
enable_if:
condition: or
conditions:
- condition: runtime
env_var: TESTED_MODULE_COIN
equals_value: "qtquick3dphysics"
- condition: runtime
env_var: TESTED_MODULE_COIN
equals_value: "qtquickeffectmaker"
- condition: runtime
env_var: TESTED_MODULE_COIN
equals_value: "qtspeech"
- condition: runtime
env_var: TESTED_MODULE_COIN
equals_value: "qtlocation"
- condition: runtime
env_var: TESTED_MODULE_COIN
equals_value: "qthttpserver"
- condition: runtime
env_var: TESTED_MODULE_COIN
equals_value: "qtactiveqt"
- condition: runtime
env_var: TESTED_MODULE_COIN
equals_value: "qtcoap"
- condition: runtime
env_var: TESTED_MODULE_COIN
equals_value: "qtmqtt"
- condition: runtime
env_var: TESTED_MODULE_COIN
equals_value: "qtopcua"
- condition: runtime
env_var: TESTED_MODULE_COIN
equals_value: "qtgrpc"
- condition: runtime
env_var: TESTED_MODULE_COIN
equals_value: "qtqa"
- condition: runtime
env_var: TESTED_MODULE_COIN
equals_value: "qtdoc"
- condition: runtime
env_var: TESTED_MODULE_COIN
equals_value: "qt5"
# Set version info to environment
- type: ParseEnvironmentVariableFromFile
regex: "QT_REPO_MODULE_VERSION \"(?P<QT_REPO_MODULE_VERSION>.*)\""
filename: "{{.SourceDir}}/.cmake.conf"
maxTimeInSeconds: 300
maxTimeBetweenOutput: 300
userMessageOnFailure: "Failed to parse version information from .cmake.conf"
disable_if:
condition: runtime
env_var: TESTED_MODULE_COIN
equals_value: "qt5"
- type: ParseEnvironmentVariableFromFile
regex: "QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT \"(?P<QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT>.*)\""
filename: "{{.SourceDir}}/.cmake.conf"
maxTimeInSeconds: 300
maxTimeBetweenOutput: 300
userMessageOnFailure: "Failed to parse status information from .cmake.conf"
disable_if:
condition: runtime
env_var: TESTED_MODULE_COIN
equals_value: "qt5"