2021-12-13 23:36:50 +08:00
|
|
|
name: ci
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches: [master]
|
|
|
|
|
|
|
|
jobs:
|
2022-01-14 21:03:32 +08:00
|
|
|
mypy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up Python 3.9
|
|
|
|
uses: actions/setup-python@v1
|
|
|
|
with:
|
|
|
|
python-version: 3.9
|
|
|
|
- name: Install mypy
|
|
|
|
run: pip install mypy
|
|
|
|
- name: Run mypy
|
|
|
|
run: |
|
2022-02-04 23:05:19 +08:00
|
|
|
(find . -name "*.py" -and -not -name "conanfile.py"; grep -lR '^#!.*python') \
|
|
|
|
| xargs -n1 -P8 mypy --strict
|
2022-01-14 21:03:32 +08:00
|
|
|
|
2022-01-13 20:31:14 +08:00
|
|
|
build-msan:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-02-01 03:32:50 +08:00
|
|
|
- name: Pull toxchat/toktok-stack:latest-msan
|
|
|
|
run: docker pull toxchat/toktok-stack:latest-msan
|
2022-01-13 20:31:14 +08:00
|
|
|
- name: Run tests under MemorySanitizer
|
|
|
|
# TODO(iphydf): Remove "|| true" once this works correctly.
|
2022-02-01 03:32:50 +08:00
|
|
|
run: docker run --rm -v $PWD:/src/workspace/c-toxcore toxchat/toktok-stack:latest-msan
|
2022-01-13 20:31:14 +08:00
|
|
|
bazel test //c-toxcore/auto_tests:lossless_packet_test || true
|
|
|
|
|
2021-12-13 23:36:50 +08:00
|
|
|
build-nacl:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-12-14 23:35:37 +08:00
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
- name: Docker Build
|
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
file: other/docker/autotools/Dockerfile
|
2021-12-20 09:39:24 +08:00
|
|
|
|
|
|
|
build-win32:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Docker Build
|
2022-01-10 09:17:46 +08:00
|
|
|
run: .github/scripts/cmake-win32 install
|
2021-12-20 09:39:24 +08:00
|
|
|
- name: Cross compilation
|
2022-01-10 09:17:46 +08:00
|
|
|
run: .github/scripts/cmake-win32 script
|
2021-12-20 09:39:24 +08:00
|
|
|
|
|
|
|
build-win64:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Docker Build
|
2022-01-10 09:17:46 +08:00
|
|
|
run: .github/scripts/cmake-win64 install
|
2021-12-20 09:39:24 +08:00
|
|
|
- name: Cross compilation
|
2022-01-10 09:17:46 +08:00
|
|
|
run: .github/scripts/cmake-win64 script
|
2021-12-21 00:57:11 +08:00
|
|
|
|
2021-12-23 23:44:48 +08:00
|
|
|
build-freebsd:
|
2021-12-21 00:57:11 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container: toxchat/freebsd
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Build on FreeBSD
|
2022-01-10 09:17:46 +08:00
|
|
|
run: .github/scripts/cmake-freebsd-stage2
|
2021-12-29 07:25:34 +08:00
|
|
|
|
|
|
|
build-macos:
|
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Build and test
|
2022-01-10 09:17:46 +08:00
|
|
|
run: .github/scripts/cmake-osx
|
2021-12-31 04:58:35 +08:00
|
|
|
|
2022-01-06 03:43:44 +08:00
|
|
|
coverage-linux:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Build and test
|
2022-01-10 09:17:46 +08:00
|
|
|
run: .github/scripts/cmake-linux
|
2022-01-06 03:43:44 +08:00
|
|
|
env:
|
|
|
|
CC: gcc
|
|
|
|
CXX: g++
|
|
|
|
- name: Upload coverage
|
2022-01-10 09:17:46 +08:00
|
|
|
run: .github/scripts/upload-coverage
|
2022-01-06 03:43:44 +08:00
|
|
|
|
2021-12-31 04:58:35 +08:00
|
|
|
build-tcc:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install dependencies
|
|
|
|
run:
|
|
|
|
sudo apt-get install -y --no-install-recommends
|
|
|
|
tcc
|
|
|
|
libconfig-dev
|
2022-02-07 07:53:41 +08:00
|
|
|
libmsgpack-dev
|
2021-12-31 04:58:35 +08:00
|
|
|
libopus-dev
|
|
|
|
libsodium-dev
|
|
|
|
libvpx-dev
|
|
|
|
- name: Build with TCC
|
|
|
|
run:
|
|
|
|
tcc
|
2022-02-07 07:53:41 +08:00
|
|
|
-Dinline=static
|
2021-12-31 04:58:35 +08:00
|
|
|
-o send_message_test
|
|
|
|
-Wall -Werror
|
|
|
|
-bench -g
|
2022-01-26 03:25:36 +08:00
|
|
|
auto_tests/auto_test_support.c
|
2021-12-31 04:58:35 +08:00
|
|
|
auto_tests/send_message_test.c
|
|
|
|
testing/misc_tools.c
|
|
|
|
toxav/*.c
|
|
|
|
toxcore/*.c
|
2022-02-07 00:41:31 +08:00
|
|
|
toxcore/*/*.c
|
2021-12-31 04:58:35 +08:00
|
|
|
toxencryptsave/*.c
|
2022-02-07 07:53:41 +08:00
|
|
|
$(pkg-config --cflags --libs libsodium msgpack opus vpx)
|
2021-12-31 04:58:35 +08:00
|
|
|
- name: Run the test
|
|
|
|
run: "./send_message_test | grep 'tox clients connected'"
|
2022-01-18 04:43:38 +08:00
|
|
|
- name: Build amalgamation file with TCC
|
|
|
|
run:
|
|
|
|
other/make_single_file
|
2022-01-26 03:25:36 +08:00
|
|
|
auto_tests/auto_test_support.c
|
2022-01-18 04:43:38 +08:00
|
|
|
auto_tests/send_message_test.c
|
|
|
|
testing/misc_tools.c |
|
|
|
|
tcc -
|
|
|
|
-o send_message_test
|
|
|
|
-Wall -Werror
|
|
|
|
-bench -g
|
2022-02-07 07:53:41 +08:00
|
|
|
$(pkg-config --cflags --libs libsodium msgpack opus vpx)
|
2022-01-18 04:43:38 +08:00
|
|
|
- name: Run the test again
|
|
|
|
run: "./send_message_test | grep 'tox clients connected'"
|
2021-12-31 04:58:35 +08:00
|
|
|
|
|
|
|
build-compcert:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container: toxchat/compcert
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Build with CompCert
|
|
|
|
run:
|
|
|
|
ccomp
|
|
|
|
-o send_message_test
|
|
|
|
-Wall -Werror
|
|
|
|
-Wno-c11-extensions
|
|
|
|
-Wno-unknown-pragmas
|
|
|
|
-Wno-unused-variable
|
|
|
|
-fstruct-passing -fno-unprototyped -g
|
2022-01-26 03:25:36 +08:00
|
|
|
auto_tests/auto_test_support.c
|
2021-12-31 04:58:35 +08:00
|
|
|
auto_tests/send_message_test.c
|
|
|
|
testing/misc_tools.c
|
|
|
|
toxav/*.c
|
|
|
|
toxcore/*.c
|
2022-02-07 00:41:31 +08:00
|
|
|
toxcore/*/*.c
|
2021-12-31 04:58:35 +08:00
|
|
|
toxencryptsave/*.c
|
2022-02-07 07:53:41 +08:00
|
|
|
-D__COMPCERT__ -DDISABLE_VLA -Dinline=
|
|
|
|
-lpthread $(pkg-config --cflags --libs libsodium msgpack opus vpx)
|
2021-12-31 04:58:35 +08:00
|
|
|
- name: Run the test
|
|
|
|
run: "./send_message_test | grep 'tox clients connected'"
|
2022-01-28 07:38:58 +08:00
|
|
|
|
|
|
|
buildifier:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Check
|
|
|
|
run: |
|
|
|
|
wget --no-verbose --output-document=buildifier https://github.com/bazelbuild/buildtools/releases/download/4.2.5/buildifier-linux-amd64
|
|
|
|
sudo chmod +x buildifier
|
|
|
|
./buildifier --lint=warn --warnings=all -mode diff $(find . -type f -name BUILD.bazel)
|