mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-07-23 10:25:40 +00:00
Initialize LLVM submodule first
This commit is contained in:
@@ -20,26 +20,22 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if [ -z "${{ inputs.version }}" ]; then
|
if [ -z "${{ inputs.version }}" ]; then
|
||||||
# Get the full version from the LLVM submodule
|
# Get the full version from the LLVM submodule.
|
||||||
if [ -d "llvm/.git" ]; then
|
git submodule update --init --recursive --depth 1
|
||||||
cd llvm
|
cd llvm
|
||||||
# Try to get the most recent tag (e.g., "llvmorg-18.1.8")
|
# Try to get the most recent tag (e.g., "llvmorg-18.1.8")
|
||||||
LLVM_TAG=$(git describe --tags --abbrev=0 2>/dev/null)
|
LLVM_TAG=$(git describe --tags --abbrev=0 2>/dev/null)
|
||||||
if [ -n "$LLVM_TAG" ]; then
|
if [ -n "$LLVM_TAG" ]; then
|
||||||
echo "Detected LLVM version from submodule: $LLVM_TAG"
|
echo "Detected LLVM version from submodule: $LLVM_TAG"
|
||||||
# Convert "llvmorg-x.y.z" to "llvm-x.y.z"
|
# Convert "llvmorg-x.y.z" to "llvm-x.y.z"
|
||||||
LLVM_VERSION=$(echo "$LLVM_TAG" | sed 's/^llvmorg-/llvm-/')
|
LLVM_VERSION=$(echo "$LLVM_TAG" | sed 's/^llvmorg-/llvm-/')
|
||||||
echo "Detected LLVM version from submodule: $LLVM_VERSION"
|
echo "Detected LLVM version from submodule: $LLVM_VERSION"
|
||||||
echo "version_prefix=$LLVM_VERSION" >> $GITHUB_OUTPUT
|
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 ..
|
|
||||||
else
|
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
|
echo "version_prefix=" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
cd ..
|
||||||
else
|
else
|
||||||
echo "Using explicitly provided version: ${{ inputs.version }}"
|
echo "Using explicitly provided version: ${{ inputs.version }}"
|
||||||
echo "version_prefix=${{ inputs.version }}" >> $GITHUB_OUTPUT
|
echo "version_prefix=${{ inputs.version }}" >> $GITHUB_OUTPUT
|
||||||
|
|||||||
Reference in New Issue
Block a user