Skip to content

Commit

Permalink
cleanup: Use tcc docker image for CI.
Browse files Browse the repository at this point in the history
Instead of repeating the instructions in github actions configs.
  • Loading branch information
iphydf committed Nov 18, 2023
1 parent cd34b60 commit 576b855
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 45 deletions.
46 changes: 5 additions & 41 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,48 +128,12 @@ jobs:
build-tcc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Docker Build
uses: docker/build-push-action@v2
with:
submodules: recursive
- name: Install dependencies
run:
sudo apt-get install -y --no-install-recommends
tcc
libconfig-dev
libopus-dev
libsodium-dev
libvpx-dev
- name: Build with TCC
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
$(pkg-config --cflags --libs libsodium opus vpx)
- name: Run the test
run: "./send_message_test | grep 'tox clients connected'"
- name: Build amalgamation file with TCC
run:
other/make_single_file
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
$(pkg-config --cflags --libs libsodium opus vpx)
- name: Run the test again
run: "./send_message_test | grep 'tox clients connected'"
file: other/docker/tcc/Dockerfile

build-compcert:
runs-on: ubuntu-latest
Expand Down
12 changes: 8 additions & 4 deletions other/docker/tcc/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

RUN apt-get update && \
DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
Expand All @@ -17,6 +17,9 @@ COPY testing/ /work/testing/
COPY toxav/ /work/toxav/
COPY toxcore/ /work/toxcore/
COPY toxencryptsave/ /work/toxencryptsave/
COPY third_party/ /work/third_party/

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

RUN tcc \
-Dinline=static \
Expand All @@ -31,9 +34,9 @@ RUN tcc \
toxcore/*/*.c \
toxencryptsave/*.c \
third_party/cmp/*.c \
$(pkg-config --cflags --libs libsodium opus vpx)
$(pkg-config --cflags --libs libsodium opus vpx) \
&& ./send_message_test | grep 'tox clients connected'

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
COPY other/make_single_file /work/other/
RUN \
other/make_single_file \
Expand All @@ -44,4 +47,5 @@ RUN \
-o send_message_test \
-Wall -Werror \
-bench -g \
$(pkg-config --cflags --libs libsodium opus vpx)
$(pkg-config --cflags --libs libsodium opus vpx) \
&& ./send_message_test | grep 'tox clients connected'

0 comments on commit 576b855

Please sign in to comment.