bazel(ci): docker cleanup

This commit is contained in:
Mizux Seiha
2023-07-11 15:31:16 +02:00
parent eea10fb7b9
commit dd38534bd2
2 changed files with 5 additions and 3 deletions

View File

@@ -26,16 +26,16 @@ COPY . .
FROM devel AS build
RUN bazel version
RUN bazel build \
-c opt \
--host_javabase=@local_jdk//:jdk \
-c opt \
--action_env=BAZEL_CXXOPTS="-std=c++17" \
--subcommands=true \
ortools/... examples/...
FROM build AS test
RUN bazel test \
-c opt \
--host_javabase=@local_jdk//:jdk \
-c opt \
--action_env=BAZEL_CXXOPTS="-std=c++17" \
--test_output=errors \
ortools/... examples/...

View File

@@ -1,6 +1,7 @@
# Create a virtual environment with all tools installed
# ref: https://hub.docker.com/r/opensuse/tumbleweed
FROM opensuse/tumbleweed AS env
# Install system build dependencies
ENV PATH=/usr/local/bin:$PATH
RUN zypper update -y \
@@ -16,7 +17,8 @@ https://download.opensuse.org/repositories/home:ftake:branches:M17N/openSUSE_Tum
&& zypper clean -a
# Install Python
RUN zypper install -y python3 python3-pip python3-devel \
RUN zypper update -y \
&& zypper install -y python3 python3-pip python3-devel \
&& zypper clean -a
FROM env AS devel