Skip to content

Commit 7af16d3

Browse files
Merge pull request #163 from UIUCLibrary/dev
Dev
2 parents 6609c49 + fc3e223 commit 7af16d3

File tree

10 files changed

+54
-35
lines changed

10 files changed

+54
-35
lines changed

.github/workflows/tox_matrix.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
uses: actions/cache@v3
6969
with:
7070
path: "${{steps.conan-path-script.outputs.result}}/.conan2"
71-
key: ${{ runner.os }}-conan-${{ hashFiles('conanfile.py') }}
71+
key: ${{ runner.os }}-conan-${{ hashFiles('conanfile.py') }}-${{ hashFiles('conan.lock') }}
7272

7373
- name: Prebuild Conan packages (Windows)
7474
if: |
@@ -85,8 +85,8 @@ jobs:
8585
CONAN_USER_HOME: "${{steps.conan-path-script.outputs.result}}"
8686
if: "!contains(matrix.os, 'windows') && steps.cache-conan.outputs.cache-hit != 'true'"
8787
run: |
88-
uvx --with cmake conan profile detect --exist-ok
89-
uvx --with cmake conan install conanfile.py --build missing -of /tmp/ciwheelbuilder -pr:b=default
88+
uv run --only-group=conan --frozen conan profile detect --exist-ok
89+
uv run --only-group=conan --frozen conan install conanfile.py --build missing -of /tmp/ciwheelbuilder -pr:b=default
9090
9191
9292
- name: Run Tox (Windows)

.github/workflows/wheels.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
UV_EXTRA_INDEX_URL: ${{vars.PIP_EXTRA_INDEX_URL}}
1616
strategy:
1717
matrix:
18-
os: [ubuntu-latest, windows-latest, macos-13]
18+
os: [ubuntu-latest, windows-latest, macos-latest]
1919

2020
steps:
2121
- uses: actions/checkout@v3
@@ -29,10 +29,10 @@ jobs:
2929
if: contains(matrix.os, 'windows')
3030
shell: cmd
3131
run: |
32-
"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=amd64 && python -m cibuildwheel --output-dir wheelhouse
32+
"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=amd64 && uv run --frozen --only-group=cibuildwheel cibuildwheel --output-dir wheelhouse
3333
env:
3434
CONAN_COMPILER_VERSION: ${{ matrix.compiler_version }}
3535
- name: Build wheels
3636
if: "!contains(matrix.os, 'windows')"
37-
run: uv run --only-group=cibuildwheel -m cibuildwheel --output-dir wheelhouse
37+
run: uv run --frozen --only-group=cibuildwheel -m cibuildwheel --output-dir wheelhouse
3838
# CIBW_SOME_OPTION: value

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ include cmake/fixup.cmake
99

1010
# C++ Source files
1111
include CMakeLists.txt
12-
include conanfile.py
12+
include conanfile.py conan.lock
1313
recursive-include src/uiucprescon/imagevalidate CMakeLists.txt *.cpp *.h
1414

1515
# Tox configuration setting

ci/docker/linux/jenkins/Dockerfile

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ ARG UV_CACHE_DIR=/.cache/uv
1414

1515
FROM ghcr.io/astral-sh/uv:latest AS uv_builder
1616

