2023-05-04 05:39:22 -06:00
|
|
|
name: Build (Haiku)
|
2022-12-02 12:07:36 -07:00
|
|
|
|
2023-05-04 05:39:22 -06:00
|
|
|
on: [push, pull_request]
|
2022-12-02 12:07:36 -07:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
haiku:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Haiku
|
2023-05-04 05:39:22 -06:00
|
|
|
container: haiku/cross-compiler:x86_64-r1beta4
|
2022-12-02 12:07:36 -07:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2023-05-04 05:39:22 -06:00
|
|
|
- name: Setup dependencies
|
2022-12-02 12:07:36 -07:00
|
|
|
run: |
|
2023-05-04 05:39:22 -06:00
|
|
|
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
|
2022-12-02 12:07:36 -07:00
|
|
|
- name: Configure (CMake)
|
2023-01-28 22:12:40 -07:00
|
|
|
run: |
|
2023-05-04 05:39:22 -06:00
|
|
|
cmake -S . -B build -GNinja \
|
2023-01-28 22:12:40 -07:00
|
|
|
-Wdeprecated -Wdev -Werror \
|
2023-02-16 15:30:20 -07:00
|
|
|
-DSDL_SHARED=ON \
|
|
|
|
-DSDL_STATIC=ON \
|
2023-01-28 22:12:40 -07:00
|
|
|
-DSDL_TESTS=ON \
|
|
|
|
-DSDL_WERROR=ON \
|
|
|
|
-DSDL_INSTALL_TESTS=ON \
|
|
|
|
-DSDL_VENDOR_INFO=Github_Workflow \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=cmake_prefix \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
2023-05-04 05:39:22 -06:00
|
|
|
-DCMAKE_SYSTEM_NAME=Haiku
|
2022-12-02 12:07:36 -07:00
|
|
|
- name: Build (CMake)
|
|
|
|
run: |
|
2023-05-04 05:39:22 -06:00
|
|
|
cmake --build build/ --config Release --verbose --parallel
|
2022-12-02 12:07:36 -07:00
|
|
|
- name: Install (CMake)
|
|
|
|
run: |
|
2023-05-04 05:39:22 -06:00
|
|
|
echo "SDL3_DIR=$(pwd)/cmake_prefix" >> $GITHUB_ENV
|
|
|
|
cmake --install build/ --config Release
|
2023-01-28 22:12:40 -07:00
|
|
|
- name: Package (CPack)
|
|
|
|
run: |
|
2023-05-04 05:39:22 -06:00
|
|
|
cmake --build build/ --config Release --target package
|
2022-12-02 12:07:36 -07:00
|
|
|
- name: Verify CMake configuration files
|
|
|
|
run: |
|
2023-05-04 05:39:22 -06:00
|
|
|
cmake -S cmake/test -B cmake_config_build -G Ninja \
|
2022-12-02 12:07:36 -07:00
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
2023-05-04 05:39:22 -06:00
|
|
|
-DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }} \
|
|
|
|
-DCMAKE_SYSTEM_NAME=Haiku
|
|
|
|
cmake --build ./cmake_config_build --verbose
|
2022-12-02 12:07:36 -07:00
|
|
|
- name: Verify sdl3.pc
|
|
|
|
run: |
|
2023-05-04 05:39:22 -06:00
|
|
|
export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
|
|
|
|
cmake/test/test_pkgconfig.sh
|
2023-01-28 22:12:40 -07:00
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
if-no-files-found: error
|
|
|
|
name: SDL-haiku
|
|
|
|
path: build/dist/SDL3*
|