Skip to content

Build cimgui_impl Libraries (SDL3) #19

Build cimgui_impl Libraries (SDL3)

Build cimgui_impl Libraries (SDL3) #19

Workflow file for this run

name: Build cimgui_impl Libraries (SDL3)
on: [workflow_dispatch]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
arch: x86_64
cmake-arch: x64
vcpkg-triplet: x64-linux
- os: linux
arch: arm64
cmake-arch: aarch64
vcpkg-triplet: arm64-linux
runner-label: self-hosted
- os: windows-latest
arch: x86_64
cmake-arch: x64
vcpkg-triplet: x64-windows
- os: windows-latest
arch: x86
cmake-arch: win32
vcpkg-triplet: x86-windows
- os: windows-latest
arch: arm64
cmake-arch: arm64
vcpkg-triplet: arm64-windows
- os: macos-latest
arch: x86_64
cmake-arch: x86_64
vcpkg-triplet: x64-osx
- os: macos-latest
arch: arm64
cmake-arch: arm64
vcpkg-triplet: arm64-osx
steps:
- uses: actions/checkout@v4.1.7
with:
repository: "HexaEngine/cimgui_impl"
path: "cimgui"
submodules: true
- uses: actions/checkout@v4.1.7
with:
repository: 'libsdl-org/SDL'
ref: 'release-3.2.10'
path: 'cimgui/SDL'
submodules: true
- name: Install dependencies on Ubuntu
if: matrix.os == 'linux' || matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update && sudo apt-get install -y \
build-essential \
cmake \
libasound2-dev \
libpulse-dev \
libaudio-dev \
libx11-dev \
libxext-dev \
libxrandr-dev \
libxcursor-dev \
libxfixes-dev \
libxi-dev \
libxinerama-dev \
libxss-dev \
libwayland-dev \
libwayland-egl-backend-dev \
libdbus-1-dev \
libudev-dev \
libgles2-mesa-dev \
libegl1-mesa-dev \
libgl1-mesa-dev \
libibus-1.0-dev \
fcitx-libs-dev \
libsamplerate0-dev \
ccache \
libjack-jackd2-dev \
libdrm-dev \
libpipewire-0.3-dev \
libvulkan-dev \
libdecor-0-dev \
qtwayland5 \
libxkbcommon-dev \
libsndio-dev \
libpng-dev \
libjpeg-dev \
libtiff-dev \
libwebp-dev \
libavif-dev \
patchelf
- name: Install Dependencies on macOS
if: matrix.os == 'macos-latest'
run: |
brew install glfw glew glm
- name: Prepare Vulkan SDK
if: matrix.os == 'macos-latest' || matrix.os == 'macos-13'
uses: humbletim/setup-vulkan-sdk@v1.2.1
with:
vulkan-query-version: 1.3.204.0
vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang
vulkan-use-cache: false
- name: Configure SDL with CMake on Linux (x86_64)
if: matrix.os == 'linux' || matrix.os == 'ubuntu-latest'
run: |
cd cimgui/SDL
cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Release -DSDL_STATIC=OFF -DSDL_SHARED=ON -DSDL_TEST=OFF
- name: Configure SDL with CMake for macOS ARM64
if: matrix.os == 'macos-latest'
run: |
cd cimgui/SDL
cmake -S . -B ./build -DCMAKE_OSX_ARCHITECTURES=${{ matrix.cmake-arch }} -DCMAKE_BUILD_TYPE=Release -DSDL_STATIC=OFF -DSDL_SHARED=ON -DSDL_TEST=OFF
- name: Configure SDL with CMake for Windows
if: matrix.os == 'windows-latest'
run: |
cd cimgui/SDL
cmake -S . -B ./build -A ${{ matrix.cmake-arch }} -DCMAKE_BUILD_TYPE=Release -DSDL_STATIC=OFF -DSDL_SHARED=ON -DSDL_TEST=OFF -DCMAKE_SYSTEM_VERSION=10.0.26100.0
- name: Build SDL3
run: |
cd cimgui/SDL
cmake --build ./build --config Release
cmake --install ./build --config Release --prefix install
- name: Configure cimgui_impl with CMake on Linux
if: matrix.os == 'ubuntu-latest' || matrix.os == 'linux'
run: |
cd cimgui
cmake -S ./ -B ./build -DCMAKE_PREFIX_PATH="./SDL/install" -DBACKENDS_SDL3_ONLY=ON -DIMGUI_WCHAR32=ON
- name: Configure cimgui_impl with CMake for macOS
if: matrix.os == 'macos-latest' || matrix.os == 'macos-13'
run: |
cd cimgui
cmake -S ./ -B ./build -DCMAKE_OSX_ARCHITECTURES=${{ matrix.cmake-arch }} -DCMAKE_PREFIX_PATH="./SDL/install" -DBACKENDS_SDL3_ONLY=ON -DIMGUI_WCHAR32=ON -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON
- name: Configure cimgui_impl with CMake for Windows (arm64)
if: matrix.os == 'windows-latest'
run: |
cd cimgui
cmake -S . -B ./build -A ${{ matrix.cmake-arch }} -DCMAKE_PREFIX_PATH="./SDL/install" -DBACKENDS_SDL3_ONLY=ON -DIMGUI_WCHAR32=ON -DCMAKE_SYSTEM_VERSION=10.0.26100.0
- name: Build cimgui_impl
run: |
cd cimgui
cmake --build ./build --config Release
- name: Move Windows binaries
if: matrix.os == 'windows-latest'
run: |
cd cimgui
mv ./build/Release/*.dll ./build/
- name: Upload Artifacts
uses: actions/upload-artifact@v4.3.4
with:
name: cimgui_impl-${{ matrix.os }}-${{ matrix.arch }}-artifacts
path: |
cimgui/build/*.dll
cimgui/build/*.so
cimgui/build/*.dylib
if-no-files-found: ignore # 'warn' or 'ignore' or 'error'