tomato/.github/workflows/haiku.yml
Green Sky dec0d4ec41 Squashed 'external/sdl/SDL/' content from commit b8d91252c
git-subtree-dir: external/sdl/SDL
git-subtree-split: b8d91252c6488cf9c645aba447b56bb9dbd9609a
2023-07-25 22:27:55 +02:00

58 lines
1.8 KiB
YAML

name: Build (Haiku)
on: [push, pull_request]
jobs:
haiku:
runs-on: ubuntu-latest
name: Haiku
container: haiku/cross-compiler:x86_64-r1beta4
steps:
- uses: actions/checkout@v3
- name: Setup dependencies
run: |
apt-get install pkg-config -y
- name: Configure Haiku environment variables
run: |
echo "CC=x86_64-unknown-haiku-gcc" >> $GITHUB_ENV
echo "CXX=x86_64-unknown-haiku-g++" >> $GITHUB_ENV
- name: Configure (CMake)
run: |
cmake -S . -B build -GNinja \
-Wdeprecated -Wdev -Werror \
-DSDL_SHARED=ON \
-DSDL_STATIC=ON \
-DSDL_TESTS=ON \
-DSDL_WERROR=ON \
-DSDL_INSTALL_TESTS=ON \
-DSDL_VENDOR_INFO=Github_Workflow \
-DCMAKE_INSTALL_PREFIX=cmake_prefix \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_SYSTEM_NAME=Haiku
- name: Build (CMake)
run: |
cmake --build build/ --config Release --verbose --parallel
- name: Install (CMake)
run: |
echo "SDL3_DIR=$(pwd)/cmake_prefix" >> $GITHUB_ENV
cmake --install build/ --config Release
- name: Package (CPack)
run: |
cmake --build build/ --config Release --target package
- name: Verify CMake configuration files
run: |
cmake -S cmake/test -B cmake_config_build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }} \
-DCMAKE_SYSTEM_NAME=Haiku
cmake --build ./cmake_config_build --verbose
- name: Verify sdl3.pc
run: |
export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
cmake/test/test_pkgconfig.sh
- uses: actions/upload-artifact@v3
with:
if-no-files-found: error
name: SDL-haiku
path: build/dist/SDL3*