From 0dfd6a825fd82a8d10d418eaba0d6ab191b9d563 Mon Sep 17 00:00:00 2001 From: supersurviveur Date: Sun, 5 Oct 2025 12:45:18 +0200 Subject: [PATCH] Reduce size of git clone and use all cores in make --- Containerfile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Containerfile b/Containerfile index f5fa8b4..363da31 100644 --- a/Containerfile +++ b/Containerfile @@ -32,9 +32,9 @@ RUN apk add yosys WORKDIR /home/root/aur-install # Install prjxray librairies -RUN git clone https://github.com/supersurviveur/prjxray.git && \ +RUN git clone https://github.com/supersurviveur/prjxray.git --depth 1 && \ cd prjxray && \ - git submodule update --init && \ + git submodule update --init --depth 1 && \ # include fasm2frames in python package mv utils/fasm2frames.py prjxray/ && \ sed -E 's/(fasm2frames=)utils/\1prjxray/' -i setup.py && \ @@ -44,7 +44,7 @@ RUN git clone https://github.com/supersurviveur/prjxray.git && \ -DCMAKE_INSTALL_PREFIX='/usr' \ -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ -Wno-dev && \ - cmake --build build && \ + cmake --build build -j$(nproc) && \ python -m build --wheel --no-isolation --skip-dependency-check && \ python -m installer dist/*.whl && \ python -m build third_party/fasm --wheel --no-isolation --skip-dependency-check && \ @@ -54,7 +54,7 @@ RUN git clone https://github.com/supersurviveur/prjxray.git && \ RUN pip install textx --break-system-packages # Install the zynq7 prjxray database -RUN git clone https://github.com/f4pga/prjxray-db.git && \ +RUN git clone https://github.com/f4pga/prjxray-db.git --depth 1 && \ cd prjxray-db && \ install -dm 755 /usr/share/xray/database && \ cp -r zynq7 /usr/share/xray/database/ && \ @@ -62,9 +62,9 @@ RUN git clone https://github.com/f4pga/prjxray-db.git && \ rm /usr/share/xray/database/zynq7/xc7z020 -rf # Install nextpnr-himbaechel -RUN git clone https://github.com/YosysHQ/nextpnr && \ +RUN git clone https://github.com/YosysHQ/nextpnr --depth 1 && \ cd nextpnr && \ - git submodule update --remote --init himbaechel/uarch/xilinx/meta && \ + git submodule update --remote --init --depth 1 himbaechel/uarch/xilinx/meta && \ cmake -S "." -B build \ -DARCH=himbaechel \ -DHIMBAECHEL_UARCH=xilinx \ @@ -75,12 +75,12 @@ RUN git clone https://github.com/YosysHQ/nextpnr && \ -DCMAKE_BUILD_TYPE=None \ -DCMAKE_INSTALL_PREFIX=/usr \ -DUSE_OPENMP=ON && \ - make -C build + make -C build -j$(nproc) # Install sv2v -RUN git clone https://github.com/zachjs/sv2v && \ +RUN git clone https://github.com/zachjs/sv2v --depth 1 && \ cd sv2v && \ - make + make -j$(nproc) COPY copy_bin_deps.sh /usr/bin/ RUN chmod +x /usr/bin/copy_bin_deps.sh