Skip to content
Closed
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 .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: v0.8.31
_commit: v0.8.35
_src_path: https://github.com/serious-scaffold/ss-pybind11
author_email: msclock@126.com
author_name: l.feng
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ jobs:
--durations=20

- name: Upload coverage report
<<<<<<< before updating
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1
=======
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
>>>>>>> after updating
with:
token: ${{ secrets.CODECOV_TOKEN }}

Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/renovate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Renovate

on:
schedule:
# Match renovate schedule:earlyMondays and schedule:automergeMonthly
- cron: '*/15 0-3 * * *'
# Match renovate schedule and automergeSchedule
- cron: '*/15 0-3 1-7 * *'
workflow_dispatch:

jobs:
Expand All @@ -19,7 +19,11 @@ jobs:
RENOVATE_PLATFORM: github
RENOVATE_REPOSITORIES: '["${{ github.repository }}"]'
RENOVATE_REPOSITORY_CACHE: enabled
<<<<<<< before updating
image: ghcr.io/renovatebot/renovate:39.185.7@sha256:b8539ceb56a431eb34d76b2cf097555e11515ed7f1880fa201a8b2102d44df48
=======
image: ghcr.io/renovatebot/renovate:39.190.0@sha256:a48e70711ef823e6f0debb8f45cc670018da3a519dc4b787ea77d0aea77a56c6
>>>>>>> after updating
options: --user root
runs-on: ubuntu-24.04
steps:
Expand Down
24 changes: 22 additions & 2 deletions .github/workflows/reuseable_cibuildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

jobs:
build_wheels:
name: On ${{ matrix.os }}, with ${{ matrix.arch }}, build ${{ matrix.build }} wheels
name: ${{ matrix.os }}, ${{ matrix.arch }}, ${{ matrix.build }} wheels
runs-on: ${{ matrix.os }}

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

- name: Cache
if: >
inputs.auto && !contains(matrix.qemu_arch, matrix.arch) ||
inputs.extra && contains(matrix.qemu_arch, matrix.arch)
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4
with:
path: |
~/.cache/vcpkg
~/AppData/Local/vcpkg
key: cache-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.build }}-${{ hashFiles('vcpkg.json') }}
restore-keys: cache-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.build }}-${{ hashFiles('vcpkg.json') }}

- name: Build wheels
if: >
inputs.auto && !contains(matrix.qemu_arch, matrix.arch) ||
inputs.extra && contains(matrix.qemu_arch, matrix.arch)
uses: pypa/cibuildwheel@ee63bf16da6cddfb925f542f2c7b59ad50e93969 # v2.22.0
uses: pypa/cibuildwheel@6cccd09a31908ffd175b012fb8bf4e1dbda3bc6c # v2.23.0
env:
CIBW_ARCHS: ${{ matrix.arch }}
<<<<<<< before updating
CIBW_BUILD: cp39-${{ matrix.build }}*
=======
CIBW_BUILD: '*${{ matrix.build }}*'
CIBW_BEFORE_ALL_LINUX: >
mkdir -p ~/.cache || true &&
mkdir -p /host/home/runner/.cache/vcpkg || true &&
ln -s /host/home/runner/.cache/vcpkg ~/.cache/vcpkg || true
>>>>>>> after updating

- name: Upload wheels
if: >
Expand Down
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,11 @@ repos:

# Check jsonschema
- repo: https://github.com/python-jsonschema/check-jsonschema
<<<<<<< before updating
rev: 0.31.1
=======
rev: 0.31.2
>>>>>>> after updating
hooks:
- id: check-dependabot
- id: check-github-workflows
Expand Down Expand Up @@ -138,7 +142,11 @@ repos:

