Skip to content

Commit c9af94b

Browse files
committed
chore: enable python-crc32c kokoro presubmits
1 parent 2e508b6 commit c9af94b

File tree

10 files changed

+10
-43
lines changed

10 files changed

+10
-43
lines changed

.kokoro/presubmit/linux/presubmit-linux.cfg

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,4 @@ action {
66
regex: "**/*sponge_log.xml"
77
}
88
}
9-
10-
# Bypass the trampoline entirely and run our dummy script natively
11-
build_file: "google-cloud-python/packages/google-crc32c/scripts/bypass.sh"
9+
build_file: "google-cloud-python/packages/google-crc32c/scripts/manylinux/build.sh"

.kokoro/presubmit/osx/presubmit-osx-slcn.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,4 @@ action {
77
}
88
}
99

10-
# Reuse the exact same bash script we used for Linux!
11-
build_file: "google-cloud-python/packages/google-crc32c/scripts/bypass.sh"
10+
build_file: "google-cloud-python/packages/google-crc32c/scripts/osx/build.sh"

.kokoro/presubmit/osx/presubmit-osx.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,4 @@ action {
77
}
88
}
99

10-
# Reuse the exact same bash script we used for Linux!
11-
build_file: "google-cloud-python/packages/google-crc32c/scripts/bypass.sh"
10+
build_file: "google-cloud-python/packages/google-crc32c/scripts/osx/build.sh"

.kokoro/presubmit/windows/presubmit-windows-google-crc32c.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,4 @@ action {
77
}
88
}
99

10-
# Reuse the exact same bash script we used for Linux!
11-
build_file: "google-cloud-python/packages/google-crc32c/scripts/bypass.bat"
10+
build_file: "google-cloud-python/packages/google-crc32c/scripts/windows/build.bat"

packages/google-crc32c/scripts/bypass.bat

Lines changed: 0 additions & 7 deletions
This file was deleted.

packages/google-crc32c/scripts/bypass.sh

Lines changed: 0 additions & 11 deletions
This file was deleted.

packages/google-crc32c/scripts/manylinux/build.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ sudo apt-get install -y python3.12
2828

2929
cd $REPO_ROOT
3030
# Add directory as safe to avoid "detected dubious ownership" fatal issue1
31-
git config --global --add safe.directory $REPO_ROOT
32-
git config --global --add safe.directory $REPO_ROOT/google_crc32c
31+
git config --global --add safe.directory '*'
3332
git submodule update --init --recursive
3433

3534

packages/google-crc32c/scripts/osx/build.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ export CRC32C_INSTALL_PREFIX="${REPO_ROOT}/usr"
3232

3333
cd ${REPO_ROOT}
3434
# Add directory as safe to avoid "detected dubious ownership" fatal issue
35-
git config --global --add safe.directory $REPO_ROOT
36-
git config --global --add safe.directory $REPO_ROOT/google_crc32c
35+
git config --global --add safe.directory '*'
3736
git submodule update --init --recursive
3837

3938
${OSX_DIR}/build_c_lib.sh

packages/google-crc32c/scripts/osx/build_python_wheel.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,8 @@ install_python_pyenv() {
5252
install_python_pyenv ${PY_BIN}
5353

5454

55-
# ``readlink -f`` is not our friend on OS X. This relies on **some**
56-
# ``python`` being installed.
57-
SCRIPT_FI=$(python3 -c "import os; print(os.path.realpath('${0}'))")
58-
OSX_DIR=$(dirname ${SCRIPT_FI})
59-
SCRIPTS_DIR=$(dirname ${OSX_DIR})
60-
export REPO_ROOT=$(dirname ${SCRIPTS_DIR})
55+
# Rely on the REPO_ROOT already provided by the parent script
56+
OSX_DIR="${REPO_ROOT}/scripts/osx"
6157

6258
# Create a virtualenv where we can install Python build dependencies.
6359
VENV=${REPO_ROOT}/venv${PY_BIN}

packages/google-crc32c/scripts/windows/build.bat

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,8 @@ FOR %%P IN (3.9, 3.10, 3.11, 3.12, 3.13.1, 3.14.0) DO (
4040
py -!python_version_trimmed!-64 -m pip install cmake
4141

4242
@rem Add directory as safe to avoid "detected dubious ownership" fatal issue
43-
git config --global --add safe.directory %cd%
44-
git config --global --add safe.directory C:/tmpfs/src/github/python-crc32c
43+
git config --global --add safe.directory *
4544
git submodule update --init --recursive
46-
47-
git config --global --add safe.directory %cd%\google_crc32c
48-
git config --global --add safe.directory C:/tmpfs/src/github/python-crc32c/google_crc32c
4945
pushd google_crc32c
5046
@rem reset hard to cleanup any changes done by a previous build.
5147
git reset --hard
@@ -59,7 +55,7 @@ FOR %%P IN (3.9, 3.10, 3.11, 3.12, 3.13.1, 3.14.0) DO (
5955

6056
echo "Running cmake with Generator: %CMAKE_GENERATOR%, Platform: x64, Install Prefix: %CRC32C_INSTALL_PREFIX%"
6157

62-
py -!python_version_trimmed!-64 -m cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_POLICY_VERSION_MINIMUM=3.12 -DCRC32C_BUILD_BENCHMARKS=no -DCRC32C_BUILD_TESTS=no -DBUILD_SHARED_LIBS=yes -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=yes -DCRC32C_USE_GLOG=0 -DCMAKE_INSTALL_PREFIX:PATH=C:\tmpfs\src\github\python-crc32c\build\RelWithDebInfo ..
58+
py -!python_version_trimmed!-64 -m cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_POLICY_VERSION_MINIMUM=3.12 -DCRC32C_BUILD_BENCHMARKS=no -DCRC32C_BUILD_TESTS=no -DBUILD_SHARED_LIBS=yes -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=yes -DCRC32C_USE_GLOG=0 -DCMAKE_INSTALL_PREFIX:PATH="%CRC32C_INSTALL_PREFIX%" ..
6359

6460
py -!python_version_trimmed!-64 -m cmake --build . --config "%CONFIGURATION%" --target install
6561

0 commit comments

Comments
 (0)