Merge pull request #45 from AnonymusRaccoon/workflow

Workflow
This commit is contained in:
Arthi-chaud
2021-05-21 13:56:07 +02:00
committed by GitHub
9 changed files with 2697 additions and 6 deletions
+34
View File
@@ -0,0 +1,34 @@
name: Build
on: [push, pull_request]
jobs:
Build:
name: "Build on ${{ matrix.name }}"
runs-on: ${{ matrix.os }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
matrix:
include:
- os: ubuntu-latest
name: Linux
# - os: macOS-latest
# name: MacOS
- os: windows-latest
name: Windows
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Install Xorg lib
if: matrix.name == 'Linux'
run: |
sudo apt install -y libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev
- name: Build
run: |
mkdir build && cd build
cmake ..
cmake --build .
- name: CheckBinaryName
shell: bash
if: matrix.name == 'Linux'
run: test -f build/bomberman
+31
View File
@@ -0,0 +1,31 @@
name: Update the documentation
on:
push:
branches:
- master
- workflow
jobs:
Building:
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v1
- name: Install Doxygen
run: sudo apt-get install -y doxygen graphviz
- name: Update the docs
run: |
rm -rf docs/*
doxygen Doxyfile
cd docs
git config --global user.email "${GITHUB_ACTOR}@github.com";
git config --global user.name "${GITHUB_ACTOR}";
git init
git add -A;
git commit -m "Deploying the documentation";
git remote add origin https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@${GITHUB_REPO};
git checkout -b Documentation
git push --force origin Documentation;
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPO: "github.com/AnonymusRaccoon/Bomberman"
+24
View File
@@ -0,0 +1,24 @@
name: Update Mirror
on:
push:
branches:
- main
- master
- workflow
jobs:
Push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
submodules: true
ref: master
- name: Push to Epitech repository
uses: pixta-dev/repository-mirroring-action@v1
with:
target_repo_url:
git@github.com:EpitechIT2020/B-YEP-400-NAN-4-1-indiestudio-clement.le-bihan.git
ssh_private_key:
${{ secrets.SSH_KEY }}
+23
View File
@@ -0,0 +1,23 @@
name: Tests
on: [push, pull_request]
jobs:
Build:
name: "Run tests"
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Install Xorg lib
run: |
sudo apt install -y libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev
- name: Build
run: |
mkdir build && cd build
cmake ..
cmake --build . -t wal_tests
- name: Run tests
run: |
./build/lib/wal/wal_tests
+7 -4
View File
@@ -1,14 +1,17 @@
cmake_minimum_required(VERSION 3.11)
project(Bomberman)
project(bomberman)
set(CMAKE_CXX_STANDARD 20)
add_subdirectory(${PROJECT_SOURCE_DIR}/lib/wal)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/lib/raylib)
add_executable(bomberman
sources/main.cpp
)
find_package(raylib REQUIRED)
target_link_libraries(bomberman wal raylib)
find_package(raylib QUIET)
if (NOT raylib_FOUND)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/lib/raylib)
find_package(raylib REQUIRED)
endif()
target_link_libraries(bomberman wal raylib)
+2549
View File
File diff suppressed because it is too large Load Diff
+13
View File
@@ -0,0 +1,13 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.11)
if (NOT Catch2_FOUND)
Include(FetchContent)
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v2.13.1)
FetchContent_MakeAvailable(Catch2)
endif()
+8 -2
View File
@@ -38,5 +38,11 @@ add_executable(wal_tests EXCLUDE_FROM_ALL
)
target_link_libraries(wal_tests PRIVATE wal)
find_package(Catch2 REQUIRED)
target_link_libraries(wal_tests PRIVATE Catch2::Catch2)
find_package(Catch2 QUIET)
if (NOT Catch2_FOUND)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../catch2)
find_package(Catch2 REQUIRED)
endif()
target_link_libraries(wal_tests PRIVATE Catch2::Catch2)
+8
View File
@@ -1,3 +1,11 @@
/*
** EPITECH PROJECT, 2021
** Bomberman
** File description:
** main
*/
#include <iostream>
#include <Wal.hpp>