From 70db5cac93be72aeba1c4409b5111ecda778b0be Mon Sep 17 00:00:00 2001 From: Matheo Coquet Date: Mon, 11 Mar 2024 13:57:42 +0100 Subject: [PATCH 1/6] ci: add jenkinsfile --- Jenkinsfile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..47e4a21 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,23 @@ +pipeline { + agent { + docker { + image 'epitechcontent/epitest-docker' + } + } + + stages { + stage('Project compilation') { + steps { + sh 'make clean' + sh 'make' + sh 'make fclean' + } + } + + stage('Project tests') { + steps { + sh 'make tests_run' + } + } + } +} From 9a6f169b0bb0757ac4bd6a8c74a42669174f9f5c Mon Sep 17 00:00:00 2001 From: Matheo Coquet Date: Mon, 11 Mar 2024 13:58:04 +0100 Subject: [PATCH 2/6] config: add issues/pr/deployment config --- .github/ISSUE_TEMPLATE/bug-report.yml | 44 ++++++++++++++++++++++++++ .github/ISSUE_TEMPLATE/new-feature.yml | 37 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/tests.yml | 32 +++++++++++++++++++ .github/pull_request_template.md | 24 ++++++++++++++ .github/workflows/deployment.yaml | 23 ++++++++++++++ 5 files changed, 160 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug-report.yml create mode 100644 .github/ISSUE_TEMPLATE/new-feature.yml create mode 100644 .github/ISSUE_TEMPLATE/tests.yml create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/deployment.yaml diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 0000000..e1caf1f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,44 @@ +name: Bug Report +description: Report a bug +labels: ["bug"] + +body: + + - type: markdown + attributes: + value: | + Please fill out the sections below to help everyone identify and fix the bug + + - type: textarea + id: description + attributes: + label: Describe your issue + placeholder: When I use a file this happens... + validations: + required: true + + - type: textarea + id: steps + attributes: + label: Steps to reproduce + placeholder: | + 1. Send this file + 2. Set the covergance... + validations: + required: true + + - type: textarea + id: expected + attributes: + label: What was the expected result? + placeholder: I expected it not to crash + + - type: textarea + id: screenshots + attributes: + label: Put here any screenshots or videos (optional) + + - type: markdown + attributes: + value: | + Thanks for reporting this issue! diff --git a/.github/ISSUE_TEMPLATE/new-feature.yml b/.github/ISSUE_TEMPLATE/new-feature.yml new file mode 100644 index 0000000..df803cd --- /dev/null +++ b/.github/ISSUE_TEMPLATE/new-feature.yml @@ -0,0 +1,37 @@ +name: New feature +description: Suggest or request a new feature +labels: ["enhancement"] + +body: + + - type: markdown + attributes: + value: | + Please fill out the sections below to properly describe the new feature you are suggesting. + + - type: textarea + id: description + attributes: + label: Describe the feature + placeholder: Describe the feature that you want to add to this project + validations: + required: true + + - type: textarea + id: example + attributes: + label: Example Feature Purpose + placeholder: | + Please add a concrete example related to the project to prove the relevance of your feature. + + - type: textarea + id: context + attributes: + label: Additional context + placeholder: | + Add any other context or screenshots about the feature request here. + + - type: markdown + attributes: + value: | + Thanks for your suggestion! Let's see together if it can be implemented. diff --git a/.github/ISSUE_TEMPLATE/tests.yml b/.github/ISSUE_TEMPLATE/tests.yml new file mode 100644 index 0000000..a0b5365 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/tests.yml @@ -0,0 +1,32 @@ +name: Tests +description: Add, update or delete tests +labels: ["tests"] + +body: + + - type: textarea + id: description + attributes: + label: Describe why you need this Issue + placeholder: I need it because my project reacts strangely to instructions and I need to run some tests to find out the cause of my problem.... + validations: + required: true + + - type: dropdown + id: type + attributes: + label: What kind of tests will you be doing? + options: + - "Unit Tests" + - "Functional Tests" + - "Unit Tests and Functional Tests" + + - type: textarea + id: context + attributes: + label: Put here any additionnal content like screenshots or videos (optional) + + - type: markdown + attributes: + value: | + Thanks for reporting this issue! diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..d5e5e60 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,24 @@ +## Related Tickets & Documents + +- Related Issue # +- Closes (optional) # + +## What type of PR is this? (check all applicable) + +- [ ] Refactor +- [ ] Feature +- [ ] Bug Fix +- [ ] Optimization +- [ ] Documentation Update + +## Changes made + +_Please replace this line with a description of the changes in this PR. Include +a summary of the change and relevant motivation and context._ + +## Added/updated tests? + +- [ ] Yes +- [ ] No, and this is why: _please replace this line with details on why tests + have not been included_ +- [ ] I need help with writing tests diff --git a/.github/workflows/deployment.yaml b/.github/workflows/deployment.yaml new file mode 100644 index 0000000..5b45187 --- /dev/null +++ b/.github/workflows/deployment.yaml @@ -0,0 +1,23 @@ +name: "CD: Deployement" + +on: + push: + branches: [main] + workflow_dispatch: + +jobs: + repository_mirroring: + name: "🚀 Repository mirroring" + runs-on: ubuntu-latest + + steps: + - name: "📥 Checkout repository" + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: "🚀 Epitech mirroring" + uses: pixta-dev/repository-mirroring-action@v1 + with: + target_repo_url: ${{ secrets.DEPLOYMENT_URL }} + ssh_private_key: ${{ secrets.DEPLOYEMENT_SSH_KEY }} From 4b7b4d7cd47e4dac91560b4b466348c13e9e98b5 Mon Sep 17 00:00:00 2001 From: Matheo Coquet Date: Mon, 11 Mar 2024 13:58:20 +0100 Subject: [PATCH 3/6] docs: add docs folder --- docs/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 docs/.gitkeep diff --git a/docs/.gitkeep b/docs/.gitkeep new file mode 100644 index 0000000..e69de29 From 2d062d4aafb8d5b628b0b36d7b9b53d98fd2e7f5 Mon Sep 17 00:00:00 2001 From: Matheo Coquet Date: Mon, 11 Mar 2024 14:59:00 +0100 Subject: [PATCH 4/6] build: add cmake and makefile configs --- .gitignore | 15 +++++++++++++++ CMakeLists.txt | 7 +++++++ Makefile | 29 +++++++++++++++++++++++++++++ src/CMakeLists.txt | 3 +++ src/main.cpp | 11 +++++++++++ 5 files changed, 65 insertions(+) create mode 100644 .gitignore create mode 100644 CMakeLists.txt create mode 100644 Makefile create mode 100644 src/CMakeLists.txt create mode 100644 src/main.cpp diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8c5ced8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +## CMake +build + +## MacOS +.DS_Store + +## IDEs +.vscode +.idea + +## Binary +arcade +*.gcno +*.gcda +*.o diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..746e3ca --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.28) +project(arcade) + +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20") + +add_subdirectory(src) diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1827eda --- /dev/null +++ b/Makefile @@ -0,0 +1,29 @@ +## +## EPITECH PROJECT, 2024 +## arcade +## File description: +## Makefile +## + +NAME = arcade +BUILD_PATH = build + +all: + @cmake -S . -B build + cmake --build $(BUILD_PATH) + @cp $(BUILD_PATH)/src/$(NAME) . + +clean: + @make -C $(BUILD_PATH) clean + +fclean: + @rm -f $(NAME) + @rm -rf $(BUILD_PATH) + +re: fclean all + +tests_run: + echo "pass" + +.PHONY: all clean fclean re tests_run +DEFAULT_GOAL := all diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..47a7d54 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,3 @@ +add_executable(arcade + main.cpp +) diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..904ff7a --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,11 @@ +/* +** EPITECH PROJECT, 2024 +** arcade +** File description: +** main +*/ + +int main(void) +{ + return 0; +} From e4b2d304dbca7dc4bcf9b037ca664f6f78e9677c Mon Sep 17 00:00:00 2001 From: Matheo Coquet Date: Mon, 11 Mar 2024 15:04:32 +0100 Subject: [PATCH 5/6] fix(build): update clean makefile rule --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1827eda..7f61fd8 100644 --- a/Makefile +++ b/Makefile @@ -14,11 +14,10 @@ all: @cp $(BUILD_PATH)/src/$(NAME) . clean: - @make -C $(BUILD_PATH) clean + @rm -rf $(BUILD_PATH) fclean: @rm -f $(NAME) - @rm -rf $(BUILD_PATH) re: fclean all From a945fd78483c4027b3e2673ca5afa2c1d088b239 Mon Sep 17 00:00:00 2001 From: Matheo Coquet Date: Mon, 11 Mar 2024 15:06:15 +0100 Subject: [PATCH 6/6] fix(build): update cmake version to 3.27 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 746e3ca..3016170 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.28) +cmake_minimum_required(VERSION 3.27) project(arcade) set(CMAKE_CXX_STANDARD 20)