Skip to content

Commit

Permalink
Add support for GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
eXpl0it3r committed Apr 11, 2024
1 parent 84664cd commit a988263
Show file tree
Hide file tree
Showing 2 changed files with 117 additions and 7 deletions.
109 changes: 109 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: CI

on: [push, pull_request, workflow_dispatch]

jobs:
build:
name: ${{ matrix.platform.name }} ${{ matrix.config.name }}
runs-on: ${{ matrix.platform.os }}

strategy:
fail-fast: false
matrix:
platform:
- { name: Windows VS2019, os: windows-2019 }
- { name: Windows VS2022, os: windows-2022 }
- { name: Linux GCC, os: ubuntu-latest }
- { name: Linux Clang, os: ubuntu-latest, flags: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ }
- { name: MacOS XCode, os: macos-latest }
config:
- { name: Shared, flags: -DCMAKESFMLPROJECT_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=TRUE }
- { name: Static, flags: -DCMAKESFMLPROJECT_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=FALSE }

steps:
- name: Install Linux Dependencies
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install libxrandr-dev libxcursor-dev libudev-dev libopenal-dev libflac-dev libvorbis-dev libgl1-mesa-dev libegl1-mesa-dev libfribidi-dev

- name: Install macOS Dependencies
if: runner.os == 'macOS'
run: brew install fribidi

- name: SFML - Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: SFML/SFML
ref: 2.6.x
path: SFML

- name: SFML - Configure CMake
shell: bash
run: cmake -S $GITHUB_WORKSPACE/SFML -B $GITHUB_WORKSPACE/SFML/build -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/SFML/install -DCMAKE_VERBOSE_MAKEFILE=ON ${{matrix.platform.flags}} ${{matrix.config.flags}}

- name: SFML - Build
shell: bash
run: cmake --build $GITHUB_WORKSPACE/SFML/build --config Release --target install

- name: TagLib - Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: taglib/taglib
path: taglib

- name: TagLib - Configure CMake
shell: bash
run: cmake -S $GITHUB_WORKSPACE/taglib -B $GITHUB_WORKSPACE/taglib/build -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/taglib/install -DCMAKE_VERBOSE_MAKEFILE=ON ${{matrix.platform.flags}} ${{matrix.config.flags}}

- name: TagLib - Build
shell: bash
run: cmake --build $GITHUB_WORKSPACE/taglib/build --config Release --target install

- name: GNU FriBidi - Checkout Code
if: runner.os == 'Windows'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: fribidi/fribidi
path: fribidi

- name: GNU FriBidi - Setup MSVC
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1

- name: GNU FriBidi - Setup Python
if: runner.os == 'Windows'
uses: actions/setup-python@v3
with:
python-version: 3.6

- name: GNU FriBidi - Setup meson
if: runner.os == 'Windows'
run: |
python -m pip install --upgrade pip
pip install meson ninja
- name: GNU FriBidi - Configure
if: runner.os == 'Windows'
run: meson build -Ddocs=false -Dprefix=$GITHUB_WORKSPACE/fribidi -Ddebug=false

- name: GNU FriBidi - Build
if: runner.os == 'Windows'
run: ninja -C build

- name: GNU FriBidi - Build
if: runner.os == 'Windows'
shell: bash
run: cmake --build $GITHUB_WORKSPACE/fribidi/build --config Release --target install

- name: M.A.R.S - Checkout Code
uses: actions/checkout@v3

- name: M.A.R.S - Configure CMake
shell: bash
run: cmake -S $GITHUB_WORKSPACE -B $GITHUB_WORKSPACE/build -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/install -DCMAKE_VERBOSE_MAKEFILE=ON -DSFML_DIR=$GITHUB_WORKSPACE/SFML/install/lib/cmake/SFML ${{matrix.platform.flags}} ${{matrix.config.flags}}

- name: M.A.R.S - Build
shell: bash
run: cmake --build $GITHUB_WORKSPACE/build --config Release --target install
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
M.A.R.S
======
# M.A.R.S

**M.A.R.S. - a ridiculous shooter** is a 2D space shooter with awesome visual effects and attractive physics. Players can battle each other or computer controlled enemies in exciting game modes.
**M.A.R.S. - a ridiculous shooter** is a 2D space shooter with awesome visual effects and attractive physics. Players can battle each other or computer controlled enemies in exciting game modes.

Feel free to visit its **homepage** at http://mars-game.sourceforge.net/
Feel free to visit its **homepage** at https://mars-game.sourceforge.net/

## The Story

In year 3547, civilizations all over the galaxy have settled their own planets, living in peace and harmony with its environment. But outside the contemplative habitats, the GREAT WAR is raging. As a famous fighter on your way to never ending honor and prosperity, you have to protect your planet from the oncoming doom of your jealous neighbours!

## Compiling and installing from source!

For information on how to compile the game from source, please feel free to visit [BUILD.md](BUILD.md)

## Donate!

We are always happy if people are interested in supporting our project. Aside from sending in patches and giving feedback concerning gameplay etc., a nice way to show your liking is to donate some money ;-)

## License
Expand All @@ -20,7 +22,6 @@ Copyright (C) 2010-2012 Simon Schneegans and Felix Lauer <marscoreteam@googlemai

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

0 comments on commit a988263

Please sign in to comment.