Skip to content

Commit

Permalink
Merge pull request #6 from wojciechmadry/sfml_src
Browse files Browse the repository at this point in the history
Sfml as submodule
  • Loading branch information
wojciechmadry authored Dec 19, 2023
2 parents 5177097 + 4dce4f8 commit af7d583
Show file tree
Hide file tree
Showing 11 changed files with 68 additions and 71 deletions.
26 changes: 5 additions & 21 deletions .github/workflows/clang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,19 @@ name: Clang

on:
push:
branches:
- '**'
branches:
- '**'
pull_request:
branches:
- '**'
- '**'

jobs:
build:

runs-on: ubuntu-22.04
env:
CC: clang
CXX: clang++

steps:
- uses: actions/checkout@v3

- name: Install Dependencies
run: |
sudo apt -y install clang libsfml-dev
- name: FetchSubmodules
run: |
git submodule init
git submodule update
- name: Build Clang
run: |
mkdir -p build
cd build
cmake ../
cmake --build . -j
- name: clang
run: docker build . --file Dockerfile.clang --tag kulki_docker_clang:$(date +%s)
6 changes: 3 additions & 3 deletions .github/workflows/clang_format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: ClangFormat

on:
push:
branches:
- '**'
branches:
- '**'
pull_request:
branches:
- '**'
- '**'

jobs:
build:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Dockerfile build
name: GCC

on:
push:
Expand All @@ -9,12 +9,12 @@ on:
- '**'

jobs:

build:

runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . --file Dockerfile --tag kulki_docker:$(date +%s)

- name: gcc
run: docker build . --file Dockerfile.gcc --tag kulki_docker_gcc:$(date +%s)
36 changes: 0 additions & 36 deletions .github/workflows/gcc.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "src/BabelLib"]
path = src/BabelLib
url = https://github.com/wojciechmadry/BabelLib.git
[submodule "SFML"]
path = SFML
url = https://github.com/SFML/SFML.git
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ if(UNIX)
find_package(Threads REQUIRED)
endif(UNIX)

if(UNIX)
find_package(SFML COMPONENTS graphics window system REQUIRED)
endif()
add_subdirectory(SFML)

include_directories(
src/BabelLib
Expand Down
14 changes: 12 additions & 2 deletions Dockerfile → Dockerfile.clang
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,21 @@ WORKDIR /ws
RUN apt update \
&& apt upgrade -y\
&& apt install -y\
libsfml-dev \
cmake \
ninja-build \
clang \
git
git \
libudev-dev \
libopenal-dev \
libvorbis-dev \
libflac-dev \
libx11-dev \
libxcursor-dev \
libxrandr-dev \
libfreetype-dev \
libopengl-dev \
libglx-dev \
libgl1-mesa-dev

ENV CC=clang
ENV CXX=clang++
Expand Down
37 changes: 37 additions & 0 deletions Dockerfile.gcc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM ubuntu:22.04

WORKDIR /ws

RUN apt update \
&& apt upgrade -y\
&& apt install -y\
cmake \
ninja-build \
gcc \
git \
libudev-dev \
libopenal-dev \
libvorbis-dev \
libflac-dev \
libx11-dev \
libxcursor-dev \
libxrandr-dev \
libfreetype-dev \
libopengl-dev \
libglx-dev \
libgl1-mesa-dev

ENV CC=gcc
ENV CXX=g++
ENV BRANCH=master

RUN git clone https://github.com/wojciechmadry/Kulki.git \
&& cd Kulki \
&& git checkout ${BRANCH} \
&& git submodule init \
&& git submodule update \
&& mkdir -p build \
&& cd build \
&& cmake -GNinja ../ \
&& ninja

1 change: 1 addition & 0 deletions SFML
Submodule SFML added at 69ea0c
2 changes: 1 addition & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include <iostream>

static constexpr const char *VERSION = "1.4";
static constexpr const char *VERSION = "1.5";

#define FPS 0 // Show fps in console

Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Requirements
---
1. CMake
2. C++20 (GCC or Clang)
3. `libsfml-dev`
3. [SFML dependencies](https://www.sfml-dev.org/tutorials/2.6/compile-with-cmake.php)

Build from source
---
Expand Down

0 comments on commit af7d583

Please sign in to comment.