Skip to content

Commit

Permalink
Merge pull request #6 from G-Epitech/update-makefile-submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
TekMath authored Mar 21, 2024
2 parents 358ea2a + 5faf417 commit b3cb046
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "common"]
path = common
url = git@github.com:G-Epitech/MAYBDF-ArcadeShared.git
url = https://github.com/G-Epitech/MAYBDF-ArcadeShared.git
25 changes: 20 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
pipeline {
agent {
docker {
image 'epitechcontent/epitest-docker'
}
}
agent any

stages {
stage('Project setup') {
steps {
sh 'git rm --cached common'
sh 'make update'
}
}

stage('Project compilation') {
agent {
docker {
image 'epitechcontent/epitest-docker'
}
}

steps {
sh 'make clean'
sh 'make'
Expand All @@ -15,6 +24,12 @@ pipeline {
}

stage('Project tests') {
agent {
docker {
image 'epitechcontent/epitest-docker'
}
}

steps {
sh 'make tests_run'
}
Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
NAME = arcade
BUILD_PATH = build

all:
all: update
@cmake -S . -B build
cmake --build $(BUILD_PATH)
@cp $(BUILD_PATH)/src/$(NAME) .
Expand All @@ -24,5 +24,9 @@ re: fclean all
tests_run:
echo "pass"

.PHONY: all clean fclean re tests_run
update:
@git submodule init
@git submodule update

.PHONY: all clean fclean re tests_run update
DEFAULT_GOAL := all

0 comments on commit b3cb046

Please sign in to comment.