17-
FROM ubuntu:22.04 AS base_image
18-
RUN rm -f /etc/apt/apt.conf.d/docker-clean
19-
RUN --mount=type=cache,target=/var/cache/apt \
17+
FROM ubuntu:24.04 AS base_image
18+
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
19+
--mount=type=cache,target=/var/lib/apt,sharing=locked \
2020
DEBIAN_FRONTEND="noninteractive" apt-get update && \
2121
apt-get install -yqq software-properties-common gpg-agent --no-install-recommends && \
2222
apt-get -yqq install tzdata && \
@@ -32,14 +32,14 @@ RUN --mount=type=cache,target=/var/cache/apt \
3232
python3-pip \
3333
python3-venv \
3434
ca-certificates \
35-
software-properties-common \
36-
jq \
37-
unzip && \
38-
rm -rf /var/lib/apt/lists/*
35+
software-properties-common
36+
3937

4038
#==============================================================================
4139
FROM base_image AS dr_memory_builder
42-
RUN apt-get update && \
40+
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
41+
--mount=type=cache,target=/var/lib/apt,sharing=locked \
42+
apt-get update && \
4343
apt-get install -y --no-install-recommends wget
4444

4545
WORKDIR /drmemory
@@ -50,6 +50,10 @@ RUN wget --no-verbose https://github.com/DynamoRIO/drmemory/releases/download/re
5050

5151

5252
FROM base_image AS sonar_builder
53+
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
54+
--mount=type=cache,target=/var/lib/apt,sharing=locked \
55+
apt-get update && \
56+
apt-get install -yqq --no-install-recommends unzip
5357

5458
RUN case $(uname -m) in \
5559
x86_64) URL=https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip ;; \
@@ -65,37 +69,42 @@ RUN case $(uname -m) in \
6569

6670

6771
FROM base_image AS conan_builder
72+
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
73+
--mount=type=cache,target=/var/lib/apt,sharing=locked \
74+
DEBIAN_FRONTEND="noninteractive" apt-get update && \
75+
apt-get install -yqq --no-install-recommends jq
76+
6877
ARG CONAN_USER_HOME
6978
ARG PIP_EXTRA_INDEX_URL
7079
ARG PIP_INDEX_URL
7180
ARG UV_EXTRA_INDEX_URL
7281
ARG UV_INDEX_URL
7382

7483
COPY --from=uv_builder /uv /uvx /bin/
75-
COPY ci/docker/linux/shared/ensure_compiler_support_by_conan.py /tmp/ensure_compiler_support_by_conan.py
7684
ARG UV_CACHE_DIR
7785
ARG PIP_DOWNLOAD_CACHE
7886
ARG CONAN_CENTER_PROXY_V2_URL
7987
ARG CONAN_HOME
8088
ENV UV_PROJECT=/tmp/uv
8189
ENV UV_FROZEN=1
90+
ENV UV_PROJECT_ENVIRONMENT=/tmp/uv/venv
8291
COPY ci/docker/linux/jenkins/conan/profile.ini ${CONAN_HOME}/profiles/default
8392
COPY ci/docker/shared/conan/remotes.json ${CONAN_HOME}/remotes.json
8493
RUN --mount=type=cache,target=${PIP_DOWNLOAD_CACHE} \
8594
--mount=type=cache,target=${UV_CACHE_DIR} \
8695
--mount=type=bind,source=pyproject.toml,target=${UV_PROJECT}/pyproject.toml \
8796
--mount=type=bind,source=uv.lock,target=${UV_PROJECT}/uv.lock \
8897
--mount=type=bind,source=conanfile.py,target=/tmp/conanfile.py \
98+
--mount=type=bind,source=conan.lock,target=${UV_PROJECT}/conan.lock \
99+
--mount=type=tmpfs,target=${UV_PROJECT_ENVIRONMENT} \
89100
uv run --only-group=conan conan profile detect --exist-ok && \
90-
python3 /tmp/ensure_compiler_support_by_conan.py $(uv run --only-group=conan conan config home)/settings.yml 11.4 && \
91101
if [ "$(jq -r '.remotes[0].url' ${CONAN_HOME}/remotes.json )" != "${CONAN_CENTER_PROXY_V2_URL}" ]; then \
92102
echo "Setting the conan center url for building cache: ${CONAN_CENTER_PROXY_V2_URL}" && \
93103
cp ${CONAN_HOME}/remotes.json /tmp/remotes.json && \
94104
uv run --only-group=conan conan remote update conan-center --url ${CONAN_CENTER_PROXY_V2_URL}; \
95105
fi && \
96106
uv run --only-group=conan conan install /tmp --build missing -pr:b=default && \
97107
uv run --only-group=conan conan cache clean "*" -b --source --build --temp && \
98-
rm -rf venv && \
99108
if [ "$(jq -r '.remotes[0].url' ${CONAN_HOME}/remotes.json )" != "${CONAN_CENTER_PROXY_V2_URL}" ]; then \
100109
mv -f /tmp/remotes.json ${CONAN_HOME}/remotes.json; \
101110
fi
@@ -104,7 +113,7 @@ RUN --mount=type=cache,target=${PIP_DOWNLOAD_CACHE} \
104113
# shared files are needed to run the Build C++ Tests stage
105114

106115
FROM base_image
107-
116+
COPY --from=uv_builder /uv /uvx /bin/
108117
# -----------------------------------------------------------------------------
109118
# Install sonar build-wrapper
110119
# -----------------------------------------------------------------------------
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
{% set compiler, version, compiler_exe = detect_api.detect_default_compiler() %}
12
[settings]
23
os=Linux
34
arch=x86_64
45
compiler=gcc
5-
compiler.version=11.4
6+
compiler.version={{version.major}}.{{version.minor}}
67
compiler.libcxx=libstdc++
78
build_type=Release
89
[options]

ci/docker/linux/tox/Dockerfile

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,17 @@ ARG UV_EXTRA_INDEX_URL
1313

1414
FROM ghcr.io/astral-sh/uv:latest AS uv_builder
1515

16-
FROM ubuntu:22.04 AS wheel_builder_base
17-
COPY ci/docker/linux/tox/apt-packages.txt /tmp/apt-packages.txt
16+
FROM ubuntu:24.04 AS wheel_builder_base
1817
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
19-
RUN rm -f /etc/apt/apt.conf.d/docker-clean
20-
RUN --mount=type=cache,target=/var/cache/apt \
18+
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
19+
--mount=type=cache,target=/var/lib/apt,sharing=locked \
20+
--mount=type=bind,source=ci/docker/linux/tox/apt-packages.txt,target=/tmp/apt-packages.txt \
2121
apt-get update && \
2222
apt-get install -yqq --no-install-recommends software-properties-common gpg-agent && \
2323
add-apt-repository ppa:deadsnakes/ppa && \
2424
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -yqq install --no-install-recommends tzdata && \
2525
apt-get update && \
26-
< /tmp/apt-packages.txt xargs apt-get install -yqq --no-install-recommends && \
27-
rm -rf /var/lib/apt/lists/*
26+
< /tmp/apt-packages.txt xargs apt-get install -yqq --no-install-recommends
2827

2928
ARG CONAN_USER_HOME
3029
RUN mkdir -p ${CONAN_USER_HOME}
@@ -33,23 +32,21 @@ FROM wheel_builder_base AS conan_builder
3332
COPY --from=uv_builder /uv /uvx /bin/
3433
ARG CONAN_USER_HOME
3534
ARG CONAN_HOME
36-
COPY ci/docker/linux/shared/ensure_compiler_support_by_conan.py /tmp/ensure_compiler_support_by_conan.py
3735
COPY ci/docker/shared/conan/remotes.json ${CONAN_HOME}/remotes.json
3836
COPY conanfile.py /tmp/conanfile.py
3937
ARG CONAN_CENTER_PROXY_V2_URL
40-
ARG PIP_EXTRA_INDEX_URL
41-
ARG PIP_INDEX_URL
4238
ARG UV_EXTRA_INDEX_URL
4339
ARG UV_INDEX_URL
44-
ARG PIP_DOWNLOAD_CACHE
4540
ARG UV_CACHE_DIR
4641
ENV UV_PROJECT=/tmp/uv
4742
ENV UV_FROZEN=1
48-
RUN --mount=type=cache,target=${PIP_DOWNLOAD_CACHE} \
49-
--mount=type=cache,target=${UV_CACHE_DIR} \
43+
ENV UV_PROJECT_ENVIRONMENT=/tmp/uv/venv
44+
RUN --mount=type=cache,target=${UV_CACHE_DIR} \
45+
--mount=type=tmpfs,target=${UV_PROJECT_ENVIRONMENT} \
5046
--mount=type=bind,source=pyproject.toml,target=${UV_PROJECT}/pyproject.toml \
5147
--mount=type=bind,source=uv.lock,target=${UV_PROJECT}/uv.lock \
5248
--mount=type=bind,source=conanfile.py,target=/tmp/conanfile.py \
49+
--mount=type=bind,source=conan.lock,target=${UV_PROJECT}/conan.lock \
5350
uv run --only-group=conan conan profile detect --exist-ok && \
5451
cat $(uv run --only-group=conan conan config home)/settings.yml && \
5552
uv run --only-group=conan conan config home && \
@@ -68,7 +65,7 @@ RUN --mount=type=cache,target=${PIP_DOWNLOAD_CACHE} \
6865

6966
FROM wheel_builder_base
7067

71-
68+
COPY --from=uv_builder /uv /uvx /bin/
7269
ARG CONAN_USER_HOME
7370
ARG CONAN_HOME
7471
COPY --from=conan_builder --chmod=777 ${CONAN_HOME} ${CONAN_HOME}

ci/docker/linux/tox/conan/profile.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
{% set compiler, version, compiler_exe = detect_api.detect_default_compiler() %}
12
[settings]
23
os=Linux
34
os_build=Linux
45
arch=x86_64
56
arch_build=x86_64
67
compiler=gcc
7-
compiler.version=11.4
8+
compiler.version={{version.major}}.{{version.minor}}
89
compiler.libcxx=libstdc++
910
build_type=Release
1011
[options]

conan.lock

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"version": "0.5",
3+
"requires": [
4+
"openjpeg/2.3.1#ada21840f723c5410056aa68f0b23c61%1765835638.220325"
5+
],
6+
"build_requires": [],
7+
"python_requires": [],
8+
"config_requires": []
9+
}

scripts/resources/package_for_linux/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ RUN --mount=type=cache,target=${PIP_DOWNLOAD_CACHE} \
6969
--mount=type=bind,source=pyproject.toml,target=${UV_PROJECT}/pyproject.toml \
7070
--mount=type=bind,source=uv.lock,target=${UV_PROJECT}/uv.lock \
7171
--mount=type=bind,source=conanfile.py,target=/tmp/conanfile.py \
72+
--mount=type=bind,source=conan.lock,target=/tmp/conan.lock \
7273
uv run --only-group conan --with ninja conan profile detect --exist-ok && \
7374
if [ "$(jq -r '.remotes[0].url' ${CONAN_HOME}/remotes.json )" != "${CONAN_CENTER_PROXY_V2_URL}" ]; then \
7475
echo "Setting the conan center url for building cache: ${CONAN_CENTER_PROXY_V2_URL}" && \

scripts/resources/windows/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,10 @@ ARG UV_INDEX_URL
7171
ARG UV_EXTRA_INDEX_URL
7272
ENV UV_PROJECT=c:/temp/uv
7373
COPY conanfile.py c:/temp/conanfile.py
74-
COPY pyproject.toml uv.lock ${UV_PROJECT}/
74+
COPY pyproject.toml uv.lock conan.lock ${UV_PROJECT}/
7575
COPY scripts/resources/windows/conan/profile.ini ${CONAN_HOME}/profiles/default
7676
COPY ci/docker/shared/conan/remotes.json ${CONAN_HOME}/remotes.json
77+
7778
ARG CONAN_CENTER_PROXY_V2_URL
7879
ENV UV_FROZEN=1
7980
RUN uv run --only-group conan --with ninja conan profile detect --exist-ok ; `

0 commit comments

Comments
 (0)