2023-12-15 15:21:40 +01:00
|
|
|
FROM ubuntu:22.04
|
2023-07-25 11:53:09 +02:00
|
|
|
|
|
|
|
RUN apt-get update && \
|
|
|
|
DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
|
|
|
|
libc-dev \
|
|
|
|
libopus-dev \
|
|
|
|
libsodium-dev \
|
|
|
|
libvpx-dev \
|
|
|
|
pkg-config \
|
|
|
|
tcc \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
WORKDIR /work
|
|
|
|
COPY auto_tests/ /work/auto_tests/
|
|
|
|
COPY testing/ /work/testing/
|
|
|
|
COPY toxav/ /work/toxav/
|
|
|
|
COPY toxcore/ /work/toxcore/
|
|
|
|
COPY toxencryptsave/ /work/toxencryptsave/
|
2023-12-15 15:21:40 +01:00
|
|
|
COPY third_party/ /work/third_party/
|
|
|
|
|
|
|
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
2023-07-25 11:53:09 +02:00
|
|
|
|
|
|
|
RUN tcc \
|
|
|
|
-Dinline=static \
|
|
|
|
-o send_message_test \
|
|
|
|
-Wall -Werror \
|
|
|
|
-bench -g \
|
|
|
|
auto_tests/auto_test_support.c \
|
|
|
|
auto_tests/send_message_test.c \
|
|
|
|
testing/misc_tools.c \
|
|
|
|
toxav/*.c \
|
|
|
|
toxcore/*.c \
|
|
|
|
toxcore/*/*.c \
|
|
|
|
toxencryptsave/*.c \
|
|
|
|
third_party/cmp/*.c \
|
2023-12-15 15:21:40 +01:00
|
|
|
$(pkg-config --cflags --libs libsodium opus vpx) \
|
|
|
|
&& ./send_message_test | grep 'tox clients connected'
|
2023-07-25 11:53:09 +02:00
|
|
|
|
|
|
|
COPY other/make_single_file /work/other/
|
|
|
|
RUN \
|
2023-12-27 12:37:22 +01:00
|
|
|
other/make_single_file -core \
|
2023-07-25 11:53:09 +02:00
|
|
|
auto_tests/auto_test_support.c \
|
|
|
|
auto_tests/send_message_test.c \
|
|
|
|
testing/misc_tools.c | \
|
|
|
|
tcc - \
|
|
|
|
-o send_message_test \
|
|
|
|
-Wall -Werror \
|
|
|
|
-bench -g \
|
2023-12-27 12:37:22 +01:00
|
|
|
$(pkg-config --cflags --libs libsodium) \
|
2023-12-15 15:21:40 +01:00
|
|
|
&& ./send_message_test | grep 'tox clients connected'
|
2023-12-27 12:37:22 +01:00
|
|
|
|
|
|
|
RUN \
|
|
|
|
other/make_single_file \
|
|
|
|
auto_tests/auto_test_support.c \
|
|
|
|
auto_tests/toxav_basic_test.c \
|
|
|
|
testing/misc_tools.c | \
|
|
|
|
tcc - \
|
|
|
|
-o toxav_basic_test \
|
|
|
|
-Wall -Werror \
|
|
|
|
-bench -g \
|
|
|
|
$(pkg-config --cflags --libs libsodium opus vpx) \
|
|
|
|
&& ./toxav_basic_test | grep 'Test successful'
|