mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 11:28:15 +00:00
ci: use Haiku cross toolchain
A cross compiler is much faster then an emulated one.
This commit is contained in:

committed by
Ryan C. Gordon

parent
fe68fd3af9
commit
72e5a52c51
59
.github/workflows/haiku.yml
vendored
59
.github/workflows/haiku.yml
vendored
@@ -1,37 +1,24 @@
|
|||||||
name: Build (Haiku @QEMU)
|
name: Build (Haiku)
|
||||||
|
|
||||||
on:
|
on: [push, pull_request]
|
||||||
# push: # Disabled ci on push because of long build times
|
|
||||||
# pull_request:
|
|
||||||
# paths:
|
|
||||||
# - '**/haiku/*'
|
|
||||||
# - '.github/workflows/haiku.yml'
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
haiku:
|
haiku:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Haiku
|
name: Haiku
|
||||||
container: docker.io/hectorm/qemu-haiku:latest
|
container: haiku/cross-compiler:x86_64-r1beta4
|
||||||
steps:
|
steps:
|
||||||
- name: Wait until the VM is ready
|
|
||||||
run: |
|
|
||||||
container-init & timeout 600 vmshell exit 0
|
|
||||||
- name: Setup Haiku dependencies
|
|
||||||
run: |
|
|
||||||
vmshell pkgman install -y cmd:cmake cmd:gcc cmd:ld cmd:ninja cmd:pkg_config haiku_devel devel:libgl devel:libglu
|
|
||||||
- name: Restart VM
|
|
||||||
run: |
|
|
||||||
sv force-restart qemu || true
|
|
||||||
timeout 600 vmshell exit 0
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Copy project to VM
|
- name: Setup dependencies
|
||||||
run: |
|
run: |
|
||||||
vmshell mkdir ./src/
|
apt-get install pkg-config -y
|
||||||
tar -cf - ./ | vmshell tar -xf - -C ./src/
|
- 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)
|
- name: Configure (CMake)
|
||||||
run: |
|
run: |
|
||||||
vmshell cmake -S src -B build -GNinja \
|
cmake -S . -B build -GNinja \
|
||||||
-Wdeprecated -Wdev -Werror \
|
-Wdeprecated -Wdev -Werror \
|
||||||
-DSDL_SHARED=ON \
|
-DSDL_SHARED=ON \
|
||||||
-DSDL_STATIC=ON \
|
-DSDL_STATIC=ON \
|
||||||
@@ -41,32 +28,28 @@ jobs:
|
|||||||
-DSDL_VENDOR_INFO=Github_Workflow \
|
-DSDL_VENDOR_INFO=Github_Workflow \
|
||||||
-DCMAKE_INSTALL_PREFIX=cmake_prefix \
|
-DCMAKE_INSTALL_PREFIX=cmake_prefix \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON \
|
-DCMAKE_SYSTEM_NAME=Haiku
|
||||||
-DSDL_TESTS_TIMEOUT_MULTIPLIER=10
|
|
||||||
- name: Build (CMake)
|
- name: Build (CMake)
|
||||||
run: |
|
run: |
|
||||||
vmshell cmake --build ./build/ --config Release --verbose --parallel
|
cmake --build build/ --config Release --verbose --parallel
|
||||||
- name: Run build-time tests (CMake)
|
|
||||||
run: |
|
|
||||||
vmshell ctest -VV --test-dir build/
|
|
||||||
- name: Install (CMake)
|
- name: Install (CMake)
|
||||||
run: |
|
run: |
|
||||||
vmshell cmake --install ./build/ --config Release
|
echo "SDL3_DIR=$(pwd)/cmake_prefix" >> $GITHUB_ENV
|
||||||
|
cmake --install build/ --config Release
|
||||||
- name: Package (CPack)
|
- name: Package (CPack)
|
||||||
run: |
|
run: |
|
||||||
vmshell cmake --build build/ --config Release --target package
|
cmake --build build/ --config Release --target package
|
||||||
- name: Verify CMake configuration files
|
- name: Verify CMake configuration files
|
||||||
run: |
|
run: |
|
||||||
vmshell cmake -S ./src/cmake/test -B cmake_config_build -G Ninja \
|
cmake -S cmake/test -B cmake_config_build -G Ninja \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DCMAKE_PREFIX_PATH=\$PWD/cmake_prefix
|
-DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }} \
|
||||||
vmshell cmake --build ./cmake_config_build --verbose
|
-DCMAKE_SYSTEM_NAME=Haiku
|
||||||
|
cmake --build ./cmake_config_build --verbose
|
||||||
- name: Verify sdl3.pc
|
- name: Verify sdl3.pc
|
||||||
run: |
|
run: |
|
||||||
vmshell CC=c++ PKG_CONFIG_PATH=\$PWD/cmake_prefix/lib/pkgconfig src/cmake/test/test_pkgconfig.sh
|
export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
|
||||||
- name: Copy package from VM
|
cmake/test/test_pkgconfig.sh
|
||||||
run: |
|
|
||||||
vmshell tar -cf - build/dist/ | tar -xf - -C ./
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
Reference in New Issue
Block a user