Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Dep agent_core

Dep agent_core #33

Workflow file for this run

name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- "**"
env:
BUILD_DIR: build-ci
BUILD_TYPE: Release
permissions:
contents: read
jobs:
build-test:
name: Build, test, and validate staging
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: |
C2Client/pyproject.toml
C2Client/requirements.txt
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
golang-cfssl \
libegl1 \
libgl1 \
libsmbclient-dev \
libxkbcommon-x11-0 \
libxcb-cursor0 \
libxcb-icccm4 \
libxcb-image0 \
libxcb-keysyms1 \
libxcb-render-util0 \
libxcb-xinerama0
- name: Install Conan
run: python -m pip install --upgrade pip "conan==2.24.0"
- name: Cache Conan packages
uses: actions/cache@v4
with:
path: ~/.conan2
key: conan-${{ runner.os }}-${{ hashFiles('conanfile.txt', 'conan.lock', 'conan/profiles/linux-gcc13') }}
restore-keys: |
conan-${{ runner.os }}-
- name: Configure CMake
run: >
cmake -S "${{ github.workspace }}"
-B "${{ github.workspace }}/${{ env.BUILD_DIR }}"
-DCMAKE_BUILD_TYPE="${{ env.BUILD_TYPE }}"
-DWITH_TESTS=ON
-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES="${{ github.workspace }}/conan_provider.cmake"
-DCONAN_HOST_PROFILE="${{ github.workspace }}/conan/profiles/linux-gcc13"
-DCONAN_BUILD_PROFILE="${{ github.workspace }}/conan/profiles/linux-gcc13"
-DCONAN_LOCKFILE="${{ github.workspace }}/conan.lock"
- name: Build
run: cmake --build "${{ env.BUILD_DIR }}" --config "${{ env.BUILD_TYPE }}" --parallel "$(nproc)"
- name: Run CTest
run: ctest --test-dir "${{ env.BUILD_DIR }}" --build-config "${{ env.BUILD_TYPE }}" --output-on-failure --timeout 120
- name: Install client test dependencies
run: python -m pip install -e "${{ github.workspace }}/C2Client[test]"
- name: Run client tests
env:
C2_PROTOCOL_PYTHON_ROOT: ${{ github.workspace }}/${{ env.BUILD_DIR }}/generated/python_protocol
QT_QPA_PLATFORM: offscreen
run: timeout 180 python -m pytest "${{ github.workspace }}/C2Client/tests" -vv -s
- name: Run packaging tests
run: timeout 180 python -m pytest "${{ github.workspace }}/packaging/tests" -vv -s
- name: Validate release staging
run: |
cmake --build "${{ env.BUILD_DIR }}" --target validate_release_bundle --config "${{ env.BUILD_TYPE }}"
- name: Validate integration runtime staging
run: |
cmake --build "${{ env.BUILD_DIR }}" --target stage_integration_runtime --config "${{ env.BUILD_TYPE }}"
test -x "${{ github.workspace }}/${{ env.BUILD_DIR }}/integration-staging/runtime/Release/TeamServer/TeamServer"
test -f "${{ github.workspace }}/${{ env.BUILD_DIR }}/integration-staging/runtime/Release/Client/c2client_protocol/TeamServerApi_pb2.py"