mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-05-28 16:43:29 +00:00
@@ -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
|
||||
@@ -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"
|
||||
@@ -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 }}
|
||||
@@ -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
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
@@ -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)
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
/*
|
||||
** EPITECH PROJECT, 2021
|
||||
** Bomberman
|
||||
** File description:
|
||||
** main
|
||||
*/
|
||||
|
||||
|
||||
#include <iostream>
|
||||
#include <Wal.hpp>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user