mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-04-22 04:27:58 +00:00
Initialize LLVM submodule first
This commit is contained in:
@@ -20,26 +20,22 @@ runs:
|
||||
shell: bash
|
||||
run: |
|
||||
if [ -z "${{ inputs.version }}" ]; then
|
||||
# Get the full version from the LLVM submodule
|
||||
if [ -d "llvm/.git" ]; then
|
||||
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 "Could not detect LLVM version from submodule, will use latest release"
|
||||
echo "version_prefix=" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
cd ..
|
||||
# Get the full version from the LLVM submodule.
|
||||
git submodule update --init --recursive --depth 1
|
||||
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 "LLVM submodule not initialized, 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
|
||||
|
||||
Reference in New Issue
Block a user