Skip to content

Commit 41e6ea8

Browse files
committed
cleanup: Use tcc docker image for CI.
Instead of repeating the instructions in github actions configs.
1 parent e726b19 commit 41e6ea8

File tree

2 files changed

+13
-45
lines changed

2 files changed

+13
-45
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -128,48 +128,12 @@ jobs:
128128
build-tcc:
129129
runs-on: ubuntu-latest
130130
steps:
131-
- uses: actions/checkout@v2
131+
- name: Set up Docker Buildx
132+
uses: docker/setup-buildx-action@v1
133+
- name: Docker Build
134+
uses: docker/build-push-action@v2
132135
with:
133-
submodules: recursive
134-
- name: Install dependencies
135-
run:
136-
sudo apt-get install -y --no-install-recommends
137-
tcc
138-
libconfig-dev
139-
libopus-dev
140-
libsodium-dev
141-
libvpx-dev
142-
- name: Build with TCC
143-
run:
144-
tcc
145-
-Dinline=static
146-
-o send_message_test
147-
-Wall -Werror
148-
-bench -g
149-
auto_tests/auto_test_support.c
150-
auto_tests/send_message_test.c
151-
testing/misc_tools.c
152-
toxav/*.c
153-
toxcore/*.c
154-
toxcore/*/*.c
155-
toxencryptsave/*.c
156-
third_party/cmp/*.c
157-
$(pkg-config --cflags --libs libsodium opus vpx)
158-
- name: Run the test
159-
run: "./send_message_test | grep 'tox clients connected'"
160-
- name: Build amalgamation file with TCC
161-
run:
162-
other/make_single_file
163-
auto_tests/auto_test_support.c
164-
auto_tests/send_message_test.c
165-
testing/misc_tools.c |
166-
tcc -
167-
-o send_message_test
168-
-Wall -Werror
169-
-bench -g
170-
$(pkg-config --cflags --libs libsodium opus vpx)
171-
- name: Run the test again
172-
run: "./send_message_test | grep 'tox clients connected'"
136+
file: other/docker/tcc/Dockerfile
173137

174138
build-compcert:
175139
runs-on: ubuntu-latest

other/docker/tcc/Dockerfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:20.04
1+
FROM ubuntu:22.04
22

33
RUN apt-get update && \
44
DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
@@ -17,6 +17,9 @@ COPY testing/ /work/testing/
1717
COPY toxav/ /work/toxav/
1818
COPY toxcore/ /work/toxcore/
1919
COPY toxencryptsave/ /work/toxencryptsave/
20+
COPY third_party/ /work/third_party/
21+
22+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
2023

2124
RUN tcc \
2225
-Dinline=static \
@@ -31,9 +34,9 @@ RUN tcc \
3134
toxcore/*/*.c \
3235
toxencryptsave/*.c \
3336
third_party/cmp/*.c \
34-
$(pkg-config --cflags --libs libsodium opus vpx)
37+
$(pkg-config --cflags --libs libsodium opus vpx) \
38+
&& ./send_message_test | grep 'tox clients connected'
3539

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

0 commit comments

Comments
 (0)