forked from irungentoo/toxcore
-
Notifications
You must be signed in to change notification settings - Fork 292
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Add slimcc compiler compatibility test.
- Loading branch information
Showing
6 changed files
with
55 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
!/Makefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
SOURCES := auto_tests/send_message_test.c \ | ||
auto_tests/auto_test_support.c \ | ||
testing/misc_tools.c \ | ||
$(wildcard tox*/*.c tox*/*/*.c) \ | ||
third_party/cmp/cmp.c | ||
OBJECTS := $(SOURCES:.c=.o) | ||
|
||
CC := /work/slimcc/slimcc | ||
CFLAGS := $(shell pkg-config --cflags libsodium opus vpx) | ||
LDFLAGS := $(shell pkg-config --libs libsodium opus vpx) | ||
|
||
send_message_test: $(OBJECTS) | ||
$(CC) -o $@ $+ $(LDFLAGS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
|
||
set -eux | ||
BUILD=slimcc | ||
other/docker/sources/build | ||
docker build -t "toxchat/c-toxcore:$BUILD" -f "other/docker/$BUILD/$BUILD.Dockerfile" . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM toxchat/c-toxcore:sources AS sources | ||
FROM ubuntu:22.04 | ||
|
||
RUN apt-get update && \ | ||
DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \ | ||
ca-certificates \ | ||
gcc \ | ||
git \ | ||
libc-dev \ | ||
libopus-dev \ | ||
libsodium-dev \ | ||
libvpx-dev \ | ||
make \ | ||
pkg-config \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /work/slimcc | ||
RUN ["git", "clone", "--depth=1", "https://github.com/fuhsnn/slimcc", "/work/slimcc"] | ||
RUN ["make", "CFLAGS=-O3"] | ||
|
||
WORKDIR /work/c-toxcore | ||
COPY --from=sources /src/ /work/c-toxcore | ||
COPY other/docker/slimcc/Makefile /work/c-toxcore/ | ||
RUN ["make"] | ||
|
||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
RUN ./send_message_test | grep "tox clients connected" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters