File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -41,12 +41,19 @@ jobs:
4141 run : |
4242 BRANCH="${{ github.base_ref }}" # on: pull_request, otherwise null
4343 BRANCH=${BRANCH:-${{ github.ref_name }}} # on: push
44- LLVM_VERSION_LONG=$(echo $BRANCH | grep -oP 'ocl-open-\K\d+') # Eg. 190 for LLVM 19
45- if [ -z "$LLVM_VERSION_LONG" ]; then
44+ # Extract the padded LLVM version (e.g., 190 for LLVM 19)
45+ LLVM_VERSION_PADDED=$(echo $BRANCH | grep -oP 'ocl-open-\K\d+')
46+ if [ -z "$LLVM_VERSION_PADDED" ]; then
4647 echo "[OPENCL-CLANG] Error: Could not parse LLVM version from branch name '$BRANCH'"
4748 exit 1
4849 fi
49- LLVM_VERSION_SHORT=${LLVM_VERSION_LONG::-1} # Eg. 19 for LLVM 19
50+ # Extract the actual LLVM version (e.g., 19 from 190)
51+ if [[ "$LLVM_VERSION_PADDED" =~ ^([0-9]+)0$ ]]; then
52+ LLVM_VERSION_SHORT="${BASH_REMATCH[1]}"
53+ else
54+ echo "[OPENCL-CLANG] Error: Unexpected LLVM version format '$LLVM_VERSION_PADDED' from branch name '$BRANCH'"
55+ exit 1
56+ fi
5057 echo "llvm_version=$LLVM_VERSION_SHORT" >> $GITHUB_OUTPUT
5158
5259 - name : Run build-opencl-clang action
You can’t perform that action at this time.
0 commit comments