Skip to content

Commit b0d8636

Browse files
committed
ci: Grant write permission before toolchain output directory cleanup
This commit updates the CI workflow to grant write permission to the toolchain build output directory and its sub-directories before attempting to clean up unneeded files. This is necessary because crosstool-ng may create output directories without write permission (e.g. when building on macOS). Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
1 parent 7cd977f commit b0d8636

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -729,15 +729,15 @@ jobs:
729729
OUTPUT_DIR="output"
730730
fi
731731
732+
# Grant write permission for owner
733+
chmod -R u+w ${OUTPUT_BASE}/${OUTPUT_DIR}
734+
732735
# Remove unneeded files from output directory
733736
pushd ${OUTPUT_BASE}/${OUTPUT_DIR}/${{ matrix.target }}
734737
rm -rf newlib-nano
735738
rm -f build.log.bz2
736739
popd
737740
738-
# Grant write permission for owner
739-
chmod -R u+w ${OUTPUT_BASE}/${OUTPUT_DIR}
740-
741741
# Rename Canadian cross-compiled toolchain output directory to
742742
# "output" for consistency
743743
if [ "${OUTPUT_DIR}" != "output" ]; then

0 commit comments

Comments
 (0)