From cc8d9c26559e90f39576f38d6e1a30c8b3da1e71 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 28 Oct 2024 15:57:05 +0100 Subject: [PATCH] COIN: Clean up instructions - remove outdated 'Qt5' feature check - move some environment setting from build instructions to environment setup - move some provisioning from build instructions to provisioning - remove some unneeded/duplicate SetBuildDirectory/ChangeDirectory Change-Id: I3e6c0948dbff825bf75005af5c3390e8a3b2bac9 Reviewed-by: David Schulz --- coin/instructions/build.yaml | 154 --------------------- coin/instructions/common_environment.yaml | 20 ++- coin/instructions/provision.yaml | 158 +++++++++++++++++++--- coin/instructions/test.yaml | 4 - 4 files changed, 153 insertions(+), 183 deletions(-) diff --git a/coin/instructions/build.yaml b/coin/instructions/build.yaml index b61815d748a..3e8890c88d9 100644 --- a/coin/instructions/build.yaml +++ b/coin/instructions/build.yaml @@ -1,47 +1,7 @@ type: Group instructions: - - type: MakeDirectory - directory: "{{.AgentWorkingDir}}/build/qt_temp" - type: Group instructions: - - type: EnvironmentVariable - variableName: QTC_TEST_OPTION - variableValue: "--with-tests" - enable_if: - condition: property - property: features - not_contains_value: DisableTests - - - type: Group - instructions: - - type: ExecuteCommand - command: >- - curl --fail -L --retry 5 --retry-delay 5 - -o {{.AgentWorkingDir}}/build/qt_temp/elfutils.7z - {{.Env.QTC_ELFUTILS_URL}} - maxTimeInSeconds: 3600 - maxTimeBetweenOutput: 360 - userMessageOnFailure: "Failed to download elfutils package, check logs." - - type: ExecuteCommand - command: >- - 7z x -y {{.AgentWorkingDir}}/build/qt_temp/elfutils.7z - -o{{.AgentWorkingDir}}/build/qt_temp/elfutils - maxTimeInSeconds: 3600 - maxTimeBetweenOutput: 360 - userMessageOnFailure: "Failed to extract elfutils package, check logs." - - type: ExecuteCommand - command: >- - curl --fail -L --retry 5 --retry-delay 5 - -o {{.AgentWorkingDir}}/build/qt_temp/libclang.7z - {{.Env.LLVM_BASE_URL}}{{.Env.QTC_LLVM_POSTFIX}} - maxTimeInSeconds: 3600 - maxTimeBetweenOutput: 360 - userMessageOnFailure: "Failed to download LLVM package, check logs." - - type: ExecuteCommand - command: "7z x -y {{.AgentWorkingDir}}/build/qt_temp/libclang.7z -o{{.AgentWorkingDir}}/build/qt_temp/" - maxTimeInSeconds: 3600 - maxTimeBetweenOutput: 360 - userMessageOnFailure: "Failed to extract LLVM package, check logs." - type: ExecuteCommand command: >- {{.Env.PYTHON_EXECUTABLE}} -u {{.AgentWorkingDir}}/qt-creator/qt-creator/scripts/build.py @@ -80,19 +40,6 @@ instructions: - type: Group instructions: - - type: ExecuteCommand - command: >- - curl --fail -L --retry 5 --retry-delay 5 - -o {{.AgentWorkingDir}}/build/qt_temp/libclang.7z - {{.Env.LLVM_BASE_URL}}{{.Env.QTC_LLVM_POSTFIX}} - maxTimeInSeconds: 3600 - maxTimeBetweenOutput: 360 - userMessageOnFailure: "Failed to download LLVM package, check logs." - - type: ExecuteCommand - command: "7z x -y {{.AgentWorkingDir}}/build/qt_temp/libclang.7z -o{{.AgentWorkingDir}}/build/qt_temp/" - maxTimeInSeconds: 3600 - maxTimeBetweenOutput: 360 - userMessageOnFailure: "Failed to extract LLVM package, check logs." - type: ExecuteCommand command: >- {{.Env.PYTHON_EXECUTABLE}} -u {{.AgentWorkingDir}}/qt-creator/qt-creator/scripts/build.py @@ -133,102 +80,6 @@ instructions: - type: Group instructions: - - type: ExecuteCommand - command: >- - curl --fail -L --retry 5 --retry-delay 5 - -o {{.AgentWorkingDir}}\build\qt_temp\elfutils.7z - {{.Env.QTC_ELFUTILS_URL}} - maxTimeInSeconds: 3600 - maxTimeBetweenOutput: 360 - userMessageOnFailure: "Failed to download elfutils package, check logs." - - type: ExecuteCommand - command: >- - 7z.exe x -y - {{.AgentWorkingDir}}\build\qt_temp\elfutils.7z - -o{{.AgentWorkingDir}}\build\qt_temp\elfutils - maxTimeInSeconds: 3600 - maxTimeBetweenOutput: 360 - userMessageOnFailure: "Failed to extract elfutils package, check logs." - - type: ExecuteCommand - command: >- - curl --fail -L --retry 5 --retry-delay 5 - -o {{.AgentWorkingDir}}\build\qt_temp\Python311-win-x64.7z - https://master.qt.io/development_releases/prebuilt/python/Python311-win-x64.7z - maxTimeInSeconds: 3600 - maxTimeBetweenOutput: 360 - userMessageOnFailure: "Failed to download python package, check logs." - - type: ExecuteCommand - command: >- - 7z.exe x -y - {{.AgentWorkingDir}}\build\qt_temp\Python311-win-x64.7z - -o{{.AgentWorkingDir}}\build\qt_temp\python - maxTimeInSeconds: 3600 - maxTimeBetweenOutput: 360 - userMessageOnFailure: "Failed to extract python package, check logs." - - type: ExecuteCommand - command: >- - curl --fail -L --retry 5 --retry-delay 5 - -o {{.AgentWorkingDir}}\build\qt_temp\python-3.11.9-embed-amd64.zip - https://master.qt.io/development_releases/prebuilt/python/python-3.11.9-embed-amd64.zip - maxTimeInSeconds: 3600 - maxTimeBetweenOutput: 360 - userMessageOnFailure: "Failed to download python package, check logs." - - type: ExecuteCommand - command: >- - 7z.exe x -y - {{.AgentWorkingDir}}\build\qt_temp\python-3.11.9-embed-amd64.zip - -o{{.AgentWorkingDir}}\build\qt_temp\python-amd64 - maxTimeInSeconds: 3600 - maxTimeBetweenOutput: 360 - userMessageOnFailure: "Failed to extract python package, check logs." - - type: ExecuteCommand - command: >- - curl --fail -L --retry 5 --retry-delay 5 - -o {{.AgentWorkingDir}}\build\qt_temp\python-3.11.9-embed-arm64.zip - https://master.qt.io/development_releases/prebuilt/python/python-3.11.9-embed-arm64.zip - maxTimeInSeconds: 3600 - maxTimeBetweenOutput: 360 - userMessageOnFailure: "Failed to download python package, check logs." - - type: ExecuteCommand - command: >- - 7z.exe x -y - {{.AgentWorkingDir}}\build\qt_temp\python-3.11.9-embed-arm64.zip - -o{{.AgentWorkingDir}}\build\qt_temp\python-arm64 - maxTimeInSeconds: 3600 - maxTimeBetweenOutput: 360 - userMessageOnFailure: "Failed to extract python package, check logs." - - type: ExecuteCommand - command: >- - curl --fail -L --retry 5 --retry-delay 5 - -o {{.AgentWorkingDir}}\build\qt_temp\python-3.11.9-embed-win32.zip - https://master.qt.io/development_releases/prebuilt/python/python-3.11.9-embed-win32.zip - maxTimeInSeconds: 3600 - maxTimeBetweenOutput: 360 - userMessageOnFailure: "Failed to download python package, check logs." - - type: ExecuteCommand - command: >- - 7z.exe x -y - {{.AgentWorkingDir}}\build\qt_temp\python-3.11.9-embed-win32.zip - -o{{.AgentWorkingDir}}\build\qt_temp\python-win32 - maxTimeInSeconds: 3600 - maxTimeBetweenOutput: 360 - userMessageOnFailure: "Failed to extract python package, check logs." - - type: ExecuteCommand - command: >- - curl --fail -L --retry 5 --retry-delay 5 - -o {{.AgentWorkingDir}}\build\qt_temp\libclang.7z - {{.Env.LLVM_BASE_URL}}{{.Env.QTC_LLVM_POSTFIX}} - maxTimeInSeconds: 3600 - maxTimeBetweenOutput: 360 - userMessageOnFailure: "Failed to download LLVM package, check logs." - - type: ExecuteCommand - command: >- - 7z.exe x -y - {{.AgentWorkingDir}}\build\qt_temp\libclang.7z - -o{{.AgentWorkingDir}}\build\qt_temp - maxTimeInSeconds: 3600 - maxTimeBetweenOutput: 360 - userMessageOnFailure: "Failed to extract LLVM package, check logs." - type: ExecuteCommand command: >- {{.Env.PYTHON_EXECUTABLE}} -u {{.AgentWorkingDir}}\qt-creator\qt-creator\scripts\build.py @@ -272,8 +123,3 @@ instructions: transferType: UploadModuleBuildArtifact maxTimeInSeconds: 1800 maxTimeBetweenOutput: 1800 - -enable_if: - condition: property - property: features - not_contains_value: "Qt5" diff --git a/coin/instructions/common_environment.yaml b/coin/instructions/common_environment.yaml index e960b988c51..66119627c55 100644 --- a/coin/instructions/common_environment.yaml +++ b/coin/instructions/common_environment.yaml @@ -2,6 +2,12 @@ type: Group instructions: - type: Group instructions: + - type: Group + instructions: + - type: SetBuildDirectory + directory: "{{.AgentWorkingDir}}/build" + - type: MakeDirectory + directory: "{{.BuildDir}}" - type: EnvironmentVariable variableName: QTC_BUILD_TYPE variableValue: "RelWithDebInfo" @@ -146,6 +152,15 @@ instructions: condition: property property: features contains_value: Sccache + - type: Group + instructions: + - type: EnvironmentVariable + variableName: QTC_TEST_OPTION + variableValue: "--with-tests" + enable_if: + condition: property + property: features + not_contains_value: DisableTests - type: Group instructions: @@ -184,8 +199,3 @@ instructions: condition: property property: host.os equals_value: Linux - -enable_if: - condition: property - property: features - not_contains_value: "Qt5" diff --git a/coin/instructions/provision.yaml b/coin/instructions/provision.yaml index 0351950c363..fe3850c2d22 100644 --- a/coin/instructions/provision.yaml +++ b/coin/instructions/provision.yaml @@ -1,21 +1,7 @@ type: Group instructions: - type: MakeDirectory - directory: ".git" - - type: SetBuildDirectory - directory: "{{.SourceDir}}" - disable_if: - condition: property - property: features - contains_value: OutOfSourceBuild - - type: Group - instructions: - - type: SetBuildDirectory - directory: "{{.AgentWorkingDir}}/build" - - type: MakeDirectory - directory: "{{.BuildDir}}" - - type: ChangeDirectory - directory: "{{.AgentWorkingDir}}/qt-creator/qt-creator/scripts" + directory: "{{.AgentWorkingDir}}/build/qt_temp" - type: Group instructions: - type: ExecuteCommand @@ -30,6 +16,34 @@ instructions: maxTimeInSeconds: 3600 maxTimeBetweenOutput: 360 userMessageOnFailure: "Failed to install qt, check logs." + - type: ExecuteCommand + command: >- + curl --fail -L --retry 5 --retry-delay 5 + -o {{.AgentWorkingDir}}/build/qt_temp/elfutils.7z + {{.Env.QTC_ELFUTILS_URL}} + maxTimeInSeconds: 3600 + maxTimeBetweenOutput: 360 + userMessageOnFailure: "Failed to download elfutils package, check logs." + - type: ExecuteCommand + command: >- + 7z x -y {{.AgentWorkingDir}}/build/qt_temp/elfutils.7z + -o{{.AgentWorkingDir}}/build/qt_temp/elfutils + maxTimeInSeconds: 3600 + maxTimeBetweenOutput: 360 + userMessageOnFailure: "Failed to extract elfutils package, check logs." + - type: ExecuteCommand + command: >- + curl --fail -L --retry 5 --retry-delay 5 + -o {{.AgentWorkingDir}}/build/qt_temp/libclang.7z + {{.Env.LLVM_BASE_URL}}{{.Env.QTC_LLVM_POSTFIX}} + maxTimeInSeconds: 3600 + maxTimeBetweenOutput: 360 + userMessageOnFailure: "Failed to download LLVM package, check logs." + - type: ExecuteCommand + command: "7z x -y {{.AgentWorkingDir}}/build/qt_temp/libclang.7z -o{{.AgentWorkingDir}}/build/qt_temp/" + maxTimeInSeconds: 3600 + maxTimeBetweenOutput: 360 + userMessageOnFailure: "Failed to extract LLVM package, check logs." enable_if: condition: property property: host.os @@ -47,6 +61,19 @@ instructions: maxTimeInSeconds: 3600 maxTimeBetweenOutput: 360 userMessageOnFailure: "Failed to install qt, check logs." + - type: ExecuteCommand + command: >- + curl --fail -L --retry 5 --retry-delay 5 + -o {{.AgentWorkingDir}}/build/qt_temp/libclang.7z + {{.Env.LLVM_BASE_URL}}{{.Env.QTC_LLVM_POSTFIX}} + maxTimeInSeconds: 3600 + maxTimeBetweenOutput: 360 + userMessageOnFailure: "Failed to download LLVM package, check logs." + - type: ExecuteCommand + command: "7z x -y {{.AgentWorkingDir}}/build/qt_temp/libclang.7z -o{{.AgentWorkingDir}}/build/qt_temp/" + maxTimeInSeconds: 3600 + maxTimeBetweenOutput: 360 + userMessageOnFailure: "Failed to extract LLVM package, check logs." enable_if: condition: property property: host.os @@ -64,6 +91,102 @@ instructions: maxTimeInSeconds: 3600 maxTimeBetweenOutput: 360 userMessageOnFailure: "Failed to install qt, check logs." + - type: ExecuteCommand + command: >- + curl --fail -L --retry 5 --retry-delay 5 + -o {{.AgentWorkingDir}}\build\qt_temp\elfutils.7z + {{.Env.QTC_ELFUTILS_URL}} + maxTimeInSeconds: 3600 + maxTimeBetweenOutput: 360 + userMessageOnFailure: "Failed to download elfutils package, check logs." + - type: ExecuteCommand + command: >- + 7z.exe x -y + {{.AgentWorkingDir}}\build\qt_temp\elfutils.7z + -o{{.AgentWorkingDir}}\build\qt_temp\elfutils + maxTimeInSeconds: 3600 + maxTimeBetweenOutput: 360 + userMessageOnFailure: "Failed to extract elfutils package, check logs." + - type: ExecuteCommand + command: >- + curl --fail -L --retry 5 --retry-delay 5 + -o {{.AgentWorkingDir}}\build\qt_temp\Python311-win-x64.7z + https://master.qt.io/development_releases/prebuilt/python/Python311-win-x64.7z + maxTimeInSeconds: 3600 + maxTimeBetweenOutput: 360 + userMessageOnFailure: "Failed to download python package, check logs." + - type: ExecuteCommand + command: >- + 7z.exe x -y + {{.AgentWorkingDir}}\build\qt_temp\Python311-win-x64.7z + -o{{.AgentWorkingDir}}\build\qt_temp\python + maxTimeInSeconds: 3600 + maxTimeBetweenOutput: 360 + userMessageOnFailure: "Failed to extract python package, check logs." + - type: ExecuteCommand + command: >- + curl --fail -L --retry 5 --retry-delay 5 + -o {{.AgentWorkingDir}}\build\qt_temp\python-3.11.9-embed-amd64.zip + https://master.qt.io/development_releases/prebuilt/python/python-3.11.9-embed-amd64.zip + maxTimeInSeconds: 3600 + maxTimeBetweenOutput: 360 + userMessageOnFailure: "Failed to download python package, check logs." + - type: ExecuteCommand + command: >- + 7z.exe x -y + {{.AgentWorkingDir}}\build\qt_temp\python-3.11.9-embed-amd64.zip + -o{{.AgentWorkingDir}}\build\qt_temp\python-amd64 + maxTimeInSeconds: 3600 + maxTimeBetweenOutput: 360 + userMessageOnFailure: "Failed to extract python package, check logs." + - type: ExecuteCommand + command: >- + curl --fail -L --retry 5 --retry-delay 5 + -o {{.AgentWorkingDir}}\build\qt_temp\python-3.11.9-embed-arm64.zip + https://master.qt.io/development_releases/prebuilt/python/python-3.11.9-embed-arm64.zip + maxTimeInSeconds: 3600 + maxTimeBetweenOutput: 360 + userMessageOnFailure: "Failed to download python package, check logs." + - type: ExecuteCommand + command: >- + 7z.exe x -y + {{.AgentWorkingDir}}\build\qt_temp\python-3.11.9-embed-arm64.zip + -o{{.AgentWorkingDir}}\build\qt_temp\python-arm64 + maxTimeInSeconds: 3600 + maxTimeBetweenOutput: 360 + userMessageOnFailure: "Failed to extract python package, check logs." + - type: ExecuteCommand + command: >- + curl --fail -L --retry 5 --retry-delay 5 + -o {{.AgentWorkingDir}}\build\qt_temp\python-3.11.9-embed-win32.zip + https://master.qt.io/development_releases/prebuilt/python/python-3.11.9-embed-win32.zip + maxTimeInSeconds: 3600 + maxTimeBetweenOutput: 360 + userMessageOnFailure: "Failed to download python package, check logs." + - type: ExecuteCommand + command: >- + 7z.exe x -y + {{.AgentWorkingDir}}\build\qt_temp\python-3.11.9-embed-win32.zip + -o{{.AgentWorkingDir}}\build\qt_temp\python-win32 + maxTimeInSeconds: 3600 + maxTimeBetweenOutput: 360 + userMessageOnFailure: "Failed to extract python package, check logs." + - type: ExecuteCommand + command: >- + curl --fail -L --retry 5 --retry-delay 5 + -o {{.AgentWorkingDir}}\build\qt_temp\libclang.7z + {{.Env.LLVM_BASE_URL}}{{.Env.QTC_LLVM_POSTFIX}} + maxTimeInSeconds: 3600 + maxTimeBetweenOutput: 360 + userMessageOnFailure: "Failed to download LLVM package, check logs." + - type: ExecuteCommand + command: >- + 7z.exe x -y + {{.AgentWorkingDir}}\build\qt_temp\libclang.7z + -o{{.AgentWorkingDir}}\build\qt_temp + maxTimeInSeconds: 3600 + maxTimeBetweenOutput: 360 + userMessageOnFailure: "Failed to extract LLVM package, check logs." enable_if: condition: and conditions: @@ -73,8 +196,3 @@ instructions: - condition: property property: target.arch equals_value: X86_64 - -enable_if: - condition: property - property: features - not_contains_value: "Qt5" diff --git a/coin/instructions/test.yaml b/coin/instructions/test.yaml index 26b211d1ef8..c66442585e4 100644 --- a/coin/instructions/test.yaml +++ b/coin/instructions/test.yaml @@ -13,7 +13,3 @@ instructions: maxTimeInSeconds: 600 maxTimeBetweenOutput: 600 userMessageOnFailure: "Failed to run tests, check logs" -enable_if: - condition: property - property: features - not_contains_value: "Qt5"