From fc5bab30ba4d77a5c040f2c461aa8b2dd5361482 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 24 Nov 2025 02:42:00 +0100 Subject: feat: system and CI improvements. Signed-off-by: Amlal El Mahrouss --- tools/StepsTool.cc | 36 ++++++++++++++++++++++++++++++++++++ tools/steps.cc | 35 ----------------------------------- tools/steps.toml | 2 +- 3 files changed, 37 insertions(+), 36 deletions(-) create mode 100644 tools/StepsTool.cc delete mode 100644 tools/steps.cc (limited to 'tools') diff --git a/tools/StepsTool.cc b/tools/StepsTool.cc new file mode 100644 index 0000000..ccad634 --- /dev/null +++ b/tools/StepsTool.cc @@ -0,0 +1,36 @@ +/* =========================================================== + + Copyright (C) 2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + +=========================================================== */ + +#include +#include + +/// =========================================================== /// +/// Use operators from steps namespace to compare steps records. +/// =========================================================== /// +using namespace ocl::steps::operators; + +const auto kStepsFileRoot = "/system/install.stp"; + +/// =========================================================== /// +/// @brief Main function for running steps on NeKernel. +/// =========================================================== /// +int main(void) { + ocl::io::print("steps: running steps for program...\n"); + + std::ifstream file(kStepsFileRoot); + ocl::steps::record steps; + + file >> steps; + + if (!ocl::steps::is_valid(steps)) + return EXIT_FAILURE; + + /// AMLALE: Read steps from file and process them. + + ocl::io::print("steps: done.\n"); + + return EXIT_SUCCESS; +} \ No newline at end of file diff --git a/tools/steps.cc b/tools/steps.cc deleted file mode 100644 index 6b9a8f7..0000000 --- a/tools/steps.cc +++ /dev/null @@ -1,35 +0,0 @@ -/* =========================================================== - -Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license. - -=========================================================== */ - -#include -#include - -/// =========================================================== /// -/// Use operators from steps namespace to compare steps records. -/// =========================================================== /// -using namespace ocl::steps::operators; - -const auto kStepsFileRoot = "/system/install.stp"; - -/// =========================================================== /// -/// @brief Main function for running steps on NeKernel. -/// =========================================================== /// -int main(void) { - ocl::io::print("steps: running steps for program...\n"); - - std::ifstream file(kStepsFileRoot); - ocl::steps::record steps; - - file >> steps; - - if (!ocl::steps::is_valid(steps)) return EXIT_FAILURE; - - /// AMLALE: Read steps from file and process them. - - ocl::io::print("steps: done.\n"); - - return EXIT_SUCCESS; -} \ No newline at end of file diff --git a/tools/steps.toml b/tools/steps.toml index f9e3734..4d0de7c 100644 --- a/tools/steps.toml +++ b/tools/steps.toml @@ -1,7 +1,7 @@ compiler_path = "clang++" compiler_std = "c++20" headers_path = [ "../lib", "../lib/libocl/dev/", "/opt/homebrew/Cellar/boost/1.89.0/include" ] -sources_path = [ "steps.cc" ] +sources_path = [ "StepsTool.cc" ] output_name = "steps.o" compiler_flags = [ "-fPIC" ] cpp_macros = [ "__NE_STEPS__" ] -- cgit v1.2.3