Skip to content

Commit

Permalink
ci: properly differentiate between windows build artifacts on PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
xTVaser committed Dec 22, 2023
1 parent fdaccee commit 7077367
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/scripts/common/name-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

# Inputs as env-vars
# OS
# CMAKE_FLAGS
# BUILD_CONFIGURATION
# BUILD_SYSTEM
# ARCH
# SIMD
Expand Down Expand Up @@ -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}")
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/windows_build_qt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 7077367

Please sign in to comment.