# Check for renovate config
- repo: https://github.com/renovatebot/pre-commit-hooks
<<<<<<< before updating
rev: 39.185.6
=======
rev: 39.185.9
>>>>>>> after updating
hooks:
- id: renovate-config-validator
stages: [manual]
Expand Down
4 changes: 2 additions & 2 deletions .renovaterc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"addLabels": [
"auto-approval"
],
"extends": [
"schedule:earlyMondays"
"schedule": [
"* 0-3 1-7 * *"
],
"automergeSchedule": [
"* 0-3 1-7 * *"
Expand Down
40 changes: 40 additions & 0 deletions cmake/vcpkg/bootstrap/vcpkg_bootstrap.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,34 @@ function(_vcpkg_upgrade vcpkg_root vcpkg_repo vcpkg_ref)
return()
endif()

# Check .gitconfig on linux or windows
if(EXISTS "$ENV{HOME}/.gitconfig" OR EXISTS "$ENV{USERPROFILE}/.gitconfig")
execute_process(
COMMAND ${GIT_EXECUTABLE} config --get-all safe.directory
WORKING_DIRECTORY ${vcpkg_root}
OUTPUT_VARIABLE safe_directory
OUTPUT_STRIP_TRAILING_WHITESPACE
RESULT_VARIABLE result)

if(NOT result EQUAL "0")
message(FATAL_ERROR "failed to get git safe directory")
endif()
endif()

if(NOT DEFINED safe_directory
OR (DEFINED safe_directory AND NOT safe_directory MATCHES "${vcpkg_root}"))
message(STATUS "vcpkg root is not in the git safe directory, adding...")

execute_process(
COMMAND ${GIT_EXECUTABLE} config --global safe.directory ${vcpkg_root}
WORKING_DIRECTORY ${vcpkg_root}
RESULT_VARIABLE result)

if(NOT result EQUAL "0")
message(FATAL_ERROR "${GIT_EXECUTABLE} config failed with ${result}")
endif()
endif()

execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
WORKING_DIRECTORY ${vcpkg_root}
Expand Down Expand Up @@ -210,4 +238,16 @@ function(_vcpkg_bootstrap)
endif()

_vcpkg_set_cache_variables("${vcpkg_root}")

# Make sure downloads folder is 755 on linux
if(CMAKE_HOST_UNIX)
execute_process(
COMMAND chmod 755 ${vcpkg_root}/downloads
WORKING_DIRECTORY ${vcpkg_root}
RESULT_VARIABLE result)

if(NOT result EQUAL "0")
message(STATUS "failed to chmod 755 ${vcpkg_root}/downloads")
endif()
endif()
endfunction()
70 changes: 40 additions & 30 deletions cmake/vcpkg/bootstrap/vcpkg_chainload_toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,51 @@ SPDX-FileCopyrightText: Copyright 2024 msclock

# configure VCPKG_CHAINLOAD_TOOLCHAIN_FILE based on VCPKG_TARGET_TRIPLET and
# VCPKG_TARGET_ARCHITECTURE
function(_vcpkg_chainload_toolchain)
if(DEFINED VCPKG_CHAINLOAD_TOOLCHAIN_FILE)
return()
endif()
macro(_vcpkg_chainload_toolchain)
if(NOT DEFINED VCPKG_CHAINLOAD_TOOLCHAIN_FILE)
if(NOT DEFINED VCPKG_TARGET_TRIPLET OR NOT DEFINED
VCPKG_TARGET_ARCHITECTURE)
message(
FATAL_ERROR
"VCPKG_TARGET_TRIPLET and VCPKG_TARGET_ARCHITECTURE must be set before calling _vcpkg_chainload_toolchain()"
)
endif()

if(NOT DEFINED VCPKG_TARGET_TRIPLET OR NOT DEFINED VCPKG_TARGET_ARCHITECTURE)
message(
FATAL_ERROR
"VCPKG_TARGET_TRIPLET and VCPKG_TARGET_ARCHITECTURE must be set before calling _vcpkg_chainload_toolchain()"
)
endif()
# Load toolchain variables from triplet and architecture

string(LENGTH "${VCPKG_TARGET_ARCHITECTURE}-" _prefix_len)
string(SUBSTRING ${VCPKG_TARGET_TRIPLET} ${_prefix_len} -1 _stripped_string)
string(REPLACE "-" ";" _triplet_parts "${_stripped_string}")
list(GET _triplet_parts 0 _chainload_toolchain_name)

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

string(LENGTH "${VCPKG_TARGET_ARCHITECTURE}-" _prefix_len)
string(SUBSTRING ${VCPKG_TARGET_TRIPLET} ${_prefix_len} -1 _stripped_string)
string(REPLACE "-" ";" _triplet_parts "${_stripped_string}")
list(GET _triplet_parts 0 _chainload_toolchain_name)
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${_toolchain}")
set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE
"${CMAKE_CURRENT_LIST_DIR}/${_toolchain}"
CACHE INTERNAL "vcpkg chainload")
elseif(EXISTS "${_VCPKG_ROOT}/${_toolchain}")
set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE
"${_VCPKG_ROOT}/${_toolchain}"
CACHE INTERNAL "vcpkg chainload")

