From bf1683d35e2cda3ac92c9002b0b0ce4574436415 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Bel=C3=A1n?= <95642979+CrusaderSVK287@users.noreply.github.com> Date: Thu, 18 Dec 2025 19:12:15 +0100 Subject: [PATCH 1/6] Added CMake pipeline --- .github/workflows/cmake-multi-platform.yml | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .github/workflows/cmake-multi-platform.yml diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml new file mode 100644 index 0000000..bbb74b8 --- /dev/null +++ b/.github/workflows/cmake-multi-platform.yml @@ -0,0 +1,66 @@ +# 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 \ + git \ + cmake \ + make \ + g++ \ + python3 \ + python3-dev \ + libssl-dev \ + libyaml-cpp-dev \ + pybind11-dev + + # ------------------------ + # 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 }} + ${{ 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' || '' }} From 52e1b1ec6a0b7316e06cc8de430f6c7a68113919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Bel=C3=A1n?= Date: Thu, 18 Dec 2025 19:13:59 +0100 Subject: [PATCH 2/6] Added vcpkg.json --- vcpkg.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 vcpkg.json diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 0000000..e5af1a9 --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "myapp", + "version": "0.1.0", + "dependencies": [ + "openssl", + "yaml-cpp", + "pybind11" + ] +} + From e741f768c64d0540a1873ea2a9a36ba358caca54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Bel=C3=A1n?= <95642979+CrusaderSVK287@users.noreply.github.com> Date: Thu, 18 Dec 2025 19:32:02 +0100 Subject: [PATCH 3/6] Update C++ compiler --- .github/workflows/cmake-multi-platform.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index bbb74b8..9efaa31 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -4,9 +4,9 @@ name: CMake on multiple platforms on: push: - branches: [ "main" ] + branches: ["main"] pull_request: - branches: [ "main" ] + branches: ["main"] jobs: build: @@ -27,17 +27,24 @@ jobs: - 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 \ - git \ + g++-13 \ + gcc-13 \ cmake \ make \ - g++ \ + 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) @@ -55,6 +62,8 @@ jobs: 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) || '' }} # ------------------------ From a58af9f056e7058ae75ccc66f3b26ac23f0898ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Bel=C3=A1n?= Date: Thu, 18 Dec 2025 19:43:19 +0100 Subject: [PATCH 4/6] changed line to not c++23 lol --- src/MonitorInit.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/MonitorInit.cpp b/src/MonitorInit.cpp index 593e505..ad85287 100644 --- a/src/MonitorInit.cpp +++ b/src/MonitorInit.cpp @@ -90,7 +90,11 @@ static void FilterLinesPopulateSet(std::unordered_set &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]"); From c8d3993b74b70a0d7b09a4c36259fea3abd1e483 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Bel=C3=A1n?= Date: Thu, 18 Dec 2025 19:55:33 +0100 Subject: [PATCH 5/6] added vcpkg commit --- vcpkg.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vcpkg.json b/vcpkg.json index e5af1a9..b4eeaf8 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -5,6 +5,7 @@ "openssl", "yaml-cpp", "pybind11" - ] + ], + "vcpkg-commit": "2c953609a0d500988150766b83ef8dbdfbbe9956" } From fc20ef2af30db549b1a6a9203bdd7d526ca73d46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Bel=C3=A1n?= Date: Thu, 18 Dec 2025 19:57:31 +0100 Subject: [PATCH 6/6] typo --- vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcpkg.json b/vcpkg.json index b4eeaf8..68fea12 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -6,6 +6,6 @@ "yaml-cpp", "pybind11" ], - "vcpkg-commit": "2c953609a0d500988150766b83ef8dbdfbbe9956" + "builtin-baseline": "2c953609a0d500988150766b83ef8dbdfbbe9956" }