Skip to content

Commit 0c1ff93

Browse files
committed
ci: update cache Graphviz
1 parent e402e93 commit 0c1ff93

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

.github/workflows/ci-test.yml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,25 +47,36 @@ jobs:
4747
echo "Cache hit: ${{ steps.cache-graphviz.outputs.cache-hit }}"
4848
if [ "${{ steps.cache-graphviz.outputs.cache-hit }}" = "true" ]; then
4949
echo "Restoring from cache"
50-
sudo cp ~/graphviz-cache/bin/* /usr/bin/ 2>/dev/null
51-
sudo cp ~/graphviz-cache/lib/* /usr/lib/x86_64-linux-gnu/ 2>/dev/null
52-
sudo cp -r ~/graphviz-cache/share/graphviz /usr/share/ 2>/dev/null
53-
sudo ldconfig
50+
echo "Copying binaries..."
51+
sudo cp ~/graphviz-cache/bin/* /usr/bin/ 2>/dev/null || echo "Failed to copy binaries"
52+
echo "Copying libraries..."
53+
sudo cp ~/graphviz-cache/lib/* /usr/lib/x86_64-linux-gnu/ 2>/dev/null || echo "Failed to copy libraries"
54+
echo "Copying share files..."
55+
sudo cp -r ~/graphviz-cache/share/graphviz /usr/share/ 2>/dev/null || echo "Failed to copy share files"
56+
echo "Running ldconfig..."
57+
sudo ldconfig || echo "ldconfig failed"
5458
else
5559
echo "Installing fresh"
60+
echo "Updating package list..."
5661
sudo apt-get update
62+
echo "Installing graphviz..."
5763
sudo apt-get install -y graphviz
64+
echo "Creating cache directories..."
5865
mkdir -p ~/graphviz-cache/{bin,lib,share}
59-
cp /usr/bin/{dot,neato,twopi,circo,fdp,sfdp,patchwork,osage} ~/graphviz-cache/bin/ 2>/dev/null
60-
cp /usr/lib/x86_64-linux-gnu/lib{gvc,cgraph,cdt,pathplan,gvpr,lab-gamut}* ~/graphviz-cache/lib/ 2>/dev/null
61-
cp -r /usr/share/graphviz ~/graphviz-cache/share/ 2>/dev/null
66+
echo "Caching binaries..."
67+
cp /usr/bin/{dot,neato,twopi,circo,fdp,sfdp,patchwork,osage} ~/graphviz-cache/bin/ 2>/dev/null || echo "Some binaries not found"
68+
echo "Caching libraries..."
69+
cp /usr/lib/x86_64-linux-gnu/lib{gvc,cgraph,cdt,pathplan,gvpr,lab-gamut}* ~/graphviz-cache/lib/ 2>/dev/null || echo "Some libraries not found"
70+
echo "Caching share files..."
71+
cp -r /usr/share/graphviz ~/graphviz-cache/share/ 2>/dev/null || echo "Share files not found"
6272
fi
6373
echo "Testing dot command:"
6474
if which dot; then
65-
dot -V || true
75+
dot -V || echo "dot -V failed but dot exists"
6676
else
6777
echo "dot command not found"
6878
fi
79+
echo "Install Graphviz step completed"
6980
7081
- name: Run tests
7182
run: make test

0 commit comments

Comments
 (0)