set(_toolchain "scripts/toolchains/${_chainload_toolchain_name}.cmake")
else()
message(
WARNING
"Could not find toolchain file for ${_chainload_toolchain_name}, skipping chainload"
)
endif()
endif()

if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${_toolchain}")
set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE
"${CMAKE_CURRENT_LIST_DIR}/${_toolchain}"
CACHE INTERNAL "vcpkg chainload")
elseif(EXISTS "${_VCPKG_ROOT}/${_toolchain}")
set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE
"${_VCPKG_ROOT}/${_toolchain}"
CACHE INTERNAL "vcpkg chainload")
else()
if(EXISTS "${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}")
message(
WARNING
"Could not find toolchain file for ${_chainload_toolchain_name}, skipping chainload"
STATUS "vcpkg_chainload_toolchain_file: ${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}"
)
include(${VCPKG_CHAINLOAD_TOOLCHAIN_FILE})
endif()
message(
STATUS "vcpkg_chainload_toolchain_file: ${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}")
endfunction()
unset(_chainload_toolchain_name)
unset(_triplet_parts)
unset(_toolchain)
unset(_prefix_len)
unset(_stripped_string)
endmacro()
21 changes: 11 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,28 +62,29 @@ wheel.py-api = "py3"
wheel.expand-macos-universal-tags = true
metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"
sdist.include = ["src/cppcheck/_version.py"]
cmake.args = [
"-DBUILD_TESTING=OFF",
"-DCMAKE_BUILD_TYPE=Release",
"-DVCPKG_INSTALL_REPORT_FAILURE=ON",
"-DVCPKG_INSTALL_OPTIONS=--allow-unsupported",
"-DCMAKE_TOOLCHAIN_FILE=cmake/vcpkg/vcpkg.toolchain.cmake",
"-DVCPKG_OVERLAY_TRIPLETS=cmake/vcpkg/triplets",
"-DVCPKG_OVERLAY_PORTS=cmake/vcpkg/ports",
]

[tool.scikit-build.cmake.define]
BUILD_TESTING="OFF"
CMAKE_BUILD_TYPE="Release"
VCPKG_INSTALL_REPORT_FAILURE="ON"
VCPKG_INSTALL_OPTIONS="--allow-unsupported"
CMAKE_TOOLCHAIN_FILE="cmake/vcpkg/vcpkg.toolchain.cmake"
VCPKG_OVERLAY_TRIPLETS="cmake/vcpkg/triplets"
VCPKG_OVERLAY_PORTS="cmake/vcpkg/ports"

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

[tool.cibuildwheel]
build-verbosity = 1
skip = "pp*"
test-command = "pytest {project}/tests"
test-extras = ["test"]
test-skip = ["*-win_arm64", "*-macosx_universal2:arm64"]

[tool.cibuildwheel.linux]
before-build = [
'yum install zip -y || apk add zip || true',
'yum install zip perl-IPC-Cmd -y || apk add zip || true',
'apt update && apt install zip pkg-config -y || true',
'pip install cmake ninja',
'cmake --version',
Expand Down
4 changes: 4 additions & 0 deletions vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@
"registries": [
{
"kind": "git",
<<<<<<< before updating
"baseline": "cc674648cf1b89396d9ebe14d7241aa365d12f49",
=======
"baseline": "82147f387552e0f31d5ca2c9370d9726789fa568",
>>>>>>> after updating
"repository": "https://github.com/msclock/cmake-registry",
"packages": [
"cmake-modules",
Expand Down
Loading