Skip to content
This repository was archived by the owner on Jun 1, 2026. It is now read-only.

Commit c1c8c59

Browse files
partheavishwarajanandandrewsg
authored
build: add presubmit scripts using kokoro (#235)
* build: add presubmit scripts using kokoro Co-authored-by: @vishwarajanand <[email protected]> Co-authored-by: @andrewsg <[email protected]> * Remove artifact upload via Github Actions which is obsolete --------- Co-authored-by: @vishwarajanand <[email protected]> Co-authored-by: @andrewsg <[email protected]>
1 parent a6960b5 commit c1c8c59

33 files changed

Lines changed: 423 additions & 495 deletions

‎.github/sync-repo-settings.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ branchProtectionRules:
3030
requiredStatusCheckContexts:
3131
- 'ubuntu-20.04'
3232
- 'macos-13'
33-
- 'windows-2019 ( x64 )'
33+
- 'windows-2022 ( x64 )'
3434
- 'cla/google'
3535
# List of explicit permissions to add (additive only)
3636
permissionRules:

‎.github/workflows/presubmit.yml‎

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,6 @@ jobs:
6666
CIBW_TEST_REQUIRES: pytest
6767
CIBW_TEST_COMMAND: py.test -v {project}/tests/
6868

69-
- uses: actions/upload-artifact@v3
70-
with:
71-
name: python-package-distributions
72-
path: wheelhouse/
73-
7469
build-wheels-macos:
7570
name: ${{ matrix.os }}
7671
strategy:
@@ -129,22 +124,16 @@ jobs:
129124
CIBW_TEST_REQUIRES: pytest
130125
CIBW_TEST_COMMAND: py.test -v {project}/tests/
131126

132-
- uses: actions/upload-artifact@v3
133-
with:
134-
name: python-package-distributions
135-
path: wheelhouse/
136-
137127
build-wheels-windows:
138128
name: ${{ matrix.os }} ( ${{ matrix.platform }} )
139129

140130
strategy:
141131
matrix:
142132
os:
143-
- windows-2019
133+
- windows-2022
144134
platform:
145135
# For presubmit, just build / test the most common platform
146136
- x64
147-
#- Win32
148137

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

@@ -175,7 +164,7 @@ jobs:
175164
python -m pip install cmake
176165
echo "::endgroup::"
177166
echo "::group::Run cmake to initialze build tree"
178-
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
167+
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
179168
echo "::endgroup::"
180169
echo "::group::Run cmake to build library"
181170
cmake --build build --verbose --config Release
@@ -212,8 +201,3 @@ jobs:
212201
CIBW_BUILD_VERBOSITY: 3
213202
CIBW_TEST_REQUIRES: pytest
214203
CIBW_TEST_COMMAND: py.test -v {project}/tests
215-
216-
- uses: actions/upload-artifact@v3
217-
with:
218-
name: python-package-distributions
219-
path: wheelhouse/

‎.github/workflows/python-publish.yml‎

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

‎.kokoro/build-manylinux.sh‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
3+
# Copyright 2018 Google LLC
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
18+
set -eo pipefail
19+
20+
# Disable buffering, so that the logs stream through.
21+
export PYTHONUNBUFFERED=1
22+
23+
# Debug: show build environment
24+
env | grep KOKORO
25+
26+
cd github/python-crc32c
27+
28+
# Before running nox and such, build the extension.
29+
./scripts/manylinux/build.sh
30+
./scripts/manylinux/check.sh

‎.kokoro/build-osx.sh‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
# Copyright 2018 Google LLC
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
set -eo pipefail
18+
19+
# Disable buffering, so that the logs stream through.
20+
export PYTHONUNBUFFERED=1
21+
22+
# Debug: show build environment
23+
env | grep KOKORO
24+
25+
cd github/python-crc32c
26+
27+
# Before running nox and such, build the extension.
28+
./scripts/osx/build.sh
29+
./scripts/osx/check.sh
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Tell the trampoline which build file to use.
4+
env_vars: {
5+
key: "PACKAGE"
6+
value: "crc32c"
7+
}
8+
build_file: "python-crc32c/.kokoro/build-manylinux.sh"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Tell the trampoline which build file to use.
4+
env_vars: {
5+
key: "PACKAGE"
6+
value: "crc32c"
7+
}
8+
9+
build_file: "python-crc32c/.kokoro/build-osx.sh"

0 commit comments

Comments
 (0)