From 7077367a8bc68c8506d01b340667c31aec0510c9 Mon Sep 17 00:00:00 2001 From: Tyler Wilding Date: Fri, 22 Dec 2023 01:02:26 -0500 Subject: [PATCH] ci: properly differentiate between windows build artifacts on PRs --- .../scripts/common/name-artifacts.sh | 28 +++++++++++++++++++ .github/workflows/windows_build_qt.yml | 2 ++ 2 files changed, 30 insertions(+) diff --git a/.github/workflows/scripts/common/name-artifacts.sh b/.github/workflows/scripts/common/name-artifacts.sh index f803be285c34c..d35000ce45d67 100755 --- a/.github/workflows/scripts/common/name-artifacts.sh +++ b/.github/workflows/scripts/common/name-artifacts.sh @@ -8,6 +8,8 @@ # Inputs as env-vars # OS +# CMAKE_FLAGS +# BUILD_CONFIGURATION # BUILD_SYSTEM # ARCH # SIMD @@ -35,6 +37,32 @@ if [[ ! -z "${BUILD_SYSTEM}" ]]; then fi fi +# Isolate artifacts produced with different build systems, otherwise they overwrite each other +# and you have no idea what you got! +if [[ ! -z "${BUILD_SYSTEM}" ]]; then + # differentiate between clang and msvc + # edge case for cmake since cmake presets aren't used, instead flags are manually passed in + if [[ "${BUILD_SYSTEM}" == "cmake" ]]; then + if [[ "${CMAKE_FLAGS,,}" == *"clang"* ]]; then + NAME="${NAME}-clang" + else + NAME="${NAME}-msvc" + fi + else + if [[ "${BUILD_CONFIGURATION,,}" == *"clang"* ]]; then + NAME="${NAME}-clang" + else + NAME="${NAME}-msvc" + fi + fi + # also differentiate between sse4 and avx2 + if [[ "${BUILD_CONFIGURATION,,}" == *"avx2"* ]]; then + NAME="${NAME}-avx2" + else + NAME="${NAME}-sse4" + fi +fi + # Add PR / Commit Metadata if [ "$EVENT_NAME" == "pull_request" ]; then PR_SHA=$(git rev-parse --short "${PR_SHA}") diff --git a/.github/workflows/windows_build_qt.yml b/.github/workflows/windows_build_qt.yml index 392cc5e8fa04c..34cc6730a51fe 100644 --- a/.github/workflows/windows_build_qt.yml +++ b/.github/workflows/windows_build_qt.yml @@ -63,6 +63,8 @@ jobs: shell: bash env: OS: windows + CMAKE_FLAGS: ${{ inputs.cmakeFlags }} + BUILD_CONFIGURATION: ${{ inputs.configuration }} BUILD_SYSTEM: ${{ inputs.buildSystem }} ARCH: ${{ inputs.platform }} SIMD: ${{ inputs.simd }}