11VERSION 0.8
22
3+ ARG --global default_container_registry = "docker.io"
4+
5+ build-gcc :
6+ ARG --required gcc_version
7+ FROM $default_container_registry/gcc:$gcc_version
8+ DO --pass-args +BOOTSTRAP_BUILD_INSTALL_EXPORT \
9+ --build_deps "perl pkg-config linux-libc-dev curl zip unzip"
10+
311build-alpine :
4- FROM alpine:3.20
12+ FROM $default_container_registry/ alpine:3.20
513 DO --pass-args +BOOTSTRAP_BUILD_INSTALL_EXPORT \
614 --build_deps "build-base git cmake gcc g++ ninja make ccache python3" \
715 --vcpkg_bs_deps "pkgconfig linux-headers perl bash tar zip unzip curl" \
816 --third_deps "fmt-dev boost-dev openssl-dev"
917
1018build-debian :
11- FROM debian:12
19+ FROM $default_container_registry/ debian:12
1220 DO --pass-args +BOOTSTRAP_BUILD_INSTALL_EXPORT \
1321 # Spec test generation requires a Python newer than what is on Debian 12
1422 --BUILD_SPEC_TESTS = FALSE \
@@ -17,7 +25,7 @@ build-debian:
1725 --third_deps "libfmt-dev libboost-url1.81-dev libboost-container1.81-dev libssl-dev"
1826
1927build-rl :
20- FROM rockylinux:8
28+ FROM $default_container_registry/ rockylinux:8
2129 RUN dnf -y install epel-release unzip
2230 LET cmake_url = "https://github.com/Kitware/CMake/releases/download/v3.30.3/cmake-3.30.3-linux-x86_64.sh"
2331 RUN curl "$cmake_url" -Lo cmake.sh && \
@@ -32,14 +40,14 @@ build-rl:
3240 --vcpkg_bs_deps "zip unzip git perl"
3341
3442build-fedora :
35- FROM fedora:41
43+ FROM $default_container_registry/ fedora:41
3644 DO --pass-args +BOOTSTRAP_BUILD_INSTALL_EXPORT \
3745 --build_deps "cmake ninja-build git gcc gcc-c++ python3.12 ccache" \
3846 --vcpkg_bs_deps "zip unzip perl" \
3947 --third_deps "boost-devel boost-url fmt-devel openssl-devel"
4048
4149build-multi :
42- FROM alpine
50+ FROM $default_container_registry/ alpine
4351 # COPY +build-rl/ out/rl/ ## XXX: Redhat build is broken: Investigate GCC linker issues
4452 COPY (+build-debian/ --use_vcpkg = false) out/debian/
4553 COPY (+build-alpine/ --use_vcpkg = false) out/alpine/
6169INIT :
6270 FUNCTION
6371 COPY --chmod = 755 tools/__install /usr/local/bin/__install
72+ RUN __install curl
73+ ARG uv_version = "0.8.15"
74+ ARG uv_install_sh_url = "https://astral.sh/uv/$uv_version/install.sh"
75+ RUN (curl -LsSf "$uv_install_sh_url" || wget -qO- "$uv_install_sh_url" ) \
76+ | env UV_UNMANAGED_INSTALL= /opt/uv sh - \
77+ && ln -s /opt/uv/uv /usr/local/bin/uv \
78+ && uv --version
6479
6580BOOTSTRAP_BUILD_INSTALL_EXPORT :
6681 FUNCTION
@@ -110,12 +125,14 @@ BOOTSTRAP_DEPS:
110125 # Running CMake now will prepare our dependencies without configuring the rest of the project
111126 CACHE ~/.cache/vcpkg
112127 ARG launcher
113- RUN $launcher cmake -S $src_tmp -B $src_tmp /_build/vcpkg-bootstrapping
128+ RUN $launcher uv run --with = cmake~ = 3.20 --with = ninja cmake -S $src_tmp -B $src_tmp /_build/vcpkg-bootstrapping
114129 END
115130
116131COPY_SRC :
117132 FUNCTION
118- COPY --dir CMakeLists.txt vcpkg*.json etc/ src/ tools/ include/ etc/ tests/ .
133+ COPY --dir CMakeLists.txt vcpkg*.json etc/ src/ tools/ include/ etc/ \
134+ tests/ Makefile pyproject.toml uv.lock \
135+ .
119136
120137BUILD :
121138 FUNCTION
@@ -132,13 +149,13 @@ BUILD:
132149 ARG use_vcpkg= true
133150 LET __use_vcpkg= $(echo "$use_vcpkg" | tr "[:lower:]" "[:upper:]" )
134151 # Configure
135- RUN $launcher cmake -S . -B _build -G "Ninja Multi-Config" \
136- -D CMAKE_CROSS_CONFIGS = "all" \
137- -D CMAKE_INSTALL_PREFIX = $prefix \
138- -D AMONGOC_USE_PMM = $__use_vcpkg \
139- -D BUILD_TESTING = $__test \
140- -D BUILD_SPEC_TESTS = $BUILD_SPEC_TESTS \
141- -D CMAKE_DEFAULT_CONFIGS = all
152+ RUN $launcher make test \
153+ LAUNCHER = 'uv run --group=build' \
154+ CONFIGS = "Debug" \
155+ TEST_CONFIG = "Debug" \
156+ USE_PMM = $__use_vcpkg \
157+ INSTALL_PREFIX = $prefix \
158+ BUILD_TESTING = $__test
142159 # Build
143160 RUN $launcher cmake --build _build
144161 IF test "$install_prefix" != ""
0 commit comments