@@ -40,49 +40,26 @@ jobs:
40
40
uses : actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
41
41
with :
42
42
path : ~/graphviz-cache
43
- key : graphviz-installed-${{ runner.os }}-v3
43
+ key : graphviz-installed-${{ runner.os }}
44
44
45
45
- name : Install Graphviz
46
46
run : |
47
- echo "Cache hit: ${{ steps.cache-graphviz.outputs.cache-hit }}"
48
47
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
62
54
else
63
- echo "Installing fresh"
64
- echo "Updating package list..."
65
55
sudo apt-get update
66
- echo "Installing graphviz..."
67
56
sudo apt-get install -y graphviz
68
- echo "Creating cache directories..."
69
57
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
78
62
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"
86
63
87
64
- name : Run tests
88
65
run : make test
0 commit comments