Skip to content

Websocket demo complete #139

Websocket demo complete

Websocket demo complete #139

Workflow file for this run

name: Run CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-and-test:
runs-on: ubuntu-latest
container:
image: fedora:43
steps:
- name: Install system and C++ dependencies
run: |
dnf install -y gcc gcc-c++ clang openssl-devel wget make zlib-devel ninja-build nodejs clang-tools-extra gdb liburing-devel git
- name: Install Perl dependencies
run: |
dnf install -y perl-core
- name: Install Python dependencies
run: |
dnf install -y python3-pip python3-virtualenv
echo "Python version: $(python3 --version)"
echo "Pip version: $(pip3 --version)"
python3 -m venv /opt/venv
/opt/venv/bin/pip install cmakelang --no-cache-dir
echo "/opt/venv/bin" >> $GITHUB_PATH
- name: Install CMake 4.2.3
run: |
wget -q https://github.com/Kitware/CMake/releases/download/v4.2.3/cmake-4.2.3-linux-x86_64.tar.gz
tar -zxf cmake-4.2.3-linux-x86_64.tar.gz
cp -r cmake-4.2.3-linux-x86_64/* /usr/local/
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check CMake formatting
run: |
cmake-format --version
git ls-files -- \*.cmake \*CMakeLists.txt | xargs cmake-format --check
- name: Check clang formatting
run: |
if [ -n "${{github.event.pull_request.base.sha}}" ]
then
changed=$(git diff --name-only "${{github.event.pull_request.base.sha}}" HEAD | grep -E '\.(cpp|h|hpp|c)$' || true)
if [ -n "$changed" ]
then
if ! echo "$changed" | xargs clang-format --dry-run --Werror
then
echo "incorrect formatting"
exit 1
fi
fi
fi
- name: CMake configure (Debug)
run: cmake -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/clang -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++ --preset=Debug
- name: Build (Debug)
run: cmake --build build_debug
- name: Test RPC (Debug)
working-directory: build_debug/output
run: ./rpc_test
- name: Test Serialiser (Debug)
working-directory: build_debug/output
run: ./serialiser_test
- name: Test JSON Schema Metadata (Debug)
working-directory: build_debug/output
run: ./json_schema_metadata_test
- name: CMake configure (Release)
run: cmake -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/clang -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++ --preset=Release
- name: Build (Release)
run: cmake --build build_release
- name: Test RPC (Release)
working-directory: build_release/output
run: ./rpc_test
- name: CMake configure (Coroutine Debug)
run: cmake -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/clang -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++ --preset=Coroutine_Debug
- name: Build (Coroutine Debug)
run: cmake --build build_coroutine_debug
- name: Test RPC (Coroutine Debug)
working-directory: build_coroutine_debug/output
run: ./rpc_test
- name: CMake configure (Coroutine Release)
run: cmake -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/clang -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++ --preset=Release_with_coroutines_no_logging
- name: Build (Coroutine Release)
run: cmake --build build_coroutine_release
- name: Test RPC (Coroutine Release)
working-directory: build_coroutine_release/output
run: ./rpc_test
- name: Test Serialiser (Coroutine Release)
working-directory: build_coroutine_release/output
run: ./serialiser_test