Compare commits

..

No commits in common. "master" and "0.18.0" have entirely different histories.

6 changed files with 31 additions and 59 deletions

View File

@ -8,7 +8,7 @@ jobs:
strategy: strategy:
matrix: matrix:
include: include:
- { cxx: g++ } - { cxx: g++, features: "coverage" }
- { 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,18 +20,23 @@ 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 ca-certificates apt-get install -yqq --no-install-recommends build-essential clang cmake libsdl2-dev cppcheck doxygen graphviz curl
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 https://raw.githubusercontent.com/AMDmi3/github_env/c8cc83d/github_env.py > e; chmod 755 e curl --insecure 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.xxx == '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'
@ -62,3 +67,9 @@ 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

View File

@ -1,44 +0,0 @@
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,10 +2,6 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/). 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 ## 0.18.0 - 2023-03-27
### Changed ### Changed
* Switch SDL2_{mixer,mixer,ttf} detection to upstream CMake scripts * Switch SDL2_{mixer,mixer,ttf} detection to upstream CMake scripts

View File

@ -1,7 +1,9 @@
cmake_minimum_required(VERSION 3.16 FATAL_ERROR) 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.0)
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)
@ -26,7 +28,7 @@ set(SDL2_ALL_LIBRARIES SDL2::SDL2)
set(SDL2_ALL_PKGCONFIG_MODULES sdl2) set(SDL2_ALL_PKGCONFIG_MODULES sdl2)
if(TARGET SDL2::SDL2main) if(TARGET SDL2::SDL2main)
set(SDL2_ALL_LIBRARIES SDL2::SDL2main ${SDL2_ALL_LIBRARIES}) set(SDL2_ALL_LIBRARIES ${SDL2_ALL_LIBRARIES} SDL2::SDL2main)
endif() endif()
if(MINGW) if(MINGW)

View File

@ -26,9 +26,16 @@ 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

View File

@ -1,4 +1,4 @@
<a href="https://repology.org/project/libsdl2pp/versions"> <a href="https://repology.org/metapackage/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 (const SDL2pp::Exception& e) { } catch (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 (const std::exception& e) { } catch (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 repository](https://github.com/libSDL2pp/libSDL2pp) * [GitHub page](https://github.com/libSDL2pp/libSDL2pp)
* [Doxygen documentation](https://libsdl2pp.github.io/) * [Online documentation](https://sdl2pp.amdmi3.ru/)
## Author ## Author