Skip to content

Commit dfc5b91

Browse files
parametrize runs-on instead of target
1 parent 4ac045a commit dfc5b91

File tree

554 files changed

+145223
-8
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

554 files changed

+145223
-8
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,12 @@ jobs:
9191
python:
9292
strategy:
9393
matrix:
94-
target:
95-
- cp3*-manylinux_x86_64
96-
- cp3*-macosx_x86_64
97-
- cp3*-macosx_arm64
98-
runs-on: ${{ contains(matrix.target, 'macos') && 'macos-latest' || contains(matrix.target, 'win') && 'windows-latest' || 'ubuntu-latest' }}
94+
runs-on:
95+
- ubuntu-latest
96+
- macos-15-intel
97+
- macos-latest
98+
fail-fast: false
99+
runs-on: ${{ matrix.runs-on }}
99100
steps:
100101
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
101102
with:
@@ -105,9 +106,6 @@ jobs:
105106
with:
106107
package-dir: ./
107108
output-dir: dist/
108-
env:
109-
CIBW_BUILD: ${{ matrix.target }}
110-
CIBW_TEST_COMMAND: python -c "import s2geometry"
111109
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
112110
with:
113111
name: dist-${{ runner.os }}-${{ runner.arch }}

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,9 @@ namespaces = false
6060
# The same as the default. See #450.
6161
# https://setuptools-scm.readthedocs.io/en/latest/config/#setuptools_scm._config.DEFAULT_TAG_REGEX
6262
tag_regex = "^(?:[\\w-]+-)?(?P<version>[vV]?\\d+(?:\\.\\d+){0,2}[^\\+]*)(?:\\+.*)?$"
63+
64+
[tool.cibuildwheel]
65+
test-command = "python -c 'import s2geometry'"
66+
67+
[tool.cibuildwheel.macos]
68+
archs = "x86_64 arm64"
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
// Copyright 2017 The Abseil Authors.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
//
15+
// -----------------------------------------------------------------------------
16+
// File: algorithm.h
17+
// -----------------------------------------------------------------------------
18+
//
19+
// This header file contains Google extensions to the standard <algorithm> C++
20+
// header.
21+
22+
#ifndef ABSL_ALGORITHM_ALGORITHM_H_
23+
#define ABSL_ALGORITHM_ALGORITHM_H_
24+
25+
#include <algorithm>
26+
#include <iterator>
27+
#include <type_traits>
28+
29+
#include "absl/base/config.h"
30+
31+
namespace absl {
32+
ABSL_NAMESPACE_BEGIN
33+
34+
// equal()
35+
// rotate()
36+
//
37+
// Historical note: Abseil once provided implementations of these algorithms
38+
// prior to their adoption in C++14. New code should prefer to use the std
39+
// variants.
40+
//
41+
// See the documentation for the STL <algorithm> header for more information:
42+
// https://en.cppreference.com/w/cpp/header/algorithm
43+
using std::equal;
44+
using std::rotate;
45+
46+
// linear_search()
47+
//
48+
// Performs a linear search for `value` using the iterator `first` up to
49+
// but not including `last`, returning true if [`first`, `last`) contains an
50+
// element equal to `value`.
51+
//
52+
// A linear search is of O(n) complexity which is guaranteed to make at most
53+
// n = (`last` - `first`) comparisons. A linear search over short containers
54+
// may be faster than a binary search, even when the container is sorted.
55+
template <typename InputIterator, typename EqualityComparable>
56+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool linear_search(
57+
InputIterator first, InputIterator last, const EqualityComparable& value) {
58+
return std::find(first, last, value) != last;
59+
}
60+
61+
ABSL_NAMESPACE_END
62+
} // namespace absl
63+
64+
#endif // ABSL_ALGORITHM_ALGORITHM_H_

0 commit comments

Comments
 (0)