Skip to content

Commit 0fce71c

Browse files
committed
chore: update ss-cpp to v0.8.35
Signed-off-by: l.feng <[email protected]>
1 parent e16b6e8 commit 0fce71c

File tree

10 files changed

+119
-52
lines changed

10 files changed

+119
-52
lines changed

.copier-answers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2-
_commit: v0.8.31
2+
_commit: v0.8.35
33
_src_path: https://github.com/serious-scaffold/ss-pybind11
44
author_email: [email protected]
55
author_name: l.feng

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
--durations=20
8383
8484
- name: Upload coverage report
85-
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1
85+
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
8686
with:
8787
token: ${{ secrets.CODECOV_TOKEN }}
8888

.github/workflows/renovate.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: Renovate
22

33
on:
44
schedule:
5-
# Match renovate schedule:earlyMondays and schedule:automergeMonthly
6-
- cron: '*/15 0-3 * * *'
5+
# Match renovate schedule and automergeSchedule
6+
- cron: '*/15 0-3 1-7 * *'
77
workflow_dispatch:
88

99
jobs:
@@ -19,7 +19,7 @@ jobs:
1919
RENOVATE_PLATFORM: github
2020
RENOVATE_REPOSITORIES: '["${{ github.repository }}"]'
2121
RENOVATE_REPOSITORY_CACHE: enabled
22-
image: ghcr.io/renovatebot/renovate:39.185.7@sha256:b8539ceb56a431eb34d76b2cf097555e11515ed7f1880fa201a8b2102d44df48
22+
image: ghcr.io/renovatebot/renovate:39.190.0@sha256:a48e70711ef823e6f0debb8f45cc670018da3a519dc4b787ea77d0aea77a56c6
2323
options: --user root
2424
runs-on: ubuntu-24.04
2525
steps:

.github/workflows/reuseable_cibuildwheel.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414

1515
jobs:
1616
build_wheels:
17-
name: On ${{ matrix.os }}, with ${{ matrix.arch }}, build ${{ matrix.build }} wheels
17+
name: ${{ matrix.os }}, ${{ matrix.arch }}, ${{ matrix.build }} wheels
1818
runs-on: ${{ matrix.os }}
1919

2020
strategy:
@@ -48,14 +48,30 @@ jobs:
4848
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
4949
if: runner.os == 'Linux' && inputs.extra && contains(matrix.qemu_arch, matrix.arch)
5050

51+
- name: Cache
52+
if: >
53+
inputs.auto && !contains(matrix.qemu_arch, matrix.arch) ||
54+
inputs.extra && contains(matrix.qemu_arch, matrix.arch)
55+
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4
56+
with:
57+
path: |
58+
~/.cache/vcpkg
59+
~/AppData/Local/vcpkg
60+
key: cache-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.build }}-${{ hashFiles('vcpkg.json') }}
61+
restore-keys: cache-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.build }}-${{ hashFiles('vcpkg.json') }}
62+
5163
- name: Build wheels
5264
if: >
5365
inputs.auto && !contains(matrix.qemu_arch, matrix.arch) ||
5466
inputs.extra && contains(matrix.qemu_arch, matrix.arch)
55-
uses: pypa/cibuildwheel@ee63bf16da6cddfb925f542f2c7b59ad50e93969 # v2.22.0
67+
uses: pypa/cibuildwheel@6cccd09a31908ffd175b012fb8bf4e1dbda3bc6c # v2.23.0
5668
env:
5769
CIBW_ARCHS: ${{ matrix.arch }}
5870
CIBW_BUILD: cp39-${{ matrix.build }}*
71+
CIBW_BEFORE_ALL_LINUX: >
72+
mkdir -p ~/.cache || true &&
73+
mkdir -p /host/home/runner/.cache/vcpkg || true &&
74+
ln -s /host/home/runner/.cache/vcpkg ~/.cache/vcpkg || true
5975
6076
- name: Upload wheels
6177
if: >

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ repos:
108108

109109
# Check jsonschema
110110
- repo: https://github.com/python-jsonschema/check-jsonschema
111-
rev: 0.31.1
111+
rev: 0.31.2
112112
hooks:
113113
- id: check-dependabot
114114
- id: check-github-workflows
@@ -138,7 +138,7 @@ repos:
138138

139139
# Check for renovate config
140140
- repo: https://github.com/renovatebot/pre-commit-hooks
141-
rev: 39.185.6
141+
rev: 39.185.9
142142
hooks:
143143
- id: renovate-config-validator
144144
stages: [manual]

