This repository has been archived by the owner on Jan 26, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit : adding files - Debugging in progress
- Loading branch information
Pierre-Alexandre GROSSET
committed
Nov 20, 2023
0 parents
commit 66757a7
Showing
113 changed files
with
10,450 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Build Checker | ||
|
||
env: | ||
BINARY0: ./lib/my/libmy.a | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: '0 * * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
check_build: | ||
runs-on: ubuntu-latest | ||
container: epitechcontent/epitest-docker | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3.4.0 | ||
|
||
- name: Run Build | ||
run: make re | ||
timeout-minutes: 2 | ||
|
||
- name: Check BINARY0 Binary | ||
run: | | ||
if [ ! -f $BINARY0 ]; then | ||
echo "$BINARY0 not found. Exiting with error." | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Coding Style Checker | ||
|
||
env: | ||
CODING_STYLE_LOG_FILE: coding-style-reports.log | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: '0 0 * * MON' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
check_coding_style: | ||
runs-on: ubuntu-latest | ||
container: ghcr.io/epitech/coding-style-checker:latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3.4.0 | ||
|
||
- name: Check the coding style | ||
run: check.sh $(pwd) $(pwd) | ||
timeout-minutes: 2 | ||
|
||
- name: Check the coding style report | ||
run: | | ||
if [ -s $CODING_STYLE_LOG_FILE ]; then | ||
echo "::group::Annotation" | ||
input=$CODING_STYLE_LOG_FILE | ||
while IFS= read -r line | ||
do | ||
echo "::error:: $line" | ||
done < "$input" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Tests Checker | ||
|
||
env: | ||
UNIT_TEST_BINARY: unit_test | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: '0 * * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
check_tests: | ||
runs-on: ubuntu-latest | ||
container: epitechcontent/epitest-docker | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3.4.0 | ||
|
||
- name: Run Tests | ||
run: make tests_run | ||
timeout-minutes: 2 | ||
|
||
- name: Check Tests Binary | ||
run: | | ||
if [ ! -f $UNIT_TEST_BINARY ]; then | ||
echo "Unit Test Binary not found. Exiting with error." | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Update Docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: '0 * * * *' | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
update_docs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3.4.0 | ||
|
||
- name: Set up Doxygen | ||
run: sudo apt-get install doxygen | ||
|
||
- name: Generate Doxygen Documentation | ||
run: | | ||
doxygen docs/Doxyfile | ||
- name: Set up Git Credentials | ||
run: | | ||
git config --global user.name 'GitHub Actions' | ||
git config --global user.email 'actions@github.com' | ||
- name: Commit & Push Documentation | ||
run: | | ||
git diff > diff.txt | ||
if [ -s diff.txt ]; then | ||
COMMITTER_NAME=$(git log -1 --pretty=format:'%an') | ||
COMMITTER_EMAIL=$(git log -1 --pretty=format:'%ae') | ||
COMMITTER_MESSAGE=$(git log -1 --pretty=format:'%s') | ||
git add docs/ | ||
git commit -m "[Docs Update] - $COMMITTER_MESSAGE" | ||
git commit --amend --author="$COMMITTER_NAME <$COMMITTER_EMAIL>" -m "[Docs Update] - $COMMITTER_MESSAGE" | ||
git push --force origin main | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
## | ||
## EPITECH PROJECT, 2023 | ||
## B-CPE-200-RUN-2-1-corewar-pierre-alexandre.grosset | ||
## File description: | ||
## Global Makefile (responsible of the compilation of the whole project) | ||
## | ||
|
||
LIB = lib/my | ||
|
||
TESTS = tests/ | ||
|
||
CFLAGS = -W -Wall -Wextra -Werror | ||
|
||
TFLAGS = --coverage -lcriterion | ||
|
||
INCLUDE_TESTS = -I./lib/my/includes \ | ||
-I./tests/includes | ||
|
||
TESTS_LIB_SRC_FILES = $(shell find $(LIB) -name '*.c') | ||
|
||
TESTS_SRC_FILES = $(shell find $(TESTS) -name '*.c') | ||
|
||
TESTS_SRC_GLOBALS = $(TESTS_LIB_SRC_FILES) \ | ||
$(TESTS_SRC_FILES) | ||
|
||
all: | ||
make -C $(LIB) | ||
|
||
tests_run: | ||
$(CC) -o unit_test $(TESTS_SRC_GLOBALS) $(INCLUDE_TESTS) $(TFLAGS) $(CFLAGS) | ||
./unit_test && gcovr -e tests/ && gcovr -e tests/ -b | ||
|
||
tests_clean: | ||
rm -f unit_test *.gcda *.gcno | ||
|
||
tests_re : tests_clean tests_run | ||
|
||
clean: | ||
make -C $(LIB) clean | ||
|
||
fclean: clean tests_clean | ||
make -C $(LIB) fclean | ||
@rm -rf *.cor | ||
|
||
re: fclean all |
Oops, something went wrong.