Add pkg-config verification to CI

This commit is contained in:
ko496-glitch 2025-01-11 22:25:06 -05:00
parent b56604c940
commit f7fb9fc714

View File

@ -259,6 +259,46 @@ jobs:
cmake -S test/install -B test/install/build -DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/build/install -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=${{ matrix.type.name == 'Debug' && 'Debug' || 'Release' }} ${{matrix.platform.flags}} ${{matrix.config.flags}} ${{matrix.type.flags}} cmake -S test/install -B test/install/build -DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/build/install -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=${{ matrix.type.name == 'Debug' && 'Debug' || 'Release' }} ${{matrix.platform.flags}} ${{matrix.config.flags}} ${{matrix.type.flags}}
cmake --build test/install/build --config ${{ matrix.type.name == 'Debug' && 'Debug' || 'Release' }} cmake --build test/install/build --config ${{ matrix.type.name == 'Debug' && 'Debug' || 'Release' }}
test-config:
name: Test SFML_INSTALL_PKGCONFIG_FILES
runs-on: ubuntu-22.04
steps:
# Here we are retrieving the source code
- name: Retrieve Code
uses: actions/checkout@v4
# Here we will install the dependencies
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build pkg-config
# Here we will Configure CMake with pkg-config enabled
- name: Configure CMake
run: |
cmake -S . -B build \
-DSFML_INSTALL_PKGCONFIG_FILES=ON \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-GNinja
# Here we build SFML
- name: Build SFML
run: |
cmake --build build
# Install SFML
- name: Install SFML
run: sudo cmake --install build
# Verify if pkg-config files are installed
- name: Verify pkg-config files
run: |
echo "Checking sfml-system.pc files"
pkg-config --modversion sfml-system
pkg-config --cflags sfml-system
pkg-config --libs sfml-system
coverage: coverage:
name: Finalize Coverage Upload name: Finalize Coverage Upload
needs: build needs: build