cmake: add CPack support for creating binary archives

This commit is contained in:
Anonymous Maarten
2023-01-29 06:12:40 +01:00
committed by Anonymous Maarten
parent 64c97906c9
commit 53d434fd24
14 changed files with 350 additions and 172 deletions

View File

@@ -18,7 +18,7 @@ jobs:
run: |
sudo apt-get -y update
sudo apt-get install -y ninja-build
- name: Configure CMake
- name: Configure (CMake)
run: |
emcmake cmake -S . -B build \
-Wdeprecated -Wdev -Werror \
@@ -28,7 +28,7 @@ jobs:
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=prefix \
-GNinja
- name: Build
- name: Build (CMake)
run: cmake --build build/ --verbose
- name: Run build-time tests
run: |
@@ -36,10 +36,13 @@ jobs:
export SDL_TESTS_QUICK=1
# FIXME: enable Emscripten build time tests
# ctest -VV --test-dir build/
- name: Install
- name: Install (CMake)
run: |
echo "SDL3_DIR=$(pwd)/prefix" >> $GITHUB_ENV
cmake --install build/
- name: Package (CPack)
run: |
cmake --build build/ --config Release --target package
- name: Verify CMake configuration files
run: |
emcmake cmake -S cmake/test -B cmake_config_build \
@@ -48,3 +51,8 @@ jobs:
-DTEST_SHARED=FALSE \
-DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }}
cmake --build cmake_config_build --verbose
- uses: actions/upload-artifact@v3
with:
if-no-files-found: error
name: SDL-emscripten
path: build/dist/SDL3*