From d91c1f220af45111ef7fa6a920df9d8a154dcedc Mon Sep 17 00:00:00 2001 From: Tomas Sanchez Date: Wed, 13 Apr 2022 00:15:50 -0300 Subject: [PATCH 1/6] ci: add simple makefile workflow --- .github/workflows/makefile.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/makefile.yml diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml new file mode 100644 index 0000000..a504e2f --- /dev/null +++ b/.github/workflows/makefile.yml @@ -0,0 +1,24 @@ +name: Makefile CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Install dependencies + run: sudo make install + + - name: Build application + run: make compile + + - name: Verify + run: make test From 923ef517d0a2549a8794dd3c5fee7925f9c2b192 Mon Sep 17 00:00:00 2001 From: Tomas Sanchez Date: Wed, 13 Apr 2022 00:17:04 -0300 Subject: [PATCH 2/6] build: add global makefile --- Makefile | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4a1af23 --- /dev/null +++ b/Makefile @@ -0,0 +1,103 @@ +# C Makefile using gcc, gdb and valgrind. +# Modified version of Makefile using g++ & gdb by Roberto Nicolas Savinelli +# Tomas Agustin Sanchez + +# ! Avoid modifying this section - (Unless you know what you are doing) -------------------------------------------------------------- + +# Build directory - executables files will be stored in this directory +BUILD_DIR=build +# Log directory - log files will be stored in this directory +LOG_DIR=log +# Shared Library directory - shared source files are located in this directory +LIB_DIR=lib +# Shared object directory - shared compiled file objects will be stored in this directory +OBJ_DIR=shared +# Commons name - Operating System Course Library name. +COMMONS=so-commons-library +# Compile script - Custom make directive +MAKE_COMPILE = $(MAKE) compile --no-print-directory +# Test script - Custom make test directive +MAKE_TEST = $(MAKE) test --no-print-directory +# Test Scrpt for each application - Loop for all modules applying test directive. +# ? [modules].forEach( module => makeTest(module)) +TEST_ALL=$(foreach dir, $(DIRS), cd $(dir) && $(MAKE_TEST) && cd .. &&) + +# * Add your modules directories in this section ------------------------------------------------------------------------------------- + +# Modules directories - with their own makefile + +# TODO: Add additional module directories below here +# ? eg. MEMORY_DIR=memory + +# * DO NOT FORGET TO ADD YOUR DIRECTORIES HERE --------------------------------------------------------------------------------------- + +# Directories list +# ! Allways add your listed above directories here +# ? eg. DIRS =$(SERVER_DIR) $(CLIENT_DIR) $(MEMORY_DIR) +# TODO: Add the listed directories +DIRS = + +# * DO NOT FORGET TO ADD YOUR RULES IN ALL -------------------------------------------------------------------------------------------- + +# All rules +# ! Allways add your rule for modules in here +# ? eg. all: server client memory filesystem etc +# TODO: add your rules +all: + @echo Nothing to be done YET. + +# This targets are not files +# ! Allways add your rules for modules in here too +# ? eg. .PHONY: server client memory filesystem etc [...] clean install test +# TODO: add your rules here +.PHONY: clean install test lib + + +# ! AVOID MODIFYING THIS SECTION ------------------------------------------------------------------------------------------------------ + +# This rule will be executed to build the different modules +compile: all + +# This rule +test: + $(TEST_ALL) true + +# This rule will be executed remove the generated executables and objects files +clean: + rm -fr $(BUILD_DIR) + rm -fr $(OBJ_DIR) + +# ? WATCH OUT MODIFYING THIS INSTALL SECTION -------------------------------------------------------------------------------------------------- + +# ! Requieres root user +# Customize the needed dependencies here. +install: + @echo Installing dependencies... +# TODO: Install required libraries here. + @echo "\nInstalling readline" + apt-get install libreadline-dev + @echo "\nReadline installed!\n" + @echo "\nInstalling commons libraries...\n" + @echo $(PWD) + rm -rf $(COMMONS) + git clone "https://github.com/sisoputnfrba/$(COMMONS).git" $(COMMONS) + cd $(COMMONS) && sudo make uninstall --no-print-directory && sudo make install --no-print-directory && cd .. + rm -rf $(COMMONS) + @echo "\nCommons installed\n" +# $(MAKE) lib --no-print-directory + @mkdir -p $(LOG_DIR) + @echo Completed + +# ! Requieres root user +#Compile the shared library +lib: + @echo "Building shared libraries...\n" + rm -fr $(OBJ_DIR) + cd $(LIB_DIR) && $(MAKE) test --no-print-directory && cd .. + @echo "Shared libraries built!\n" + +# TODO: Add modules rules below ------------------------------------------------------------------------------------------------------------------- + + +# ? memory: +# ? cd $(MEMORY_DIR) && $(MAKE_COMPILE) From 3670c1cc87ddf37f44d145c716e35b69b274b11e Mon Sep 17 00:00:00 2001 From: Tomas Sanchez Date: Wed, 13 Apr 2022 00:17:29 -0300 Subject: [PATCH 3/6] build: standard-version --- .versionrc.json | 14 ++++++++++++++ package.json | 21 +++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .versionrc.json create mode 100644 package.json diff --git a/.versionrc.json b/.versionrc.json new file mode 100644 index 0000000..206f4d2 --- /dev/null +++ b/.versionrc.json @@ -0,0 +1,14 @@ +{ + "types": [ + { "type": "feat", "section": "Features" }, + { "type": "fix", "section": "Bug Fixes" }, + { "type": "chore", "hidden": true }, + { "type": "docs", "hidden": true }, + { "type": "style", "hidden": true }, + { "type": "refactor", "hidden": true }, + { "type": "perf", "hidden": true }, + { "type": "test", "hidden": true } + ], + "commitUrlFormat": "https://github.com/mokkapps/changelog-generator-demo/commits/{{hash}}", + "compareUrlFormat": "https://github.com/mokkapps/changelog-generator-demo/compare/{{previousTag}}...{{currentTag}}" +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..4ca75d1 --- /dev/null +++ b/package.json @@ -0,0 +1,21 @@ +{ + "name": "kiss", + "version": "0.0.1", + "description": "Kernel de Implementacion Super Simple", + "main": "Makefile", + "repository": "https://github.com/sisoputnfrba/tp-2022-1c-code-for-goOS.git", + "author": "Tomas ", + "license": "MIT", + "scripts": { + "start": "make", + "clean": "make remove", + "release": "standard-version", + "release:first-release": "standard-version --first-release", + "release:patch": "standard-version --release-as patch", + "release:minor": "standard-version --release-as minor", + "release:major": "standard-version --release-as major" + }, + "dependencies": { + "standard-version": "^9.2.0" + } +} From 8b004b21eb532c2d626241b59a6e0580b6e8afcb Mon Sep 17 00:00:00 2001 From: Tomas Sanchez Date: Wed, 13 Apr 2022 00:15:50 -0300 Subject: [PATCH 4/6] ci: add simple makefile workflow --- .github/workflows/makefile.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/makefile.yml diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml new file mode 100644 index 0000000..a504e2f --- /dev/null +++ b/.github/workflows/makefile.yml @@ -0,0 +1,24 @@ +name: Makefile CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Install dependencies + run: sudo make install + + - name: Build application + run: make compile + + - name: Verify + run: make test From 351f2f2b60c271c3ceb365983e9df097cd39203e Mon Sep 17 00:00:00 2001 From: Tomas Sanchez Date: Wed, 13 Apr 2022 00:17:04 -0300 Subject: [PATCH 5/6] build: add global makefile --- Makefile | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4a1af23 --- /dev/null +++ b/Makefile @@ -0,0 +1,103 @@ +# C Makefile using gcc, gdb and valgrind. +# Modified version of Makefile using g++ & gdb by Roberto Nicolas Savinelli +# Tomas Agustin Sanchez + +# ! Avoid modifying this section - (Unless you know what you are doing) -------------------------------------------------------------- + +# Build directory - executables files will be stored in this directory +BUILD_DIR=build +# Log directory - log files will be stored in this directory +LOG_DIR=log +# Shared Library directory - shared source files are located in this directory +LIB_DIR=lib +# Shared object directory - shared compiled file objects will be stored in this directory +OBJ_DIR=shared +# Commons name - Operating System Course Library name. +COMMONS=so-commons-library +# Compile script - Custom make directive +MAKE_COMPILE = $(MAKE) compile --no-print-directory +# Test script - Custom make test directive +MAKE_TEST = $(MAKE) test --no-print-directory +# Test Scrpt for each application - Loop for all modules applying test directive. +# ? [modules].forEach( module => makeTest(module)) +TEST_ALL=$(foreach dir, $(DIRS), cd $(dir) && $(MAKE_TEST) && cd .. &&) + +# * Add your modules directories in this section ------------------------------------------------------------------------------------- + +# Modules directories - with their own makefile + +# TODO: Add additional module directories below here +# ? eg. MEMORY_DIR=memory + +# * DO NOT FORGET TO ADD YOUR DIRECTORIES HERE --------------------------------------------------------------------------------------- + +# Directories list +# ! Allways add your listed above directories here +# ? eg. DIRS =$(SERVER_DIR) $(CLIENT_DIR) $(MEMORY_DIR) +# TODO: Add the listed directories +DIRS = + +# * DO NOT FORGET TO ADD YOUR RULES IN ALL -------------------------------------------------------------------------------------------- + +# All rules +# ! Allways add your rule for modules in here +# ? eg. all: server client memory filesystem etc +# TODO: add your rules +all: + @echo Nothing to be done YET. + +# This targets are not files +# ! Allways add your rules for modules in here too +# ? eg. .PHONY: server client memory filesystem etc [...] clean install test +# TODO: add your rules here +.PHONY: clean install test lib + + +# ! AVOID MODIFYING THIS SECTION ------------------------------------------------------------------------------------------------------ + +# This rule will be executed to build the different modules +compile: all + +# This rule +test: + $(TEST_ALL) true + +# This rule will be executed remove the generated executables and objects files +clean: + rm -fr $(BUILD_DIR) + rm -fr $(OBJ_DIR) + +# ? WATCH OUT MODIFYING THIS INSTALL SECTION -------------------------------------------------------------------------------------------------- + +# ! Requieres root user +# Customize the needed dependencies here. +install: + @echo Installing dependencies... +# TODO: Install required libraries here. + @echo "\nInstalling readline" + apt-get install libreadline-dev + @echo "\nReadline installed!\n" + @echo "\nInstalling commons libraries...\n" + @echo $(PWD) + rm -rf $(COMMONS) + git clone "https://github.com/sisoputnfrba/$(COMMONS).git" $(COMMONS) + cd $(COMMONS) && sudo make uninstall --no-print-directory && sudo make install --no-print-directory && cd .. + rm -rf $(COMMONS) + @echo "\nCommons installed\n" +# $(MAKE) lib --no-print-directory + @mkdir -p $(LOG_DIR) + @echo Completed + +# ! Requieres root user +#Compile the shared library +lib: + @echo "Building shared libraries...\n" + rm -fr $(OBJ_DIR) + cd $(LIB_DIR) && $(MAKE) test --no-print-directory && cd .. + @echo "Shared libraries built!\n" + +# TODO: Add modules rules below ------------------------------------------------------------------------------------------------------------------- + + +# ? memory: +# ? cd $(MEMORY_DIR) && $(MAKE_COMPILE) From 9537905eb52061c970c76b80b90a6fa8e7850cc7 Mon Sep 17 00:00:00 2001 From: Tomas Sanchez Date: Wed, 13 Apr 2022 00:17:29 -0300 Subject: [PATCH 6/6] build: standard-version --- .versionrc.json | 14 ++++++++++++++ package.json | 21 +++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .versionrc.json create mode 100644 package.json diff --git a/.versionrc.json b/.versionrc.json new file mode 100644 index 0000000..206f4d2 --- /dev/null +++ b/.versionrc.json @@ -0,0 +1,14 @@ +{ + "types": [ + { "type": "feat", "section": "Features" }, + { "type": "fix", "section": "Bug Fixes" }, + { "type": "chore", "hidden": true }, + { "type": "docs", "hidden": true }, + { "type": "style", "hidden": true }, + { "type": "refactor", "hidden": true }, + { "type": "perf", "hidden": true }, + { "type": "test", "hidden": true } + ], + "commitUrlFormat": "https://github.com/mokkapps/changelog-generator-demo/commits/{{hash}}", + "compareUrlFormat": "https://github.com/mokkapps/changelog-generator-demo/compare/{{previousTag}}...{{currentTag}}" +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..4ca75d1 --- /dev/null +++ b/package.json @@ -0,0 +1,21 @@ +{ + "name": "kiss", + "version": "0.0.1", + "description": "Kernel de Implementacion Super Simple", + "main": "Makefile", + "repository": "https://github.com/sisoputnfrba/tp-2022-1c-code-for-goOS.git", + "author": "Tomas ", + "license": "MIT", + "scripts": { + "start": "make", + "clean": "make remove", + "release": "standard-version", + "release:first-release": "standard-version --first-release", + "release:patch": "standard-version --release-as patch", + "release:minor": "standard-version --release-as minor", + "release:major": "standard-version --release-as major" + }, + "dependencies": { + "standard-version": "^9.2.0" + } +}