Skip to content

Update GitHub action config #10

Update GitHub action config

Update GitHub action config #10

name: Tests on Ubuntu
on:
push:
branches: [ "main", "dev" ]
pull_request:
branches: [ "main" ]
env:
BUILD_TYPE: Debug
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install Ninja and Python 3.12
run: |
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt update && sudo apt install ninja-build python3.12 -y
- uses: actions/checkout@v4
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DCMAKE_CXX_COMPILER=g++-13 -DCMAKE_C_COMPILER=gcc-13 -G Ninja
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target all -j $(nproc)
- name: Run CTest
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}}
- name: List all Python interpreters
run: ls /usr/bin/python* /usr/local/bin/python* /usr/bin/env | grep python
- name: Test server and client
working-directory: ${{github.workspace}}
run: |
curl -sSL https://install.python-poetry.org | python3.12 -
poetry install
poetry shell
./test_cmds.py --server ${{github.workspace}}/build/server --client ${{github.workspace}}/build/client