Skip to content

Commit 382117e

Browse files
committed
update build
1 parent c666e2c commit 382117e

File tree

1 file changed

+44
-10
lines changed

1 file changed

+44
-10
lines changed

.github/workflows/build-llvm-artifacts.yml

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,34 +92,68 @@ jobs:
9292
run: |
9393
cd build-static
9494
ninja -j$(nproc)
95-
96-
# Install directly to the install prefix
95+
96+
- name: Install LLVM
97+
run: |
98+
cd build-static
9799
ninja install
100+
101+
# Verify installation
102+
ls -la "${{ github.workspace }}/llvm-install/bin/" || echo "Install directory not found"
103+
ls -la "${{ github.workspace }}/llvm-install/lib/" || echo "Lib directory not found"
98104
99105
- name: Prepare Artifact Package
100106
run: |
101-
mkdir -p artifact-package
107+
mkdir -p artifact-package/{lib,include,bin}
102108
103-
# Copy from the install directory
104109
INSTALL_DIR="${{ github.workspace }}/llvm-install"
105110
106-
# Copy essential files for Rust linkage
107-
mkdir -p artifact-package/{lib,include,bin}
111+
echo "📦 Packaging LLVM artifacts from: $INSTALL_DIR"
108112
109113
# Copy all static libraries
110-
find "$INSTALL_DIR/lib" -name "*.a" -exec cp {} artifact-package/lib/ \; 2>/dev/null || true
114+
if [ -d "$INSTALL_DIR/lib" ]; then
115+
echo "Copying static libraries..."
116+
find "$INSTALL_DIR/lib" -name "*.a" -exec cp -v {} artifact-package/lib/ \;
117+
echo "✓ Libraries copied: $(ls artifact-package/lib/*.a | wc -l) files"
118+
fi
111119
112120
# Copy headers
113-
cp -r "$INSTALL_DIR/include"/* artifact-package/include/ 2>/dev/null || true
121+
if [ -d "$INSTALL_DIR/include" ]; then
122+
echo "Copying headers..."
123+
cp -r "$INSTALL_DIR/include"/* artifact-package/include/
124+
echo "✓ Headers copied"
125+
fi
114126
115127
# Copy essential LLVM tools
116-
for tool in llvm-config llc llvm-as llvm-dis llvm-link opt wasm-ld; do
128+
echo "Copying LLVM tools..."
129+
for tool in llvm-config llc llvm-as llvm-dis llvm-link opt llvm-ar llvm-nm; do
117130
if [ -f "$INSTALL_DIR/bin/$tool" ]; then
118-
cp "$INSTALL_DIR/bin/$tool" artifact-package/bin/
131+
cp -v "$INSTALL_DIR/bin/$tool" artifact-package/bin/
119132
echo "✓ Copied $tool"
133+
else
134+
echo "⚠️ $tool not found"
120135
fi
121136
done
122137
138+
# Also check build directory for tools
139+
if [ ! -f "artifact-package/bin/llvm-config" ]; then
140+
echo "Trying to copy from build directory..."
141+
if [ -f "build-static/bin/llvm-config" ]; then
142+
for tool in llvm-config llc llvm-as llvm-dis llvm-link opt llvm-ar llvm-nm; do
143+
if [ -f "build-static/bin/$tool" ]; then
144+
cp -v "build-static/bin/$tool" artifact-package/bin/
145+
fi
146+
done
147+
fi
148+
fi
149+
150+
# Verify binaries are present
151+
echo ""
152+
echo "📋 Final artifact contents:"
153+
ls -lh artifact-package/bin/
154+
echo ""
155+
echo "Library count: $(ls artifact-package/lib/*.a 2>/dev/null | wc -l)"
156+
123157
# Create a config script for Rust builds
124158
cat > artifact-package/setup-env.sh << 'EOF'
125159
#!/bin/bash

0 commit comments

Comments
 (0)