Skip to content

Commit fc0b119

Browse files
authored
Merge 0e29810 into ecdf10c
2 parents ecdf10c + 0e29810 commit fc0b119

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

.github/workflows/integration_tests.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,10 +406,21 @@ jobs:
406406
name: log-artifact
407407
path: build-results-desktop-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.ssl_variant }}*
408408
retention-days: ${{ env.artifactRetentionDays }}
409-
- name: Cleanup Local Copies of Uploaded Artifacts
409+
- name: Cleanup local copies of uploaded artifacts, and other extraneous files
410410
shell: bash
411411
run: |
412412
rm -rf testapps-desktop-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.ssl_variant }}
413+
# git clean everything but the "ta" directory and the build results log
414+
echo Before cleanup: $(du -skh)
415+
echo "" >> .gitignore
416+
echo "build-results-*" >> .gitignore
417+
echo "ta/**" >> .gitignore
418+
# Re-include these subdirectories, which CAN be cleaned.
419+
echo "!ta/*/*/CMakeFiles" >> .gitignore
420+
echo "!ta/*/*/external" >> .gitignore
421+
echo "!ta/*/*/bin" >> .gitignore
422+
git clean -fd
423+
echo After cleanup: $(du -skh)
413424
- name: Set CLOUDSDK_PYTHON (Windows)
414425
shell: bash
415426
if: startsWith(matrix.os, 'windows') && !cancelled()

cmake/external_rules.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,9 @@ function(build_external_dependencies)
240240
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE})
241241
endif()
242242
endif()
243+
# Propagate the PIC setting, as the dependencies need to match it
244+
set(CMAKE_SUB_CONFIGURE_OPTIONS ${CMAKE_SUB_CONFIGURE_OPTIONS}
245+
-DCMAKE_POSITION_INDEPENDENT_CODE=${CMAKE_POSITION_INDEPENDENT_CODE})
243246
message(STATUS "Sub-configure options: ${CMAKE_SUB_CONFIGURE_OPTIONS}")
244247
message(STATUS "Sub-build options: ${CMAKE_SUB_BUILD_OPTIONS}")
245248

scripts/gha/build_testapps.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
import platform
8181
import shutil
8282
import subprocess
83+
import stat
8384
import sys
8485
import tempfile
8586

@@ -697,11 +698,17 @@ def _run(args, timeout=_DEFAULT_RUN_TIMEOUT_SECONDS, capture_output=False, text=
697698
check=check)
698699

699700

701+
def _remove_readonly(func, path, excinfo):
702+
"""Function passed into shutil.rmtree to handle Access Denied error"""
703+
os.chmod(path, stat.S_IWRITE)
704+
func(path)
705+
706+
700707
def _rm_dir_safe(directory_path):
701708
"""Removes directory at given path. No error if dir doesn't exist."""
702709
logging.info("Deleting %s...", directory_path)
703710
try:
704-
shutil.rmtree(directory_path)
711+
shutil.rmtree(directory_path, onerror=_remove_readonly)
705712
except OSError as e:
706713
# There are two known cases where this can happen:
707714
# The directory doesn't exist (FileNotFoundError)

0 commit comments

Comments
 (0)