Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml
name: CMake on multiple platforms

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
build_type: [Release]

steps:
- uses: actions/checkout@v4

# ------------------------
# Linux dependencies
# ------------------------
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update
sudo apt-get install -y \
g++-13 \
gcc-13 \
cmake \
make \
git \
python3 \
python3-dev \
libssl-dev \
libyaml-cpp-dev \
pybind11-dev
# Set GCC 13 / G++ 13 as default
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 100
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100

# ------------------------
# Windows dependencies (vcpkg)
# ------------------------
- name: Setup vcpkg (Windows)
if: runner.os == 'Windows'
uses: lukka/run-vcpkg@v11
with:
vcpkgJsonGlob: '**/vcpkg.json'

# ------------------------
# Configure CMake
# ------------------------
- name: Configure CMake
run: >
cmake -S . -B build
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DCMAKE_CXX_STANDARD=23
-DCMAKE_CXX_STANDARD_REQUIRED=ON
${{ runner.os == 'Windows' && format('-DCMAKE_TOOLCHAIN_FILE={0}/scripts/buildsystems/vcpkg.cmake', env.VCPKG_ROOT) || '' }}

# ------------------------
# Build
# ------------------------
- name: Build
run: >
cmake --build build
${{ runner.os == 'Windows' && '--config Release' || '' }}
6 changes: 5 additions & 1 deletion src/MonitorInit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ static void FilterLinesPopulateSet(std::unordered_set<uint64_t> &set, const std:
std::istringstream iss(token);
if (iss >> lower >> dash >> upper && dash == '-' && lower < upper) {
// range string is valid
set.insert_range(std::views::iota(lower, upper + 1));
// Replaced this line with the line below because libc++ that CI uses doesnt
// have it yet. It will most likely be forgotten lol
//set.insert_range(std::views::iota(lower, upper + 1));
set.insert( std::views::iota(lower, upper + 1).begin(),
std::views::iota(lower, upper + 1).end());
} else {
// in case user is incapable of understanding child-like syntax
throw std::invalid_argument("Invalid format for filter range [" + token + "]. Use correct format [lower-upper]");
Expand Down
11 changes: 11 additions & 0 deletions vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "myapp",
"version": "0.1.0",
"dependencies": [
"openssl",
"yaml-cpp",
"pybind11"
],
"builtin-baseline": "2c953609a0d500988150766b83ef8dbdfbbe9956"
}