Compare commits

...

5 Commits

Author SHA1 Message Date
kvp 1f6264e155 Restore llvm commit 2025-12-18 13:16:30 -05:00
kvp 92e9b1365d remove shallow update when initializing llvm submodule 2025-12-18 12:16:45 -05:00
kvp 541a0560e7 Initialize LLVM submodule first 2025-12-18 12:07:28 -05:00
kvp 89462d6da3 Extra logging 2025-12-18 11:47:59 -05:00
kvp b4728d5c5e Infer full LLVM release version from git's tags
The helps to remove special casing from actions and will make future
LLVM updates smoother.
2025-12-18 11:43:40 -05:00
+14 -16
View File
@@ -20,29 +20,27 @@ runs:
shell: bash
run: |
if [ -z "${{ inputs.version }}" ]; then
# Extract branch from .gitmodules (e.g., "release/18.x")
BRANCH=$(git config -f .gitmodules submodule.llvm.branch)
if [ -n "$BRANCH" ]; then
# Extract version from branch name (e.g., "18.x" from "release/18.x")
VERSION_PREFIX=$(echo "$BRANCH" | sed 's|release/||' | sed 's|\.x$||')
echo "Detected LLVM version prefix from submodule branch: $VERSION_PREFIX"
# Special case: pin LLVM 18 to specific version 18.1.8
if [ "$VERSION_PREFIX" = "18" ]; then
echo "Using pinned version for LLVM 18: llvm-18.1.8"
echo "version_prefix=llvm-18.1.8" >> $GITHUB_OUTPUT
else
echo "version_prefix=llvm-$VERSION_PREFIX" >> $GITHUB_OUTPUT
fi
# Get the full version from the LLVM submodule.
git submodule update --init --recursive
cd llvm
# Try to get the most recent tag (e.g., "llvmorg-18.1.8")
LLVM_TAG=$(git describe --tags --abbrev=0 2>/dev/null)
if [ -n "$LLVM_TAG" ]; then
echo "Detected LLVM version from submodule: $LLVM_TAG"
# Convert "llvmorg-x.y.z" to "llvm-x.y.z"
LLVM_VERSION=$(echo "$LLVM_TAG" | sed 's/^llvmorg-/llvm-/')
echo "Detected LLVM version from submodule: $LLVM_VERSION"
echo "version_prefix=$LLVM_VERSION" >> $GITHUB_OUTPUT
else
echo "No branch found in .gitmodules, will use latest release"
echo "Could not detect LLVM version from submodule, will use latest release"
echo "version_prefix=" >> $GITHUB_OUTPUT
fi
cd ..
else
echo "Using explicitly provided version: ${{ inputs.version }}"
echo "version_prefix=${{ inputs.version }}" >> $GITHUB_OUTPUT
fi
- name: find asset
id: find
uses: actions/github-script@v7