mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-08 02:53:25 -08:00
[CI] Update Linux Dockerfiles (#6894)
- Install the distribution's gtest (libgtest-dev / gtest-devel) in the Debian, Ubuntu and Fedora images, so configuring the test suite no longer downloads googletest; Arch already had it. - Drop the toolchain meta packages. g++, Ninja and cmake are all that is used, and make is not: Ninja is the generator on every Linux leg. The DEB legs keep dpkg-dev, which CPack needs for dpkg-shlibdeps when CPACK_DEBIAN_PACKAGE_SHLIBDEPS is on. - Use the slim Debian bases and install Fedora packages with --nodocs. - Define the global rng in the tests that pull the server game classes out of server_remote, as the other server tests already do. Debian's libgtest.a leaves a std::string reference undefined, so the linker drags server_protocolhandler.cpp and the classes behind it into any test that links the library, and those need the symbol. git, ca-certificates, libcurl and OpenSSL stay: sentry-native is cloned over git at configure time on every packaging leg, and OpenSSL also backs CryptoUtil. mariadb-devel stays on Fedora for the same reason it is installed elsewhere: without it Servatrice configures successfully but silently loses its MySQL connector. Co-authored-by: Lukas Brübach <44814898+BruebachL@users.noreply.github.com>
This commit is contained in:
parent
2b4019ccaf
commit
fb3f895cfd
11 changed files with 30 additions and 12 deletions
|
|
@ -1,9 +1,9 @@
|
|||
from archlinux:latest
|
||||
FROM archlinux:latest
|
||||
|
||||
RUN pacman --sync --refresh --sysupgrade --needed --noconfirm \
|
||||
base-devel \
|
||||
ccache \
|
||||
cmake \
|
||||
gcc \
|
||||
git \
|
||||
gtest \
|
||||
mariadb-libs \
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
FROM debian:12
|
||||
FROM debian:12-slim
|
||||
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
cmake \
|
||||
dpkg-dev \
|
||||
file \
|
||||
g++ \
|
||||
git \
|
||||
libcurl4-openssl-dev \
|
||||
libgl-dev \
|
||||
libgtest-dev \
|
||||
liblzma-dev \
|
||||
libmariadb-dev-compat \
|
||||
libprotobuf-dev \
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
FROM debian:13
|
||||
FROM debian:13-slim
|
||||
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
cmake \
|
||||
dpkg-dev \
|
||||
file \
|
||||
g++ \
|
||||
git \
|
||||
libcurl4-openssl-dev \
|
||||
libgl-dev \
|
||||
libgtest-dev \
|
||||
liblzma-dev \
|
||||
libmariadb-dev-compat \
|
||||
libprotobuf-dev \
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
FROM fedora:44
|
||||
|
||||
RUN dnf install -y \
|
||||
RUN dnf install -y --nodocs \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
cmake \
|
||||
gcc-c++ \
|
||||
git \
|
||||
gtest-devel \
|
||||
libcurl-devel \
|
||||
mariadb-devel \
|
||||
ninja-build \
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
FROM fedora:45
|
||||
|
||||
RUN dnf install -y \
|
||||
RUN dnf install -y --nodocs \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
cmake \
|
||||
gcc-c++ \
|
||||
git \
|
||||
gtest-devel \
|
||||
libcurl-devel \
|
||||
mariadb-devel \
|
||||
ninja-build \
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
FROM debian:12
|
||||
FROM debian:12-slim
|
||||
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
ccache \
|
||||
cmake \
|
||||
dpkg-dev \
|
||||
file \
|
||||
g++ \
|
||||
git \
|
||||
|
|
|
|||
|
|
@ -2,15 +2,16 @@ FROM ubuntu:24.04
|
|||
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
cmake \
|
||||
dpkg-dev \
|
||||
file \
|
||||
g++ \
|
||||
git \
|
||||
libcurl4-openssl-dev \
|
||||
libgl-dev \
|
||||
libgtest-dev \
|
||||
liblzma-dev \
|
||||
libmariadb-dev-compat \
|
||||
libprotobuf-dev \
|
||||
|
|
|
|||
|
|
@ -2,16 +2,17 @@ FROM ubuntu:26.04
|
|||
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
cmake \
|
||||
dpkg-dev \
|
||||
file \
|
||||
g++ \
|
||||
gcovr \
|
||||
git \
|
||||
libcurl4-openssl-dev \
|
||||
libgl-dev \
|
||||
libgtest-dev \
|
||||
liblzma-dev \
|
||||
libmariadb-dev-compat \
|
||||
libprotobuf-dev \
|
||||
|
|
|
|||
|
|
@ -3,8 +3,12 @@
|
|||
#include <gtest/gtest.h>
|
||||
#include <initializer_list>
|
||||
#include <libcockatrice/network/client/abstract/latency_tracker.h>
|
||||
#include <libcockatrice/rng/rng_abstract.h>
|
||||
#include <string>
|
||||
|
||||
// Referenced by other translation units in the server_remote library.
|
||||
RNG_Abstract *rng = nullptr;
|
||||
|
||||
TEST(LatencyTrackerTest, EmptyTrackerYieldsZeroedStats)
|
||||
{
|
||||
LatencyTracker tracker;
|
||||
|
|
|
|||
|
|
@ -23,10 +23,14 @@
|
|||
#include <libcockatrice/card/printing/exact_card.h>
|
||||
#include <libcockatrice/card/set/card_set.h>
|
||||
#include <libcockatrice/interfaces/noop_card_set_priority_controller.h>
|
||||
#include <libcockatrice/rng/rng_abstract.h>
|
||||
#include <libcockatrice/settings/paths_settings.h>
|
||||
#include <qnamespace.h>
|
||||
#include <string>
|
||||
|
||||
// Referenced by other translation units in the server_remote library.
|
||||
RNG_Abstract *rng = nullptr;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -8,9 +8,13 @@
|
|||
#include <QString>
|
||||
#include <gtest/gtest.h>
|
||||
#include <libcockatrice/network/server/remote/game/server_counter.h>
|
||||
#include <libcockatrice/rng/rng_abstract.h>
|
||||
#include <limits>
|
||||
#include <string>
|
||||
|
||||
// Referenced by other translation units in the server_remote library.
|
||||
RNG_Abstract *rng = nullptr;
|
||||
|
||||
TEST(ServerCounter, IncrementDoesNotOverflow)
|
||||
{
|
||||
Server_Counter c(1, "test", color(), 10, std::numeric_limits<int>::max());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue