@@ -52,12 +52,26 @@ jobs:
52
52
if : steps.cache-apt.outputs.cache-hit != 'true'
53
53
shell : bash
54
54
run : |
55
+ set -x
55
56
sudo apt-get update
56
57
sudo apt-get install -y --no-install-recommends ${{ env.PKGS }}
57
58
58
59
# Cache the installed files
60
+ echo "Creating package cache..."
59
61
mkdir -p ~/apt-install-cache
60
- dpkg -L ${{ env.PKGS }} | grep -v "^/\.$" | sudo tar --ignore-failed-read -czf ~/apt-install-cache/packages.tar.gz -T - || true
62
+ dpkg -L ${{ env.PKGS }} | grep -v "^/\.$" | sudo tar --ignore-failed-read -czf ~/apt-install-cache/packages.tar.gz -T - || {
63
+ TAR_EXIT=$?
64
+ echo "tar exited with code: $TAR_EXIT"
65
+ if [ -f ~/apt-install-cache/packages.tar.gz ]; then
66
+ echo "Cache file was created successfully despite tar exit code"
67
+ ls -lh ~/apt-install-cache/packages.tar.gz
68
+ exit 0
69
+ else
70
+ echo "Cache file was NOT created"
71
+ exit 1
72
+ fi
73
+ }
74
+ echo "Cache created successfully"
61
75
62
76
- name : Check branch name
63
77
shell : bash
@@ -111,12 +125,26 @@ jobs:
111
125
if : steps.cache-apt.outputs.cache-hit != 'true'
112
126
shell : bash
113
127
run : |
128
+ set -x
114
129
sudo apt-get update
115
130
sudo apt-get install -y --no-install-recommends ${{ env.PKGS }}
116
131
117
132
# Cache the installed files
133
+ echo "Creating package cache..."
118
134
mkdir -p ~/apt-install-cache
119
- dpkg -L ${{ env.PKGS }} | grep -v "^/\.$" | sudo tar --ignore-failed-read -czf ~/apt-install-cache/packages.tar.gz -T - || true
135
+ dpkg -L ${{ env.PKGS }} | grep -v "^/\.$" | sudo tar --ignore-failed-read -czf ~/apt-install-cache/packages.tar.gz -T - || {
136
+ TAR_EXIT=$?
137
+ echo "tar exited with code: $TAR_EXIT"
138
+ if [ -f ~/apt-install-cache/packages.tar.gz ]; then
139
+ echo "Cache file was created successfully despite tar exit code"
140
+ ls -lh ~/apt-install-cache/packages.tar.gz
141
+ exit 0
142
+ else
143
+ echo "Cache file was NOT created"
144
+ exit 1
145
+ fi
146
+ }
147
+ echo "Cache created successfully"
120
148
121
149
- name : Cache Intel OneAPI
122
150
id : cache-oneapi
@@ -197,12 +225,26 @@ jobs:
197
225
if : steps.cache-apt.outputs.cache-hit != 'true'
198
226
shell : bash
199
227
run : |
228
+ set -x
200
229
sudo apt-get update
201
230
sudo apt-get install -y --no-install-recommends ${{ env.PKGS }}
202
231
203
232
# Cache the installed files
233
+ echo "Creating package cache..."
204
234
mkdir -p ~/apt-install-cache
205
- dpkg -L ${{ env.PKGS }} | grep -v "^/\.$" | sudo tar --ignore-failed-read -czf ~/apt-install-cache/packages.tar.gz -T - || true
235
+ dpkg -L ${{ env.PKGS }} | grep -v "^/\.$" | sudo tar --ignore-failed-read -czf ~/apt-install-cache/packages.tar.gz -T - || {
236
+ TAR_EXIT=$?
237
+ echo "tar exited with code: $TAR_EXIT"
238
+ if [ -f ~/apt-install-cache/packages.tar.gz ]; then
239
+ echo "Cache file was created successfully despite tar exit code"
240
+ ls -lh ~/apt-install-cache/packages.tar.gz
241
+ exit 0
242
+ else
243
+ echo "Cache file was NOT created"
244
+ exit 1
245
+ fi
246
+ }
247
+ echo "Cache created successfully"
206
248
207
249
- name : Check branch name
208
250
shell : bash
0 commit comments