diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5fa4792e..7db26ab2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/other/docker/tcc/Dockerfile b/other/docker/tcc/Dockerfile index 9a8a2e05..65ab3e76 100644 --- a/other/docker/tcc/Dockerfile +++ b/other/docker/tcc/Dockerfile @@ -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 \ @@ -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 \ @@ -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 \ @@ -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'