.renovaterc.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"addLabels": [
1616
"auto-approval"
1717
],
18-
"extends": [
19-
"schedule:earlyMondays"
18+
"schedule": [
19+
"* 0-3 1-7 * *"
2020
],
2121
"automergeSchedule": [
2222
"* 0-3 1-7 * *"

cmake/vcpkg/bootstrap/vcpkg_bootstrap.cmake

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,34 @@ function(_vcpkg_upgrade vcpkg_root vcpkg_repo vcpkg_ref)
111111
return()
112112
endif()
113113

114+
# Check .gitconfig on linux or windows
115+
if(EXISTS "$ENV{HOME}/.gitconfig" OR EXISTS "$ENV{USERPROFILE}/.gitconfig")
116+
execute_process(
117+
COMMAND ${GIT_EXECUTABLE} config --get-all safe.directory
118+
WORKING_DIRECTORY ${vcpkg_root}
119+
OUTPUT_VARIABLE safe_directory
120+
OUTPUT_STRIP_TRAILING_WHITESPACE
121+
RESULT_VARIABLE result)
122+
123+
if(NOT result EQUAL "0")
124+
message(FATAL_ERROR "failed to get git safe directory")
125+
endif()
126+
endif()
127+
128+
if(NOT DEFINED safe_directory
129+
OR (DEFINED safe_directory AND NOT safe_directory MATCHES "${vcpkg_root}"))
130+
message(STATUS "vcpkg root is not in the git safe directory, adding...")
131+
132+
execute_process(
133+
COMMAND ${GIT_EXECUTABLE} config --global safe.directory ${vcpkg_root}
134+
WORKING_DIRECTORY ${vcpkg_root}
135+
RESULT_VARIABLE result)
136+
137+
if(NOT result EQUAL "0")
138+
message(FATAL_ERROR "${GIT_EXECUTABLE} config failed with ${result}")
139+
endif()
140+
endif()
141+
114142
execute_process(
115143
COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
116144
WORKING_DIRECTORY ${vcpkg_root}
@@ -210,4 +238,16 @@ function(_vcpkg_bootstrap)
210238
endif()
211239

212240
_vcpkg_set_cache_variables("${vcpkg_root}")
241+
242+
# Make sure downloads folder is 755 on linux
243+
if(CMAKE_HOST_UNIX)
244+
execute_process(
245+
COMMAND chmod 755 ${vcpkg_root}/downloads
246+
WORKING_DIRECTORY ${vcpkg_root}
247+
RESULT_VARIABLE result)
248+
249+
if(NOT result EQUAL "0")
250+
message(STATUS "failed to chmod 755 ${vcpkg_root}/downloads")
251+
endif()
252+
endif()
213253
endfunction()

cmake/vcpkg/bootstrap/vcpkg_chainload_toolchain.cmake

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,41 +5,51 @@ SPDX-FileCopyrightText: Copyright 2024 msclock
55

66
# configure VCPKG_CHAINLOAD_TOOLCHAIN_FILE based on VCPKG_TARGET_TRIPLET and
77
# VCPKG_TARGET_ARCHITECTURE
8-
function(_vcpkg_chainload_toolchain)
9-
if(DEFINED VCPKG_CHAINLOAD_TOOLCHAIN_FILE)
10-
return()
11-
endif()
8+
macro(_vcpkg_chainload_toolchain)
9+
if(NOT DEFINED VCPKG_CHAINLOAD_TOOLCHAIN_FILE)
10+
if(NOT DEFINED VCPKG_TARGET_TRIPLET OR NOT DEFINED
11+
VCPKG_TARGET_ARCHITECTURE)
12+
message(
13+
FATAL_ERROR
14+
"VCPKG_TARGET_TRIPLET and VCPKG_TARGET_ARCHITECTURE must be set before calling _vcpkg_chainload_toolchain()"
15+
)
16+
endif()
1217

13-
if(NOT DEFINED VCPKG_TARGET_TRIPLET OR NOT DEFINED VCPKG_TARGET_ARCHITECTURE)
14-
message(
15-
FATAL_ERROR
16-
"VCPKG_TARGET_TRIPLET and VCPKG_TARGET_ARCHITECTURE must be set before calling _vcpkg_chainload_toolchain()"
17-
)
18-
endif()
18+
# Load toolchain variables from triplet and architecture
19+
20+
string(LENGTH "${VCPKG_TARGET_ARCHITECTURE}-" _prefix_len)
21+
string(SUBSTRING ${VCPKG_TARGET_TRIPLET} ${_prefix_len} -1 _stripped_string)
22+
string(REPLACE "-" ";" _triplet_parts "${_stripped_string}")
23+
list(GET _triplet_parts 0 _chainload_toolchain_name)
1924

20-
# Load toolchain variables from triplet and architecture
25+
set(_toolchain "scripts/toolchains/${_chainload_toolchain_name}.cmake")
2126

22-
string(LENGTH "${VCPKG_TARGET_ARCHITECTURE}-" _prefix_len)
23-
string(SUBSTRING ${VCPKG_TARGET_TRIPLET} ${_prefix_len} -1 _stripped_string)
24-
string(REPLACE "-" ";" _triplet_parts "${_stripped_string}")
25-
list(GET _triplet_parts 0 _chainload_toolchain_name)
27+
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${_toolchain}")
28+
set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE
29+
"${CMAKE_CURRENT_LIST_DIR}/${_toolchain}"
30+
CACHE INTERNAL "vcpkg chainload")
31+
elseif(EXISTS "${_VCPKG_ROOT}/${_toolchain}")
32+
set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE
33+
"${_VCPKG_ROOT}/${_toolchain}"
34+
CACHE INTERNAL "vcpkg chainload")
2635

27-
set(_toolchain "scripts/toolchains/${_chainload_toolchain_name}.cmake")
36+
else()
37+
message(
38+
WARNING
39+
"Could not find toolchain file for ${_chainload_toolchain_name}, skipping chainload"
40+
)
41+
endif()
42+
endif()
2843

29-
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${_toolchain}")
30-
set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE
31-
"${CMAKE_CURRENT_LIST_DIR}/${_toolchain}"
32-
CACHE INTERNAL "vcpkg chainload")
33-
elseif(EXISTS "${_VCPKG_ROOT}/${_toolchain}")
34-
set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE
35-
"${_VCPKG_ROOT}/${_toolchain}"
36-
CACHE INTERNAL "vcpkg chainload")
37-
else()
44+
if(EXISTS "${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}")
3845
message(
39-
WARNING
40-
"Could not find toolchain file for ${_chainload_toolchain_name}, skipping chainload"
46+
STATUS "vcpkg_chainload_toolchain_file: ${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}"
4147
)
48+
include(${VCPKG_CHAINLOAD_TOOLCHAIN_FILE})
4249
endif()
43-
message(
44-
STATUS "vcpkg_chainload_toolchain_file: ${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}")
45-
endfunction()
50+
unset(_chainload_toolchain_name)
51+
unset(_triplet_parts)
52+
unset(_toolchain)
53+
unset(_prefix_len)
54+
unset(_stripped_string)
55+
endmacro()

