Skip to content

Merge pull request #110 from maelbecel/game-engine #111

Merge pull request #110 from maelbecel/game-engine

Merge pull request #110 from maelbecel/game-engine #111

Workflow file for this run

name: Clone Repository
on:
push:
branches:
- main
- dev
- fix/Compilation-windows
env:
MIRROR_URL:
[email protected]:EpitechPromo2026/B-CPP-500-REN-5-2-rtype-ethan1.hernou.git
jobs:
linux-compilation:
name: Compiling on Linux...
runs-on: ubuntu-latest
container: epitechcontent/epitest-docker
timeout-minutes: 20
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
- name: Setup Ninja
uses: seanmiddleditch/gha-setup-ninja@v4
- name: Setup CMake
run: |
cmake --version
- name: Compiling...
run: |
mkdir build && cd build && cmake .. -G Ninja && ninja && cd ..
- name: Check if the executable exists
run: |
if [ -f r-type_client ] && [ -f r-type_server ]; then exit 0; else exit 1; fi
shell: bash
windows-compilation:
name: Compiling on Windows...
runs-on: windows-latest
timeout-minutes: 20
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1
- name: Setup CMake
run: |
cmake --version
- name: Set VCPKG_ROOT and Run CMake
run: |
mkdir build && cd build && cmake .. && cmake --build . && cd ..
# - name: Check if the executable exists
# run: |
# IF (Test-Path .\Release\r-type_client.exe) -and (Test-Path .\Release\r-type_server.exe) { exit 0 }
# exit 1
# shell: pwsh
tests:
name: Testing...
needs: linux-compilation
runs-on: ubuntu-latest
container: epitechcontent/epitest-docker
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: |
echo testing the project
mirroring:
runs-on: ubuntu-latest
needs: tests
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: pixta-dev/repository-mirroring-action@v1
with:
target_repo_url:
${{ env.MIRROR_URL }}
ssh_private_key:
${{ secrets.GITLAB_SSH_PRIVATE_KEY }}