Skip to content

admob 2021 merge main with cleanup #959

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
13 changes: 12 additions & 1 deletion .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -406,10 +406,21 @@ jobs:
name: log-artifact
path: build-results-desktop-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.ssl_variant }}*
retention-days: ${{ env.artifactRetentionDays }}
- name: Cleanup Local Copies of Uploaded Artifacts
- name: Cleanup local copies of uploaded artifacts, and other extraneous files
shell: bash
run: |
rm -rf testapps-desktop-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.ssl_variant }}
# git clean everything but the "ta" directory and the build results log
echo Before cleanup: $(du -skh)
echo "" >> .gitignore
echo "build-results-*" >> .gitignore
echo "ta/**" >> .gitignore
# Re-include these subdirectories, which CAN be cleaned.
echo "!ta/*/*/CMakeFiles" >> .gitignore
echo "!ta/*/*/external" >> .gitignore
echo "!ta/*/*/bin" >> .gitignore
git clean -fd
echo After cleanup: $(du -skh)
- name: Set CLOUDSDK_PYTHON (Windows)
shell: bash
if: startsWith(matrix.os, 'windows') && !cancelled()
Expand Down
3 changes: 3 additions & 0 deletions cmake/external_rules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ function(build_external_dependencies)
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE})
endif()
endif()
# Propagate the PIC setting, as the dependencies need to match it
set(CMAKE_SUB_CONFIGURE_OPTIONS ${CMAKE_SUB_CONFIGURE_OPTIONS}
-DCMAKE_POSITION_INDEPENDENT_CODE=${CMAKE_POSITION_INDEPENDENT_CODE})
message(STATUS "Sub-configure options: ${CMAKE_SUB_CONFIGURE_OPTIONS}")
message(STATUS "Sub-build options: ${CMAKE_SUB_BUILD_OPTIONS}")

Expand Down
9 changes: 8 additions & 1 deletion scripts/gha/build_testapps.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
import platform
import shutil
import subprocess
import stat
import sys
import tempfile

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


def _remove_readonly(func, path, excinfo):
"""Function passed into shutil.rmtree to handle Access Denied error"""
os.chmod(path, stat.S_IWRITE)
func(path)


def _rm_dir_safe(directory_path):
"""Removes directory at given path. No error if dir doesn't exist."""
logging.info("Deleting %s...", directory_path)
try:
shutil.rmtree(directory_path)
shutil.rmtree(directory_path, onerror=_remove_readonly)
except OSError as e:
# There are two known cases where this can happen:
# The directory doesn't exist (FileNotFoundError)
Expand Down