pyproject.toml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,28 +62,29 @@ wheel.py-api = "py3"
6262
wheel.expand-macos-universal-tags = true
6363
metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"
6464
sdist.include = ["src/cppcheck/_version.py"]
65-
cmake.args = [
66-
"-DBUILD_TESTING=OFF",
67-
"-DCMAKE_BUILD_TYPE=Release",
68-
"-DVCPKG_INSTALL_REPORT_FAILURE=ON",
69-
"-DVCPKG_INSTALL_OPTIONS=--allow-unsupported",
70-
"-DCMAKE_TOOLCHAIN_FILE=cmake/vcpkg/vcpkg.toolchain.cmake",
71-
"-DVCPKG_OVERLAY_TRIPLETS=cmake/vcpkg/triplets",
72-
"-DVCPKG_OVERLAY_PORTS=cmake/vcpkg/ports",
73-
]
65+
66+
[tool.scikit-build.cmake.define]
67+
BUILD_TESTING="OFF"
68+
CMAKE_BUILD_TYPE="Release"
69+
VCPKG_INSTALL_REPORT_FAILURE="ON"
70+
VCPKG_INSTALL_OPTIONS="--allow-unsupported"
71+
CMAKE_TOOLCHAIN_FILE="cmake/vcpkg/vcpkg.toolchain.cmake"
72+
VCPKG_OVERLAY_TRIPLETS="cmake/vcpkg/triplets"
73+
VCPKG_OVERLAY_PORTS="cmake/vcpkg/ports"
7474

7575
[tool.setuptools_scm]
7676
write_to = "src/cppcheck/_version.py"
7777

7878
[tool.cibuildwheel]
7979
build-verbosity = 1
80+
skip = "pp*"
8081
test-command = "pytest {project}/tests"
8182
test-extras = ["test"]
8283
test-skip = ["*-win_arm64", "*-macosx_universal2:arm64"]
8384

8485
[tool.cibuildwheel.linux]
8586
before-build = [
86-
'yum install zip -y || apk add zip || true',
87+
'yum install zip perl-IPC-Cmd -y || apk add zip || true',
8788
'apt update && apt install zip pkg-config -y || true',
8889
'pip install cmake ninja',
8990
'cmake --version',

vcpkg.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"registries": [
3333
{
3434
"kind": "git",
35-
"baseline": "cc674648cf1b89396d9ebe14d7241aa365d12f49",
35+
"baseline": "82147f387552e0f31d5ca2c9370d9726789fa568",
3636
"repository": "https://github.com/msclock/cmake-registry",
3737
"packages": [
3838
"cmake-modules",

0 commit comments

Comments
 (0)