Skip to content

Commit 1832fd1

Browse files
authored
Merge pull request #132 from KIT-MRT/use-local-repo-in-cibuildwheel
Use local repo in cibuildwheel to ensure consistent versions of core library and Python wheels
2 parents fa6468d + 310517e commit 1832fd1

File tree

3 files changed

+27
-24
lines changed

3 files changed

+27
-24
lines changed

python_bindings/Dockerfile

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -64,35 +64,37 @@ RUN yum update -y && \
6464
yum clean all
6565

6666
# Build glog from source to get up-to-date version that can be found without FindGlog.cmake
67-
RUN git clone https://github.com/google/glog.git && \
68-
cd glog && \
67+
RUN git clone https://github.com/google/glog.git /tmp/glog && \
68+
cd /tmp/glog && \
6969
mkdir build && \
7070
cd build && \
7171
cmake -DBUILD_SHARED_LIBS=OFF .. && \
72-
make && \
73-
make install && \
74-
cd ../.. && \
75-
rm -rf glog
72+
cmake --build . && \
73+
cmake --install . && \
74+
rm -rf /tmp/glog
7675

7776
# Build util_caching
78-
RUN git clone https://github.com/KIT-MRT/util_caching.git && \
79-
cd util_caching && \
77+
RUN git clone https://github.com/KIT-MRT/util_caching.git /tmp/util_caching && \
78+
cd /tmp/util_caching && \
8079
mkdir build && \
8180
cd build && \
8281
cmake .. && \
83-
make && \
84-
make install && \
85-
cd ../.. && \
86-
rm -rf util_caching
82+
cmake --build . && \
83+
cmake --install . && \
84+
rm -rf /tmp/util_caching
8785

8886
# Build arbitration_graphs
89-
RUN git clone https://github.com/KIT-MRT/arbitration_graphs.git && \
90-
cd arbitration_graphs && \
91-
mkdir build && \
92-
cd build && \
93-
cmake -DBUILD_GUI=false .. && \
94-
make && \
95-
make install && \
96-
cd ../.. && \
97-
rm -rf arbitration_graphs
87+
COPY cmake /tmp/arbitration_graphs/cmake
88+
COPY CMakeLists.txt /tmp/arbitration_graphs/
89+
COPY include /tmp/arbitration_graphs/include
90+
COPY LICENSE /tmp/arbitration_graphs/
91+
COPY README.md /tmp/arbitration_graphs/
92+
COPY version /tmp/arbitration_graphs/
93+
94+
WORKDIR /tmp/arbitration_graphs/build
95+
96+
RUN cmake -DBUILD_GUI=false .. && \
97+
cmake --build . && \
98+
cmake --install . && \
99+
rm -rf /tmp/arbitration_graphs
98100

python_bindings/docker-compose.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ services:
1010

1111
wheel_builder:
1212
build:
13-
context: .
13+
context: ..
14+
dockerfile: python_bindings/Dockerfile
1415
target: wheel_builder
1516
image: arbitration_graphs_wheel_builder
1617

python_bindings/scripts/cibuildwheel.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/bin/env bash
22

3-
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
3+
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
44
cd $SCRIPT_DIR/..
55

6-
docker compose build wheel_builder
6+
docker compose build --pull wheel_builder
77

88
# Temporary replace the symlinked version with a copy as the link can not be resolved inside the docker container
99
rm version

0 commit comments

Comments
 (0)