mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-04 11:25:58 -04:00
Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
b00d3b9eb9 | ||
![]() |
ac53cd10e6 | ||
![]() |
a05e661aac | ||
![]() |
c3ac6407fa | ||
![]() |
4815bd386b | ||
![]() |
4d941b3b31 | ||
![]() |
2c07d9fc64 | ||
![]() |
1447f88546 | ||
![]() |
b44f34a3f6 | ||
![]() |
6da8c8d4b7 | ||
![]() |
01ba3ddfba |
17
.github/workflows/ci.yml
vendored
17
.github/workflows/ci.yml
vendored
@ -8,7 +8,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- { cxx: g++, features: "coverage" }
|
- { cxx: g++ }
|
||||||
- { cxx: clang++, features: "nooptlibs" }
|
- { cxx: clang++, features: "nooptlibs" }
|
||||||
- { cxx: clang++, features: "static" }
|
- { cxx: clang++, features: "static" }
|
||||||
name: ${{ matrix.cxx }} ${{ matrix.features }}
|
name: ${{ matrix.cxx }} ${{ matrix.features }}
|
||||||
@ -20,23 +20,18 @@ jobs:
|
|||||||
DEBIAN_FRONTEND: noninteractive
|
DEBIAN_FRONTEND: noninteractive
|
||||||
run: |
|
run: |
|
||||||
apt-get update -qq
|
apt-get update -qq
|
||||||
apt-get install -yqq --no-install-recommends build-essential clang cmake libsdl2-dev cppcheck doxygen graphviz curl
|
apt-get install -yqq --no-install-recommends build-essential clang cmake libsdl2-dev cppcheck doxygen graphviz curl ca-certificates
|
||||||
if [ ${{ !contains(matrix.features, 'nooptlibs') }} = true ]; then
|
if [ ${{ !contains(matrix.features, 'nooptlibs') }} = true ]; then
|
||||||
apt-get install -qq --no-install-recommends libsdl2-image-dev libsdl2-ttf-dev libsdl2-mixer-dev
|
apt-get install -qq --no-install-recommends libsdl2-image-dev libsdl2-ttf-dev libsdl2-mixer-dev
|
||||||
fi
|
fi
|
||||||
if [ ${{ contains(matrix.features, 'coverage') }} = true ]; then
|
|
||||||
apt-get install -qq --no-install-recommends python3-pip git
|
|
||||||
pip install --user pyyaml cpp-coveralls
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Set up environment
|
- name: Set up environment
|
||||||
run: |
|
run: |
|
||||||
curl --insecure https://raw.githubusercontent.com/AMDmi3/github_env/c8cc83d/github_env.py > e; chmod 755 e
|
curl https://raw.githubusercontent.com/AMDmi3/github_env/c8cc83d/github_env.py > e; chmod 755 e
|
||||||
./e 'CXX=${{ matrix.cxx }}'
|
./e 'CXX=${{ matrix.cxx }}'
|
||||||
./e 'CXXFLAGS=-Wall -Wextra -pedantic' # XXX: Add -Werror
|
./e 'CXXFLAGS=-Wall -Wextra -pedantic' # XXX: Add -Werror
|
||||||
./e 'CMAKE_ARGS=-DSDL2PP_ENABLE_LIVE_TESTS=NO' # no ability to run live tests in CI (SDL_InitSubsystem failed: x11 not available with xvfb)
|
./e 'CMAKE_ARGS=-DSDL2PP_ENABLE_LIVE_TESTS=NO' # no ability to run live tests in CI (SDL_InitSubsystem failed: x11 not available with xvfb)
|
||||||
./e --if ${{ matrix.cxx == 'clang++' }} 'CXXFLAGS+=-Wno-self-assign-overloaded' # explicit self-assignment tests
|
./e --if ${{ matrix.cxx == 'clang++' }} 'CXXFLAGS+=-Wno-self-assign-overloaded' # explicit self-assignment tests
|
||||||
./e --if ${{ contains(matrix.features, 'coverage') }} 'CXXFLAGS+=--coverage' 'LDFLAGS+=--coverage'
|
|
||||||
./e --if ${{ contains(matrix.features, 'nooptlibs') }} 'CMAKE_ARGS+=-DSDL2PP_WITH_IMAGE=NO -DSDL2PP_WITH_MIXER=NO -DSDL2PP_WITH_TTF=NO'
|
./e --if ${{ contains(matrix.features, 'nooptlibs') }} 'CMAKE_ARGS+=-DSDL2PP_WITH_IMAGE=NO -DSDL2PP_WITH_MIXER=NO -DSDL2PP_WITH_TTF=NO'
|
||||||
./e --if ${{ contains(matrix.features, 'static') }} 'CMAKE_ARGS+=-DSDL2PP_STATIC=YES'
|
./e --if ${{ contains(matrix.features, 'static') }} 'CMAKE_ARGS+=-DSDL2PP_STATIC=YES'
|
||||||
|
|
||||||
@ -67,9 +62,3 @@ jobs:
|
|||||||
cd $GITHUB_WORKSPACE/exttests/cmake
|
cd $GITHUB_WORKSPACE/exttests/cmake
|
||||||
cmake .
|
cmake .
|
||||||
cmake --build .
|
cmake --build .
|
||||||
|
|
||||||
- name: Upload coverage
|
|
||||||
if: ${{ contains(matrix.features, 'coverage') }}
|
|
||||||
uses: codecov/codecov-action@v1
|
|
||||||
with:
|
|
||||||
fail_ci_if_error: true
|
|
||||||
|
44
.github/workflows/doxygen.yml
vendored
Normal file
44
.github/workflows/doxygen.yml
vendored
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
name: Doxygen
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ubuntu:rolling
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Install dependencies
|
||||||
|
env:
|
||||||
|
DEBIAN_FRONTEND: noninteractive
|
||||||
|
run: |
|
||||||
|
apt-get update -qq
|
||||||
|
apt-get install -yqq --no-install-recommends build-essential cmake libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev libsdl2-mixer-dev doxygen graphviz curl ca-certificates git openssh-client
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: libSDL2pp/libSDL2pp.github.io
|
||||||
|
ssh-key: ${{ secrets.PAGES_SSH_KEY }}
|
||||||
|
path: doxygen/html
|
||||||
|
- name: Clean up old docs
|
||||||
|
run: |
|
||||||
|
cd doxygen/html
|
||||||
|
git rm -r .
|
||||||
|
- name: Configure
|
||||||
|
run: cmake .
|
||||||
|
- name: Run doxygen
|
||||||
|
run: make doxygen
|
||||||
|
- name: Deploy
|
||||||
|
run: |
|
||||||
|
cd doxygen/html
|
||||||
|
touch .nojekyll
|
||||||
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
git config --global user.name "github-actions[bot]"
|
||||||
|
git add .
|
||||||
|
if git diff --cached --quiet; then
|
||||||
|
echo "No changes, skipping commit"
|
||||||
|
else
|
||||||
|
git commit -m "Update for ${{ github.repository }} commit ${{ github.sha }} run_id ${{ github.run_id }}"
|
||||||
|
git push --force
|
||||||
|
fi
|
@ -3,8 +3,6 @@ cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
|
|||||||
# meta
|
# meta
|
||||||
project(libSDL2pp LANGUAGES CXX VERSION 0.18.1)
|
project(libSDL2pp LANGUAGES CXX VERSION 0.18.1)
|
||||||
|
|
||||||
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
|
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED YES)
|
set(CMAKE_CXX_STANDARD_REQUIRED YES)
|
||||||
set(CMAKE_CXX_EXTENSIONS NO)
|
set(CMAKE_CXX_EXTENSIONS NO)
|
||||||
|
@ -26,16 +26,9 @@ EXCLUDE = "@CMAKE_CURRENT_SOURCE_DIR@/SDL2pp/external"
|
|||||||
# Examples (doesn't work atm)
|
# Examples (doesn't work atm)
|
||||||
EXAMPLE_PATH = "@CMAKE_CURRENT_SOURCE_DIR@/examples"
|
EXAMPLE_PATH = "@CMAKE_CURRENT_SOURCE_DIR@/examples"
|
||||||
|
|
||||||
# Filter through sed to remove badges which Doxygen fails to process properly
|
|
||||||
INPUT_FILTER = "sed -e '/^\[!\[/d'"
|
|
||||||
FILTER_PATTERNS = *.md
|
|
||||||
|
|
||||||
# README file is the main page
|
# README file is the main page
|
||||||
USE_MDFILE_AS_MAINPAGE = "@CMAKE_CURRENT_SOURCE_DIR@/README.md"
|
USE_MDFILE_AS_MAINPAGE = "@CMAKE_CURRENT_SOURCE_DIR@/README.md"
|
||||||
|
|
||||||
# Include timestamp
|
|
||||||
HTML_TIMESTAMP = YES
|
|
||||||
|
|
||||||
# We target web, no latex needed
|
# We target web, no latex needed
|
||||||
GENERATE_LATEX = NO
|
GENERATE_LATEX = NO
|
||||||
|
|
||||||
|
10
README.md
10
README.md
@ -1,4 +1,4 @@
|
|||||||
<a href="https://repology.org/metapackage/libsdl2pp/versions">
|
<a href="https://repology.org/project/libsdl2pp/versions">
|
||||||
<img src="https://repology.org/badge/vertical-allrepos/libsdl2pp.svg" alt="libsdl2pp packaging status" align="right">
|
<img src="https://repology.org/badge/vertical-allrepos/libsdl2pp.svg" alt="libsdl2pp packaging status" align="right">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
@ -72,11 +72,11 @@ try {
|
|||||||
SDL_Delay(2000);
|
SDL_Delay(2000);
|
||||||
|
|
||||||
// All SDL objects are released at this point or if an error occurs
|
// All SDL objects are released at this point or if an error occurs
|
||||||
} catch (SDL2pp::Exception& e) {
|
} catch (const SDL2pp::Exception& e) {
|
||||||
// Exception stores SDL_GetError() result and name of function which failed
|
// Exception stores SDL_GetError() result and name of function which failed
|
||||||
std::cerr << "Error in: " << e.GetSDLFunction() << std::endl;
|
std::cerr << "Error in: " << e.GetSDLFunction() << std::endl;
|
||||||
std::cerr << " Reason: " << e.GetSDLError() << std::endl;
|
std::cerr << " Reason: " << e.GetSDLError() << std::endl;
|
||||||
} catch (std::exception& e) {
|
} catch (const std::exception& e) {
|
||||||
// This also works (e.g. "SDL_Init failed: No available video device")
|
// This also works (e.g. "SDL_Init failed: No available video device")
|
||||||
std::cerr << e.what() << std::endl;
|
std::cerr << e.what() << std::endl;
|
||||||
}
|
}
|
||||||
@ -250,8 +250,8 @@ Projects using libSDL2pp:
|
|||||||
|
|
||||||
## WWW
|
## WWW
|
||||||
|
|
||||||
* [GitHub page](https://github.com/libSDL2pp/libSDL2pp)
|
* [GitHub repository](https://github.com/libSDL2pp/libSDL2pp)
|
||||||
* [Online documentation](https://sdl2pp.amdmi3.ru/)
|
* [Doxygen documentation](https://libsdl2pp.github.io/)
|
||||||
|
|
||||||
## Author
|
## Author
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user