Skip to content

Commit 7971bef

Browse files
committed
ci: update cache Graphviz
1 parent 051d649 commit 7971bef

File tree

1 file changed

+11
-34
lines changed

1 file changed

+11
-34
lines changed

.github/workflows/ci-test.yml

Lines changed: 11 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -40,49 +40,26 @@ jobs:
4040
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
4141
with:
4242
path: ~/graphviz-cache
43-
key: graphviz-installed-${{ runner.os }}-v3
43+
key: graphviz-installed-${{ runner.os }}
4444

4545
- name: Install Graphviz
4646
run: |
47-
echo "Cache hit: ${{ steps.cache-graphviz.outputs.cache-hit }}"
4847
if [ "${{ steps.cache-graphviz.outputs.cache-hit }}" = "true" ]; then
49-
echo "Restoring from cache"
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 "Copying plugin directory..."
57-
sudo cp -r ~/graphviz-cache/lib/graphviz /usr/lib/x86_64-linux-gnu/ 2>/dev/null || echo "Failed to copy plugins"
58-
echo "Running ldconfig..."
59-
sudo ldconfig || echo "ldconfig failed"
60-
echo "Registering graphviz plugins..."
61-
sudo dot -c || echo "Plugin registration failed"
48+
sudo cp ~/graphviz-cache/bin/* /usr/bin/ 2>/dev/null
49+
sudo cp ~/graphviz-cache/lib/* /usr/lib/x86_64-linux-gnu/ 2>/dev/null
50+
sudo cp -r ~/graphviz-cache/share/graphviz /usr/share/ 2>/dev/null
51+
sudo cp -r ~/graphviz-cache/lib/graphviz /usr/lib/x86_64-linux-gnu/ 2>/dev/null
52+
sudo ldconfig
53+
sudo dot -c
6254
else
63-
echo "Installing fresh"
64-
echo "Updating package list..."
6555
sudo apt-get update
66-
echo "Installing graphviz..."
6756
sudo apt-get install -y graphviz
68-
echo "Creating cache directories..."
6957
mkdir -p ~/graphviz-cache/{bin,lib,share}
70-
echo "Caching binaries..."
71-
cp /usr/bin/{dot,neato,twopi,circo,fdp,sfdp,patchwork,osage} ~/graphviz-cache/bin/ 2>/dev/null || echo "Some binaries not found"
72-
echo "Caching libraries..."
73-
cp /usr/lib/x86_64-linux-gnu/lib{gvc,cgraph,cdt,pathplan,gvpr,lab-gamut,ann,gts}* ~/graphviz-cache/lib/ 2>/dev/null || echo "Some libraries not found"
74-
echo "Caching plugin directory..."
75-
cp -r /usr/lib/x86_64-linux-gnu/graphviz ~/graphviz-cache/lib/ 2>/dev/null || echo "Plugin directory not found"
76-
echo "Caching share files..."
77-
cp -r /usr/share/graphviz ~/graphviz-cache/share/ 2>/dev/null || echo "Share files not found"
58+
cp /usr/bin/{dot,neato,twopi,circo,fdp,sfdp,patchwork,osage} ~/graphviz-cache/bin/ 2>/dev/null
59+
cp /usr/lib/x86_64-linux-gnu/lib{gvc,cgraph,cdt,pathplan,gvpr,lab-gamut,ann,gts}* ~/graphviz-cache/lib/ 2>/dev/null
60+
cp -r /usr/lib/x86_64-linux-gnu/graphviz ~/graphviz-cache/lib/ 2>/dev/null
61+
cp -r /usr/share/graphviz ~/graphviz-cache/share/ 2>/dev/null
7862
fi
79-
echo "Testing dot command:"
80-
if which dot; then
81-
dot -V || echo "dot -V failed but dot exists"
82-
else
83-
echo "dot command not found"
84-
fi
85-
echo "Install Graphviz step completed"
8663
8764
- name: Run tests
8865
run: make test

0 commit comments

Comments
 (0)