Compare commits

...

14 Commits

Author SHA1 Message Date
Dmitry Marakasov
b00d3b9eb9 Update repology url 2025-03-18 17:01:19 +03:00
Dmitry Marakasov
ac53cd10e6 Update urls 2025-03-18 00:30:55 +03:00
Dmitry Marakasov
a05e661aac Handle no doxygen changes case 2025-03-17 23:37:50 +03:00
Dmitry Marakasov
c3ac6407fa Tweak example 2025-03-17 23:29:31 +03:00
Dmitry Marakasov
4815bd386b Drop codecov
We don't need service which uses geoblock
2025-03-17 23:24:01 +03:00
Dmitry Marakasov
4d941b3b31 Update Doxyfile
- Remove HTML_TIMESTAMP: the option was deprecated and replaced with TIMESTAMP, but remove as we're storing docs in git and don't need diff noise.
- Remove input filter, as badges markdown seem to be processed correctly now
2025-03-17 23:23:47 +03:00
Dmitry Marakasov
2c07d9fc64 Add doxygen workflow 2025-03-17 23:23:47 +03:00
xzxzzxzxzca
1447f88546 Do not touch CMAKE_MODULE_PATH
Now that the library does not provide any CMake find-modules, it is useless to alter the global.
Besides, the only way for a higher level integrating project to provide its own dependency resolution mechanism (Conan, local source tree, etc)relies on appending to CMAKE_MODULE_PATH prior to locating packages. Sdl2pp overriding the variable breaks this mechanism and therefore can only locate a globally installed copy of SDL, which is often inconvenient or plain impossible.
2023-12-11 18:52:32 +03:00
Dmitry Marakasov
b44f34a3f6 Specify codecov token 2023-12-11 17:21:42 +03:00
Dmitry Marakasov
6da8c8d4b7 Fix pip in CI 2023-12-11 17:01:42 +03:00
Dmitry Marakasov
01ba3ddfba Update ci action 2023-04-17 18:28:17 +03:00
Dmitry Marakasov
cc198c9a56 Release 0.18.1 2023-04-17 14:54:20 +03:00
Dmitry Marakasov
120635b1a8 Fix sdlmain link order (fixes #139) 2023-04-17 14:52:42 +03:00
Dmitry Marakasov
7ea8feceee Fix condition in CI script 2023-04-17 14:52:18 +03:00
6 changed files with 59 additions and 31 deletions

View File

@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
include:
- { cxx: g++, features: "coverage" }
- { cxx: g++ }
- { cxx: clang++, features: "nooptlibs" }
- { cxx: clang++, features: "static" }
name: ${{ matrix.cxx }} ${{ matrix.features }}
@ -20,23 +20,18 @@ jobs:
DEBIAN_FRONTEND: noninteractive
run: |
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
apt-get install -qq --no-install-recommends libsdl2-image-dev libsdl2-ttf-dev libsdl2-mixer-dev
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
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 '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 --if ${{ matrix.xxx == 'clang++' }} 'CXXFLAGS+=-Wno-self-assign-overloaded' # explicit self-assignment tests
./e --if ${{ contains(matrix.features, 'coverage') }} 'CXXFLAGS+=--coverage' 'LDFLAGS+=--coverage'
./e --if ${{ matrix.cxx == 'clang++' }} 'CXXFLAGS+=-Wno-self-assign-overloaded' # explicit self-assignment tests
./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'
@ -67,9 +62,3 @@ jobs:
cd $GITHUB_WORKSPACE/exttests/cmake
cmake .
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
View 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

View File

@ -2,6 +2,10 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## 0.18.1 - 2023-04-17
### Fixed
* Fix SDL2main library link order
## 0.18.0 - 2023-03-27
### Changed
* Switch SDL2_{mixer,mixer,ttf} detection to upstream CMake scripts

View File

@ -1,9 +1,7 @@
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
# meta
project(libSDL2pp LANGUAGES CXX VERSION 0.18.0)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
project(libSDL2pp LANGUAGES CXX VERSION 0.18.1)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED YES)
@ -28,7 +26,7 @@ set(SDL2_ALL_LIBRARIES SDL2::SDL2)
set(SDL2_ALL_PKGCONFIG_MODULES sdl2)
if(TARGET SDL2::SDL2main)
set(SDL2_ALL_LIBRARIES ${SDL2_ALL_LIBRARIES} SDL2::SDL2main)
set(SDL2_ALL_LIBRARIES SDL2::SDL2main ${SDL2_ALL_LIBRARIES})
endif()
if(MINGW)

View File

@ -26,16 +26,9 @@ EXCLUDE = "@CMAKE_CURRENT_SOURCE_DIR@/SDL2pp/external"
# Examples (doesn't work atm)
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
USE_MDFILE_AS_MAINPAGE = "@CMAKE_CURRENT_SOURCE_DIR@/README.md"
# Include timestamp
HTML_TIMESTAMP = YES
# We target web, no latex needed
GENERATE_LATEX = NO

View File

@ -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">
</a>
@ -72,11 +72,11 @@ try {
SDL_Delay(2000);
// 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
std::cerr << "Error in: " << e.GetSDLFunction() << 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")
std::cerr << e.what() << std::endl;
}
@ -250,8 +250,8 @@ Projects using libSDL2pp:
## WWW
* [GitHub page](https://github.com/libSDL2pp/libSDL2pp)
* [Online documentation](https://sdl2pp.amdmi3.ru/)
* [GitHub repository](https://github.com/libSDL2pp/libSDL2pp)
* [Doxygen documentation](https://libsdl2pp.github.io/)
## Author