|
16 | 16 | - requested |
17 | 17 |
|
18 | 18 | jobs: |
19 | | - Windows: |
| 19 | + Build-Windows: |
20 | 20 | runs-on: windows-2025 |
| 21 | + name: Build - Windows |
| 22 | + |
| 23 | + defaults: |
| 24 | + run: |
| 25 | + working-directory: ${{ github.workspace }}/imgui |
| 26 | + |
21 | 27 | env: |
22 | 28 | VS_PATH: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\ |
23 | 29 | MSBUILD_PATH: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\ |
24 | 30 | steps: |
25 | | - - uses: actions/checkout@v4 |
| 31 | + - uses: actions/checkout@v5 |
| 32 | + with: |
| 33 | + path: ${{ github.workspace }}/imgui |
26 | 34 |
|
| 35 | + # The VulkanSDK libs for Windows is manually generated using build_windows_vulkan_libs.ps1 + attached to issue #8925. |
| 36 | + # (we have a .yml workflow in commit history if it becomes ever useful to create this on CI too) |
27 | 37 | - name: Install Dependencies |
28 | 38 | shell: powershell |
29 | 39 | run: | |
|
35 | 45 | Expand-Archive -Path SDL3-devel-3.2.18-VC.zip |
36 | 46 | echo "SDL3_DIR=$(pwd)\SDL3-devel-3.2.18-VC\SDL3-3.2.18\" >>${env:GITHUB_ENV} |
37 | 47 |
|
38 | | - # VulkanSDK (retrieve minimal bits of the SDK from git) |
39 | | - $vulkanVersion = "1.4.326" |
40 | | - # 1. Get the vulkan headers, we will treat that folder as the sdk folder to avoid having to copy headers around |
41 | | - Invoke-WebRequest -Uri "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/v$($vulkanVersion).zip" -OutFile Vulkan-Headers-$($vulkanVersion).zip |
42 | | - Expand-Archive -Path Vulkan-Headers-$($vulkanVersion).zip |
43 | | - echo "VULKAN_SDK=$(pwd)\Vulkan-Headers-$($vulkanVersion)\Vulkan-Headers-$($vulkanVersion)" >>${env:GITHUB_ENV} |
44 | | - # 2. Get and build the vulkan loader source code (UPDATE_DEPS=On will make it automatically fetch its dependencies) |
45 | | - Invoke-WebRequest -Uri "https://github.com/KhronosGroup/Vulkan-Loader/archive/refs/tags/v$($vulkanVersion).zip" -OutFile Vulkan-Loader-$($vulkanVersion).zip |
46 | | - Expand-Archive -Path Vulkan-Loader-$($vulkanVersion).zip |
47 | | - cmake -S Vulkan-Loader-$($vulkanVersion)\Vulkan-Loader-$($vulkanVersion) -B VulkanLoader-build -D UPDATE_DEPS=On |
48 | | - cmake --build VulkanLoader-build |
49 | | - # 3. Copy the built lib/dll to the expected place |
50 | | - mkdir Vulkan-Headers-$($vulkanVersion)\Vulkan-Headers-$($vulkanVersion)\Lib |
51 | | - copy VulkanLoader-build\loader\Debug\vulkan-1.* Vulkan-Headers-$($vulkanVersion)\Vulkan-Headers-$($vulkanVersion)\Lib\ |
| 48 | + Invoke-WebRequest -Uri "https://github.com/user-attachments/files/22464296/vulkan_windows_libs_1.4.326.zip" -OutFile vulkan_windows_libs_1.4.326.zip |
| 49 | + Expand-Archive -Path vulkan_windows_libs_1.4.326.zip |
| 50 | + echo "VULKAN_SDK=$(pwd)\vulkan_windows_libs_1.4.326\" >>${env:GITHUB_ENV} |
52 | 51 |
|
53 | 52 | - name: Fix Projects |
54 | 53 | shell: powershell |
|
70 | 69 | echo '#define IMGUI_IMPLEMENTATION' >> example_single_file.cpp |
71 | 70 | echo '#include "misc/single_file/imgui_single_file.h"' >> example_single_file.cpp |
72 | 71 | g++ -I. -Wall -Wformat -shared -o libimgui.dll -Wl,--out-implib,libimgui.a example_single_file.cpp -limm32 |
73 | | - g++ -I. -Wall -Wformat -DIMGUI_API='__declspec(dllimport)' -o example_null.exe examples/example_null/main.cpp -L. -limgui |
| 72 | + g++ -I. -Wall -Wformat -DIMGUI_API='__declspec(dllimport)' -DIMGUI_IMPL_API= -o example_null.exe examples/example_null/main.cpp -L. -limgui |
74 | 73 | rm -f example_null.exe libimgui.* example_single_file.* |
75 | 74 |
|
76 | 75 | - name: Build example_null (extra warnings, msvc 64-bit) |
@@ -115,7 +114,7 @@ jobs: |
115 | 114 | echo #include "misc/single_file/imgui_single_file.h" >> example_single_file.cpp |
116 | 115 |
|
117 | 116 | cl.exe /D_USRDLL /D_WINDLL /I. example_single_file.cpp /LD /FeImGui.dll /link |
118 | | - cl.exe /DIMGUI_API=__declspec(dllimport) /I. ImGui.lib /Feexample_null.exe examples/example_null/main.cpp |
| 117 | + cl.exe /DIMGUI_API=__declspec(dllimport) -DIMGUI_IMPL_API= /I. ImGui.lib /Feexample_null.exe examples/example_null/main.cpp |
119 | 118 |
|
120 | 119 | # Win64 examples are more frequently compilted than the Win32 examples. |
121 | 120 | # More of the Win32 examples requires 'workflow_run' to reduce waste. |
@@ -266,10 +265,18 @@ jobs: |
266 | 265 | shell: cmd |
267 | 266 | run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_win32_directx12/example_win32_directx12.vcxproj /p:Platform=x64 /p:Configuration=Release' |
268 | 267 |
|
269 | | - Linux: |
| 268 | + Build-Linux: |
270 | 269 | runs-on: ubuntu-latest |
| 270 | + name: Build - Linux |
| 271 | + |
| 272 | + defaults: |
| 273 | + run: |
| 274 | + working-directory: ${{ github.workspace }}/imgui |
| 275 | + |
271 | 276 | steps: |
272 | | - - uses: actions/checkout@v4 |
| 277 | + - uses: actions/checkout@v5 |
| 278 | + with: |
| 279 | + path: ${{ github.workspace }}/imgui |
273 | 280 |
|
274 | 281 | - name: Install Dependencies |
275 | 282 | run: | |
@@ -483,10 +490,18 @@ jobs: |
483 | 490 | - name: Build with IMGUI_IMPL_VULKAN_NO_PROTOTYPES |
484 | 491 | run: g++ -c -I. -std=c++11 -DIMGUI_IMPL_VULKAN_NO_PROTOTYPES=1 backends/imgui_impl_vulkan.cpp |
485 | 492 |
|
486 | | - MacOS: |
| 493 | + Build-MacOS: |
487 | 494 | runs-on: macos-latest |
| 495 | + name: Build - MacOS |
| 496 | + |
| 497 | + defaults: |
| 498 | + run: |
| 499 | + working-directory: ${{ github.workspace }}/imgui |
| 500 | + |
488 | 501 | steps: |
489 | | - - uses: actions/checkout@v4 |
| 502 | + - uses: actions/checkout@v5 |
| 503 | + with: |
| 504 | + path: ${{ github.workspace }}/imgui |
490 | 505 |
|
491 | 506 | - name: Install Dependencies |
492 | 507 | run: | |
@@ -557,20 +572,24 @@ jobs: |
557 | 572 | - name: Build example_apple_opengl2 |
558 | 573 | run: xcodebuild -project examples/example_apple_opengl2/example_apple_opengl2.xcodeproj -target example_osx_opengl2 |
559 | 574 |
|
560 | | - iOS: |
| 575 | + Build-iOS: |
561 | 576 | runs-on: macos-14 |
| 577 | + name: Build - iOS |
| 578 | + |
562 | 579 | steps: |
563 | | - - uses: actions/checkout@v4 |
| 580 | + - uses: actions/checkout@v5 |
564 | 581 |
|
565 | 582 | - name: Build example_apple_metal |
566 | 583 | run: | |
567 | 584 | # Code signing is required, but we disable it because it is irrelevant for CI builds. |
568 | 585 | xcodebuild -project examples/example_apple_metal/example_apple_metal.xcodeproj -target example_apple_metal_ios CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO |
569 | 586 |
|
570 | | - Emscripten: |
| 587 | + Build-Emscripten: |
571 | 588 | runs-on: ubuntu-latest |
| 589 | + name: Build - Emscripten |
| 590 | + |
572 | 591 | steps: |
573 | | - - uses: actions/checkout@v4 |
| 592 | + - uses: actions/checkout@v5 |
574 | 593 |
|
575 | 594 | - name: Install Dependencies |
576 | 595 | run: | |
@@ -608,12 +627,148 @@ jobs: |
608 | 627 | emcmake cmake -B build -DCMAKE_BUILD_TYPE=Release examples/example_glfw_wgpu |
609 | 628 | cmake --build build |
610 | 629 |
|
611 | | - Android: |
| 630 | + Build-Android: |
612 | 631 | runs-on: ubuntu-latest |
| 632 | + name: Build - Android |
| 633 | + |
613 | 634 | steps: |
614 | | - - uses: actions/checkout@v4 |
| 635 | + - uses: actions/checkout@v5 |
615 | 636 |
|
616 | 637 | - name: Build example_android_opengl3 |
617 | 638 | run: | |
618 | 639 | cd examples/example_android_opengl3/android |
619 | 640 | gradle assembleDebug --stacktrace |
| 641 | +
|
| 642 | + Test-Windows: |
| 643 | + runs-on: windows-2025 |
| 644 | + name: Test - Windows |
| 645 | + |
| 646 | + defaults: |
| 647 | + run: |
| 648 | + working-directory: ${{ github.workspace }}/imgui |
| 649 | + |
| 650 | + env: |
| 651 | + MSBUILD_PATH: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\ |
| 652 | + |
| 653 | + steps: |
| 654 | + - uses: actions/checkout@v5 |
| 655 | + with: |
| 656 | + path: ${{ github.workspace }}/imgui |
| 657 | + |
| 658 | + - uses: actions/checkout@v5 |
| 659 | + continue-on-error: true |
| 660 | + with: |
| 661 | + fetch-depth: 1 |
| 662 | + repository: ocornut/imgui_test_engine |
| 663 | + path: ${{ github.workspace }}/imgui_test_engine |
| 664 | + submodules: true |
| 665 | + |
| 666 | + - name: Fix Tests Projects |
| 667 | + shell: powershell |
| 668 | + working-directory: ${{ github.workspace }}/imgui_test_engine |
| 669 | + run: | |
| 670 | + # WARNING: This will need updating if toolset/sdk change in project files! |
| 671 | + gci -recurse -filter "*.vcxproj" | ForEach-Object { |
| 672 | + # Fix SDK and toolset for most samples. |
| 673 | + (Get-Content $_.FullName) -Replace "<PlatformToolset>v110</PlatformToolset>","<PlatformToolset>v142</PlatformToolset>" | Set-Content -Path $_.FullName |
| 674 | + (Get-Content $_.FullName) -Replace "<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>","<WindowsTargetPlatformVersion>10.0.20348.0</WindowsTargetPlatformVersion>" | Set-Content -Path $_.FullName |
| 675 | + # Fix SDK and toolset for samples that require newer SDK/toolset. At the moment it is only dx12. |
| 676 | + (Get-Content $_.FullName) -Replace "<PlatformToolset>v140</PlatformToolset>","<PlatformToolset>v142</PlatformToolset>" | Set-Content -Path $_.FullName |
| 677 | + (Get-Content $_.FullName) -Replace "<WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>","<WindowsTargetPlatformVersion>10.0.20348.0</WindowsTargetPlatformVersion>" | Set-Content -Path $_.FullName |
| 678 | + } |
| 679 | +
|
| 680 | + - name: Build Tests |
| 681 | + shell: cmd |
| 682 | + working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite |
| 683 | + run: '"%MSBUILD_PATH%\MSBuild.exe" imgui_test_suite.vcxproj /p:Platform=x64 /p:Configuration=Release /p:ClFlags=/WX -maxcpucount:%NUMBER_OF_PROCESSORS%' |
| 684 | + |
| 685 | + - name: Run Tests |
| 686 | + working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite |
| 687 | + run: Release/imgui_test_suite.exe -nogui -nopause -v2 -ve4 tests |
| 688 | + |
| 689 | + - name: Check for Docking |
| 690 | + id: check_docking |
| 691 | + shell: bash |
| 692 | + working-directory: ${{ github.workspace }}/imgui |
| 693 | + run: echo "has_dock=$(grep -q "#define IMGUI_HAS_DOCK" imgui.h && echo true || echo false)" >> $GITHUB_OUTPUT |
| 694 | + |
| 695 | + - name: Run Viewport Tests |
| 696 | + if: steps.check_docking.outputs.has_dock == 'true' |
| 697 | + working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite |
| 698 | + run: Release/imgui_test_suite.exe -nogui -nopause -v2 -ve4 -viewport-mock viewport |
| 699 | + |
| 700 | + Test-Linux: |
| 701 | + runs-on: ubuntu-latest |
| 702 | + name: Test - Linux |
| 703 | + |
| 704 | + defaults: |
| 705 | + run: |
| 706 | + working-directory: ${{ github.workspace }}/imgui |
| 707 | + |
| 708 | + steps: |
| 709 | + - uses: actions/checkout@v5 |
| 710 | + with: |
| 711 | + path: ${{ github.workspace }}/imgui |
| 712 | + |
| 713 | + - uses: actions/checkout@v5 |
| 714 | + with: |
| 715 | + fetch-depth: 1 |
| 716 | + repository: ocornut/imgui_test_engine |
| 717 | + path: ${{ github.workspace }}/imgui_test_engine |
| 718 | + submodules: true |
| 719 | + |
| 720 | + - name: Build Tests |
| 721 | + working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite |
| 722 | + run: make -j$(nproc) |
| 723 | + |
| 724 | + - name: Run Tests |
| 725 | + working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite |
| 726 | + run: ./imgui_test_suite -nogui -nopause -v2 -ve4 tests |
| 727 | + |
| 728 | + - name: Check for Docking |
| 729 | + id: check_docking |
| 730 | + working-directory: ${{ github.workspace }}/imgui |
| 731 | + run: echo "has_dock=$(grep -q "#define IMGUI_HAS_DOCK" imgui.h && echo true || echo false)" >> $GITHUB_OUTPUT |
| 732 | + |
| 733 | + - name: Run Viewport Tests |
| 734 | + if: steps.check_docking.outputs.has_dock == 'true' |
| 735 | + working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite |
| 736 | + run: ./imgui_test_suite -nogui -nopause -v2 -ve4 -viewport-mock viewport |
| 737 | + |
| 738 | + Test-MacOS: |
| 739 | + runs-on: macos-latest |
| 740 | + name: Test - MacOS |
| 741 | + |
| 742 | + defaults: |
| 743 | + run: |
| 744 | + working-directory: ${{ github.workspace }}/imgui |
| 745 | + |
| 746 | + steps: |
| 747 | + - uses: actions/checkout@v5 |
| 748 | + with: |
| 749 | + path: ${{ github.workspace }}/imgui |
| 750 | + |
| 751 | + - uses: actions/checkout@v5 |
| 752 | + with: |
| 753 | + fetch-depth: 1 |
| 754 | + repository: ocornut/imgui_test_engine |
| 755 | + path: ${{ github.workspace }}/imgui_test_engine |
| 756 | + submodules: true |
| 757 | + |
| 758 | + - name: Build Tests |
| 759 | + working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite |
| 760 | + run: make -j$(nproc) |
| 761 | + |
| 762 | + - name: Run Tests |
| 763 | + working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite |
| 764 | + run: ./imgui_test_suite -nogui -nopause -v2 -ve4 tests |
| 765 | + |
| 766 | + - name: Check for Docking |
| 767 | + id: check_docking |
| 768 | + working-directory: ${{ github.workspace }}/imgui |
| 769 | + run: echo "has_dock=$(grep -q "#define IMGUI_HAS_DOCK" imgui.h && echo true || echo false)" >> $GITHUB_OUTPUT |
| 770 | + |
| 771 | + - name: Run Viewport Tests |
| 772 | + if: steps.check_docking.outputs.has_dock == 'true' |
| 773 | + working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite |
| 774 | + run: ./imgui_test_suite -nogui -nopause -v2 -ve4 -viewport-mock viewport |
0 commit comments