Skip to content

fix: add missing cstring header for strerror #83

fix: add missing cstring header for strerror

fix: add missing cstring header for strerror #83

Workflow file for this run

name: CI

Check failure on line 1 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

(Line: 49, Col: 27): A sequence was not expected, (Line: 50, Col: 31): A sequence was not expected, (Line: 118, Col: 27): A sequence was not expected, (Line: 119, Col: 31): A sequence was not expected, (Line: 189, Col: 27): A sequence was not expected, (Line: 190, Col: 31): A sequence was not expected
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
# Ubuntu with GCC
build-gcc:
name: Ubuntu (GCC)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
cmake \
build-essential \
git \
pkg-config \
libgoogle-perftools-dev \
wget
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Setup vcpkg with binary caching
uses: lukka/run-vcpkg@v11
env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
with:
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
vcpkgGitCommitId: '2cf2bcc60add50f79b2c418487d9cd1b6c7c1fec'
runVcpkgInstall: true
doNotCache: false
vcpkgJsonGlob: vcpkg.json
vcpkgJsonIgnores: ['**/vcpkg/**']
runVcpkgFormatString: ['install', '--recurse', '--clean-after-build', '--x-install-root', '$[env.VCPKG_INSTALLED_DIR]', '--triplet', 'x64-linux']
- name: Debug vcpkg environment
run: |
echo "=== VCPKG Environment Variables ==="
env | grep VCPKG || echo "No VCPKG environment variables found"
echo ""
echo "=== VCPKG Binary Cache Directory ==="
ls -la ~/.cache/vcpkg/archives/ 2>/dev/null || echo "Cache directory not found"
echo ""
echo "=== VCPKG Version ==="
${{ github.workspace }}/vcpkg/vcpkg version
- name: Configure CMake
run: cmake --preset=release
- name: Build
run: cmake --build --preset=release
- name: Run tests
run: ctest --preset=release --verbose
- name: Check library linking
working-directory: build/release
run: |
ldd profiler_example
ldd libprofiler_lib.so
# Code Coverage
coverage:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
cmake \
build-essential \
git \
pkg-config \
libgoogle-perftools-dev \
wget \
gcovr
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Setup vcpkg with binary caching
uses: lukka/run-vcpkg@v11
env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
with:
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
vcpkgGitCommitId: '2cf2bcc60add50f79b2c418487d9cd1b6c7c1fec'
runVcpkgInstall: true
doNotCache: false
vcpkgJsonGlob: vcpkg.json
vcpkgJsonIgnores: ['**/vcpkg/**']
runVcpkgFormatString: ['install', '--recurse', '--clean-after-build', '--x-install-root', '$[env.VCPKG_INSTALLED_DIR]', '--triplet', 'x64-linux']
- name: Configure CMake with Coverage
run: cmake --preset=coverage
- name: Build
run: cmake --build --preset=coverage
- name: Run tests
run: ctest --preset=coverage
- name: Generate coverage report
working-directory: build/coverage
run: |
gcovr --xml-pretty --exclude-unreachable-branches --print-summary \
--output coverage.xml \
--root ${{ github.workspace }} \
--filter ${{ github.workspace }}/src \
--filter ${{ github.workspace }}/include
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: build/coverage/coverage.xml
flags: unittests
name: cpp-remote-profiler-coverage
fail_ci_if_error: false
verbose: true
# Ubuntu with Clang
build-clang:
name: Ubuntu (Clang)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
cmake \
clang \
build-essential \
git \
pkg-config \
libgoogle-perftools-dev \
wget
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Setup vcpkg with binary caching
uses: lukka/run-vcpkg@v11
env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
with:
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
vcpkgGitCommitId: '2cf2bcc60add50f79b2c418487d9cd1b6c7c1fec'
runVcpkgInstall: true
doNotCache: false
vcpkgJsonGlob: vcpkg.json
vcpkgJsonIgnores: ['**/vcpkg/**']
runVcpkgFormatString: ['install', '--recurse', '--clean-after-build', '--x-install-root', '$[env.VCPKG_INSTALLED_DIR]', '--triplet', 'x64-linux']
- name: Debug vcpkg environment
run: |
echo "=== VCPKG Environment Variables ==="
env | grep VCPKG || echo "No VCPKG environment variables found"
echo ""
echo "=== VCPKG Binary Cache Directory ==="
ls -la ~/.cache/vcpkg/archives/ 2>/dev/null || echo "Cache directory not found"
echo ""
echo "=== VCPKG Version ==="
${{ github.workspace }}/vcpkg/vcpkg version
- name: Configure CMake with Clang
run: cmake --preset=clang-release
- name: Build
run: cmake --build --preset=clang-release
- name: Run tests
run: ctest --preset=clang-release --verbose
- name: Check library linking
working-directory: build/clang-release
run: |
ldd profiler_example
ldd libprofiler_lib.so