Skip to content
Merged

Dev #170

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
4 changes: 2 additions & 2 deletions .github/workflows/tox_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,13 @@ jobs:
if: contains(matrix.os, 'windows')
shell: cmd
run: |
"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=amd64 && uv run --only-group tox --with tox-uv tox run
"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=amd64 && uv run --only-group=tox-uv tox run --runner uv-venv-lock-runner
env:
TOX_ENV: "${{ steps.tox-env.outputs.result }}"
CONAN_USER_HOME: "${{steps.conan-path-script.outputs.result}}"
- name: Run Tox
if: "!contains(matrix.os, 'windows')"
run: cc --version && cc -dumpfullversion -dumpversion && uv run --only-group tox --with tox-uv tox run -vvv
run: cc --version && cc -dumpfullversion -dumpversion && uv run --only-group=tox-uv tox run --runner uv-venv-lock-runner -vvv
env:
TOX_ENV: "${{ steps.tox-env.outputs.result }}"
CONAN_USER_HOME: "${{steps.conan-path-script.outputs.result}}"
Expand Down
538 changes: 310 additions & 228 deletions Jenkinsfile

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,16 @@ tox-uv = [
{include-group = "tox"},
"tox-uv-bare"
]
test = ["coverage[toml]", "gcovr;os_name!= 'nt'", "pytest"]
test = ["pytest"]
conan = ["conan>=2.0", "cmake<4.0"]
dev = [
{include-group = "conan"},
{include-group = "docs"},
{include-group = "lint"},
{include-group = "test"},
{include-group = "audit-dependencies"},
"coverage[toml]",
"gcovr;os_name!= 'nt'",
]
release = ["twine"]
ci = [
Expand Down Expand Up @@ -120,6 +122,7 @@ environment-pass = ["CONAN_COMPILER_LIBCXX", "CONAN_COMPILER_VERSION", "CONAN_US

[tool.cibuildwheel.windows]
before-all = [
'uv lock --check',
'echo Conan user home: %CONAN_USER_HOME%',
'echo Conan home: %CONAN_HOME%',
'uv run --only-group=conan --with ninja --isolated conan profile detect --exist-ok',
Expand All @@ -130,6 +133,7 @@ CONAN_USER_HOME="$TEMP/conan"

[tool.cibuildwheel.macos]
before-all = [
'uv lock --check',
'echo "Conan user home: $CONAN_USER_HOME"',
'echo "Conan home: $CONAN_HOME"',
'uv run --only-group=conan --with ninja --isolated conan profile detect --exist-ok',
Expand All @@ -153,6 +157,7 @@ manylinux-x86_64-image = "quay.io/pypa/manylinux_2_28_x86_64"
manylinux-aarch64-image = "quay.io/pypa/manylinux_2_28_aarch64"
repair-wheel-command = "auditwheel repair -w {dest_dir} {wheel}"
before-all = [
'uv lock --check',
"cc --version", "cc -dumpfullversion -dumpversion",
'echo "Conan user home: $CONAN_USER_HOME"',
'echo "Conan home: $CONAN_HOME"',
Expand Down
3 changes: 2 additions & 1 deletion scripts/build_linux_wheels.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env bash

set -e
scriptDir=$(dirname -- "$(readlink -f -- "$BASH_SOURCE")")
PROJECT_ROOT=$(realpath "$scriptDir/..")
Expand Down Expand Up @@ -50,6 +49,7 @@ generate_wheel(){
--build-arg UV_EXTRA_INDEX_URL \
--build-arg UV_INDEX_URL \
--build-arg manylinux_image=$manylinux_image \
--label=purpose=build-wheel \
"$PROJECT_ROOT"

mkdir -p "$OUTPUT_PATH"
Expand All @@ -59,6 +59,7 @@ generate_wheel(){
-v "$PROJECT_ROOT":/project:ro \
-v $OUTPUT_PATH:/dist \
--entrypoint="/bin/bash" \
--label=purpose=build-wheel \
$docker_image_name_to_use \
-c "build_wheel /project /dist ${python_versions_to_use[@]}"
echo "Built wheel can be found in '$OUTPUT_PATH'"
Expand Down
5 changes: 4 additions & 1 deletion scripts/build_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ function Build-DockerImage {
$projectRootDirectory = (Get-Item $PSScriptRoot).Parent.FullName
$dockerArgsList = @(
"build",
"--label=purpose=build-wheel",
"--isolation", $DockerIsolation,
"--platform windows/amd64",
"-f", $DockerfilePath,
Expand Down Expand Up @@ -52,7 +53,7 @@ function Build-Wheel {
$containerWorkingPath = "c:\build"
$containerCacheDir = "C:\Users\ContainerUser\Documents\cache"
$venv = "${containerCacheDir}\venv"

$UV_CACHE_DIR="${containerCacheDir}\uvcache"
$UV_TOOL_DIR = "${containerCacheDir}\uvtools"
$UV_PYTHON_CACHE_DIR = "${containerCacheDir}\uvpython"

Expand All @@ -65,13 +66,15 @@ function Build-Wheel {

$dockerArgsList = @(
"run",
"--label=purpose=build-wheel",
"--isolation", $DockerIsolation,
"--platform windows/amd64",
"--rm",
"--workdir=${containerWorkingPath}",
"--mount type=volume,source=${ContainerName}Cache,target=${containerCacheDir}",
"--mount type=bind,source=$(Resolve-Path $projectRootDirectory),target=${containerSourcePath}",
"--mount type=bind,source=$(Resolve-Path $outputDirectory),target=${containerDistPath}",
"-e UV_CACHE_DIR=${UV_CACHE_DIR}",
"-e UV_TOOL_DIR=${UV_TOOL_DIR}",
"-e UV_PYTHON_CACHE_DIR=${UV_PYTHON_CACHE_DIR}",
'--entrypoint', 'powershell',
Expand Down
6 changes: 1 addition & 5 deletions scripts/resources/package_for_linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ RUN --mount=type=cache,target=${PIP_DOWNLOAD_CACHE} \
uv run --only-group conan --with ninja conan install /tmp --build missing --conf=tools.cmake.cmaketoolchain:generator=Ninja -c tools.graph:skip_test=True && \
uv run --only-group conan --with ninja conan cache clean "*" -b --source --build --temp && \
uv cache prune && \
if [ "$(jq -r '.remotes[0].url' ${CONAN_HOME}/remotes.json )" != "${CONAN_CENTER_PROXY_V2_URL}" ]; then \
if [ -f /tmp/remotes.json ]; then \
mv -f /tmp/remotes.json ${CONAN_HOME}/remotes.json; \
fi
# ==============================================================================
Expand All @@ -98,7 +98,3 @@ RUN mkdir -p ${PIP_DOWNLOAD_CACHE} && \
mkdir -p ${UV_CACHE_DIR} && \
chmod -R 777 ${UV_CACHE_DIR}
COPY scripts/resources/package_for_linux/helper_scripts/build_wheel.sh /usr/local/bin/build_wheel
LABEL type="jenkins"

# To help mark the image as a CI image so it can be cleaned up more easily
LABEL purpose=ci
3 changes: 0 additions & 3 deletions scripts/resources/windows/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,3 @@ ENV CONAN_USER_HOME=${CONAN_USER_HOME}`
CONAN_HOME=${CONAN_HOME}`
UV_CACHE_DIR=${UV_CACHE_DIR}`
PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE}

# To help mark the image as a CI image so it can be cleaned up more easily
LABEL purpose=ci
Loading
Loading