Skip to content

Commit d3cac5a

Browse files
committed
replace cached oclcpuexp when the pin changes
The tarball extracts read-only directories, so removing a stale install failed silently and the cached runtime was used.
1 parent b0e10e3 commit d3cac5a

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

‎.github/workflows/os-llvm-sycl-build.yml‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,19 +128,23 @@ jobs:
128128
fi
129129
130130
# pinned deps are fetched independently of the nightly, so a pin
131-
# change replaces whatever the cache restored
131+
# change replaces whatever the cache restored; the oclcpuexp
132+
# tarball extracts read-only directories, so restore write access
133+
# before removing them
132134
if [ ! -f "${OCLCPUEXP_FN}" ]; then
133-
rm -rf oclcpuexp oclcpuexp-*.tar.gz
135+
chmod -R u+w oclcpuexp 2>/dev/null
136+
rm -rf oclcpuexp oclcpuexp-*.tar.gz || exit 1
134137
wget "${DOWNLOAD_URL_PREFIX}/${DRIVER_PATH}/${OCLCPUEXP_FN}" || exit 1
135138
fi
136139
if [ ! -f "${TBB_FN}" ]; then
137-
rm -rf oneapi-tbb-*
140+
chmod -R u+w oneapi-tbb-* 2>/dev/null
141+
rm -rf oneapi-tbb-* || exit 1
138142
wget "${TBB_URL}/${TBB_FN}" || exit 1
139143
fi
140144
mkdir -p oclcpuexp
141-
[ -d oclcpuexp/x64 ] || tar xf "${OCLCPUEXP_FN}" -C oclcpuexp
142-
[ -d "${TBB_INSTALL_DIR}/lib" ] || tar xf "${TBB_FN}"
143-
cp oclcpuexp/x64/libOpenCL.so* dpcpp_compiler/lib/
145+
[ -d oclcpuexp/x64 ] || tar xf "${OCLCPUEXP_FN}" -C oclcpuexp || exit 1
146+
[ -d "${TBB_INSTALL_DIR}/lib" ] || tar xf "${TBB_FN}" || exit 1
147+
cp -f oclcpuexp/x64/libOpenCL.so* dpcpp_compiler/lib/ || exit 1
144148
145149
- name: Setup Python
146150
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0

0 commit comments

Comments
 (0)