Skip to content
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

build: add presubmit scripts using kokoro #235

Merged
merged 2 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ branchProtectionRules:
requiredStatusCheckContexts:
- 'ubuntu-20.04'
- 'macos-13'
- 'windows-2019 ( x64 )'
- 'windows-2022 ( x64 )'
- 'cla/google'
# List of explicit permissions to add (additive only)
permissionRules:
Expand Down
20 changes: 2 additions & 18 deletions .github/workflows/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@ jobs:
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: py.test -v {project}/tests/

- uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: wheelhouse/

build-wheels-macos:
name: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -129,22 +124,16 @@ jobs:
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: py.test -v {project}/tests/

- uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: wheelhouse/

build-wheels-windows:
name: ${{ matrix.os }} ( ${{ matrix.platform }} )

strategy:
matrix:
os:
- windows-2019
- windows-2022
platform:
# For presubmit, just build / test the most common platform
- x64
#- Win32

runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -175,7 +164,7 @@ jobs:
python -m pip install cmake
echo "::endgroup::"
echo "::group::Run cmake to initialze build tree"
cmake -S google_crc32c -B build -G "Visual Studio 16 2019" -A ${{ matrix.platform }} -DCRC32C_BUILD_BENCHMARKS=no -DCRC32C_BUILD_TESTS=no -DBUILD_SHARED_LIBS=no -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=yes -DCRC32C_USE_GLOG=0
cmake -S google_crc32c -B build -G "Visual Studio 17 2022" -A ${{ matrix.platform }} -DCRC32C_BUILD_BENCHMARKS=no -DCRC32C_BUILD_TESTS=no -DBUILD_SHARED_LIBS=no -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=yes -DCRC32C_USE_GLOG=0
echo "::endgroup::"
echo "::group::Run cmake to build library"
cmake --build build --verbose --config Release
Expand Down Expand Up @@ -212,8 +201,3 @@ jobs:
CIBW_BUILD_VERBOSITY: 3
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: py.test -v {project}/tests

- uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: wheelhouse/
250 changes: 0 additions & 250 deletions .github/workflows/python-publish.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .kokoro/build-manylinux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


set -eo pipefail

# Disable buffering, so that the logs stream through.
export PYTHONUNBUFFERED=1

# Debug: show build environment
env | grep KOKORO

cd github/python-crc32c

# Before running nox and such, build the extension.
./scripts/manylinux/build.sh
./scripts/manylinux/check.sh
29 changes: 29 additions & 0 deletions .kokoro/build-osx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -eo pipefail

# Disable buffering, so that the logs stream through.
export PYTHONUNBUFFERED=1

# Debug: show build environment
env | grep KOKORO

cd github/python-crc32c

# Before running nox and such, build the extension.
./scripts/osx/build.sh
./scripts/osx/check.sh
8 changes: 8 additions & 0 deletions .kokoro/continuous/continuous-linux.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Tell the trampoline which build file to use.
env_vars: {
key: "PACKAGE"
value: "crc32c"
}
build_file: "python-crc32c/.kokoro/build-manylinux.sh"
9 changes: 9 additions & 0 deletions .kokoro/continuous/continuous-osx-slcn.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Tell the trampoline which build file to use.
env_vars: {
key: "PACKAGE"
value: "crc32c"
}

build_file: "python-crc32c/.kokoro/build-osx.sh"
Loading
Loading