Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Lets go

Lets go #8

Workflow file for this run

name: Build
on:
push:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- uses: actions/checkout@v1
- name: Install Dependencies
shell: bash
env:
GITHUB_OS: ${{ matrix.os }}
run: |
if [ "$GITHUB_OS" == "macOS-latest" ];
then
brew install luajit gnu-sed
echo "$(brew --prefix)/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH
elif [ "$GITHUB_OS" == "ubuntu-latest" ];
then
sudo apt-get install -y luajit
elif [ "$GITHUB_OS" == "windows-latest" ];
then
vcpkg install luajit:x64-windows
echo "/C/vcpkg/installed/x64-windows/tools/luajit" >> $GITHUB_PATH
echo "/C/vcpkg/installed/x64-windows/bin" >> $GITHUB_PATH
fi
- name: Download Submodules
run: |
git submodule update --init --recursive
if: github.event_name != 'schedule'
- name: Download Latest ImGui
shell: bash
run: |
rm -rf imgui
git clone https://github.com/ocornut/imgui.git
if: github.event_name == 'schedule'
- name: Patch ImGui Win32 Backend
shell: bash
env:
GITHUB_OS: ${{ matrix.os }}
run: |
# First verify the file exists
if [ ! -f "imgui/backends/imgui_impl_win32.h" ]; then
echo "Error: imgui_impl_win32.h not found at expected path"
ls -R imgui/
exit 1
fi
if [ "$GITHUB_OS" == "windows-latest" ]; then
powershell -Command "(Get-Content imgui/backends/imgui_impl_win32.h) -replace '#if 0[\s\S]*?extern', 'extern' -replace '#endif', '' | Set-Content imgui/backends/imgui_impl_win32.h"
else
sed -i -e '/#if 0/d' -e '/#endif/d' imgui/backends/imgui_impl_win32.h
fi
- name: Generate Bindings
shell: bash
run: |
cd ./generator
bash ./generator.sh
- name: Upload Generator Output
uses: actions/upload-artifact@v4
with:
name: generator-output-${{ matrix.os }}
path: |
generator/output/
cimgui.cpp
cimgui.h
- name: CMake
run: |
mkdir cmake-build
cd cmake-build
cmake -DCIMGUI_TEST=1 ..
- name: Build
working-directory: cmake-build
run: |
cmake --build .
- name: Test
shell: bash
env:
GITHUB_OS: ${{ matrix.os }}
working-directory: cmake-build
run: |
if [ "$GITHUB_OS" == "windows-latest" ];
then
./Debug/cimgui_test.exe
else
./cimgui_test
fi