Skip to content

Commit 460e23d

Browse files
committed
Do some debugging
1 parent 6bae8a1 commit 460e23d

File tree

1 file changed

+45
-3
lines changed

1 file changed

+45
-3
lines changed

.github/workflows/build.yml

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,26 @@ jobs:
5252
if: steps.cache-apt.outputs.cache-hit != 'true'
5353
shell: bash
5454
run: |
55+
set -x
5556
sudo apt-get update
5657
sudo apt-get install -y --no-install-recommends ${{ env.PKGS }}
5758
5859
# Cache the installed files
60+
echo "Creating package cache..."
5961
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"
6175
6276
- name: Check branch name
6377
shell: bash
@@ -111,12 +125,26 @@ jobs:
111125
if: steps.cache-apt.outputs.cache-hit != 'true'
112126
shell: bash
113127
run: |
128+
set -x
114129
sudo apt-get update
115130
sudo apt-get install -y --no-install-recommends ${{ env.PKGS }}
116131
117132
# Cache the installed files
133+
echo "Creating package cache..."
118134
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"
120148
121149
- name: Cache Intel OneAPI
122150
id: cache-oneapi
@@ -197,12 +225,26 @@ jobs:
197225
if: steps.cache-apt.outputs.cache-hit != 'true'
198226
shell: bash
199227
run: |
228+
set -x
200229
sudo apt-get update
201230
sudo apt-get install -y --no-install-recommends ${{ env.PKGS }}
202231
203232
# Cache the installed files
233+
echo "Creating package cache..."
204234
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"
206248
207249
- name: Check branch name
208250
shell: bash

0 commit comments

Comments
 (0)