Skip to content

Build cimgui_impl Libraries (GLFW) #20

Build cimgui_impl Libraries (GLFW)

Build cimgui_impl Libraries (GLFW) #20

Workflow file for this run

name: Build cimgui_impl Libraries (GLFW)
on: [workflow_dispatch]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
arch: x86_64
cmake-arch: x64
- os: linux
arch: arm64
cmake-arch: aarch64
runner-label: self-hosted
- os: windows-latest
arch: x86_64
cmake-arch: x64
triplet: x64-windows
- os: windows-latest
arch: x86
cmake-arch: win32
triplet: x86-windows
- os: windows-latest
arch: arm64
cmake-arch: arm64
triplet: arm64-windows
- os: macos-13
arch: x86_64
cmake-arch: x86_64
- os: macos-latest
arch: arm64
cmake-arch: arm64
steps:
- uses: actions/[email protected]
with:
repository: "HexaEngine/cimgui_impl"
path: "cimgui_impl"
submodules: true
- name: Install dependencies on Ubuntu
if: matrix.os == 'ubuntu-latest' || matrix.os == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake libsdl2-dev libglfw3-dev libglu1-mesa-dev libvulkan-dev patchelf
- name: Install dependencies on MacOS
if: matrix.os == 'macos-latest' || matrix.os == 'macos-13'
run: |
brew install cmake sdl2 glfw glew glm
- name: Prepare Vulkan SDK
if: matrix.os == 'macos-latest' || matrix.os == 'macos-13'
uses: humbletim/[email protected]
with:
vulkan-query-version: 1.3.204.0
vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang
vulkan-use-cache: false
- name: Install vcpkg (Windows)
if: matrix.os == 'windows-latest'
run: |
cd cimgui_impl
git clone https://github.com/microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.bat
- name: Install vcpkg packages
if: matrix.os == 'windows-latest'
run: |
cd cimgui_impl
./vcpkg/vcpkg install glfw3:${{ matrix.triplet }}
- name: Configure cimgui_impl with CMake on Linux
if: matrix.os == 'ubuntu-latest' || matrix.os == 'linux'
run: |
cmake -S cimgui_impl -B cimgui_impl/build -DBACKENDS_GLFW_ONLY=ON -DIMGUI_WCHAR32=ON
- name: Configure cimgui_impl with CMake for macOS
if: matrix.os == 'macos-latest' || matrix.os == 'macos-13'
run: |
cmake -S cimgui_impl -B cimgui_impl/build -DCMAKE_OSX_ARCHITECTURES=${{ matrix.cmake-arch }} -DBACKENDS_GLFW_ONLY=ON -DIMGUI_WCHAR32=ON
- name: Configure cimgui_impl with CMake for Windows (arm64)
if: matrix.os == 'windows-latest' && matrix.arch == 'arm64'
run: |
cd cimgui_impl
cmake -S . -B ./build -A ${{ matrix.cmake-arch }} -DCMAKE_TOOLCHAIN_FILE="./vcpkg/scripts/buildsystems/vcpkg.cmake" -DBACKENDS_GLFW_ONLY=ON -DIMGUI_WCHAR32=ON -DCMAKE_SYSTEM_VERSION=10.0.26100.0
- name: Configure cimgui_impl with CMake for Windows
if: matrix.os == 'windows-latest' && matrix.arch != 'arm64'
run: |
cd cimgui_impl
cmake -S . -B ./build -A ${{ matrix.cmake-arch }} -DCMAKE_TOOLCHAIN_FILE="./vcpkg/scripts/buildsystems/vcpkg.cmake" -DBACKENDS_GLFW_ONLY=ON -DIMGUI_WCHAR32=ON
- name: Build cimgui_impl
run: cmake --build cimgui_impl/build --config Release
- name: Move Windows binaries
if: matrix.os == 'windows-latest'
run: |
mv cimgui_impl/build/Release/*.dll cimgui_impl/build/
- name: Upload Artifacts
uses: actions/[email protected]
with:
name: cimgui_impl-${{ matrix.os }}-${{ matrix.arch }}-artifacts
path: |
cimgui_impl/build/*.dll
cimgui_impl/build/*.so
cimgui_impl/build/*.dylib
if-no-files-found: ignore # 'warn' or 'ignore' or 'error'