Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
133 changes: 118 additions & 15 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,33 +20,36 @@ jobs:
GLFW_INCLUDE: /usr/include
GLFW_LIB: /usr/lib/x86_64-linux-gnu
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
path: source/demo
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: antono2/imgui
ref: ddda851313cfe08038c32694123763dff34d2a4e
path: source/modules/antono2/imgui
submodules: recursive
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: antono2/vulkan
ref: v2.0.0
path: source/modules/antono2/vulkan
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: antono2/glfw
ref: e9a367938577919b4a5140a477c1250112978d8e
path: source/modules/antono2/glfw
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: vlang/v
ref: 1f128c94619fb6e4863c5f81883e1b860405c8fa
path: toolchain/v
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: vlang/vc
ref: 4a1ba4d772f19c2752c9850d3b5421c71f54a4d6
path: toolchain/v/vc
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: vlang/tccbin
ref: d6e7ac1b1bcc98aed734a6ecbfa8509f24606c74
Expand Down Expand Up @@ -74,35 +77,36 @@ jobs:
env:
VMODULES: ${{ github.workspace }}/source/modules
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
path: source/demo
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: antono2/imgui
ref: ddda851313cfe08038c32694123763dff34d2a4e
path: source/modules/antono2/imgui
submodules: recursive
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: antono2/vulkan
ref: d9ad9fc5151aa19f58cd2fed1b6bcda9b210f098
ref: v2.0.0
path: source/modules/antono2/vulkan
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: antono2/glfw
ref: 3d7c1ddacb7215a7bbeb5fef0d7a68c90ba392ed
path: source/modules/antono2/glfw
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: vlang/v
ref: 1f128c94619fb6e4863c5f81883e1b860405c8fa
path: toolchain/v
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: vlang/vc
ref: 4a1ba4d772f19c2752c9850d3b5421c71f54a4d6
path: toolchain/v/vc
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: zeux/volk
ref: 58689c063427f5bad4f133625049b1a3c5dd8287
Expand Down Expand Up @@ -161,6 +165,105 @@ jobs:
if (-not (Test-Path $Artifact)) { throw "Missing Windows artifact: $Artifact" }
}

strict-v3-frontend:
name: Required pinned V3 frontend
runs-on: ubuntu-24.04
timeout-minutes: 45
env:
VMODULES: ${{ github.workspace }}/source/modules
VULKAN_SDK: /usr
GLFW_INCLUDE: /usr/include
GLFW_LIB: /usr/lib/x86_64-linux-gnu
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
path: source/demo
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: antono2/imgui
ref: ddda851313cfe08038c32694123763dff34d2a4e
path: source/modules/antono2/imgui
submodules: recursive
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: antono2/vulkan
ref: 42e6c381e37952ef07f4cd560c9996fd2435cd41
path: source/modules/antono2/vulkan
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: antono2/glfw
ref: e9a367938577919b4a5140a477c1250112978d8e
path: source/modules/antono2/glfw
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: vlang/v
ref: f59b886d2564e37d8626d715236fdfa928e13dda
path: toolchain/v
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: vlang/vc
ref: 4598bc7e4894c154b27391e4442005fff2fbbd68
path: toolchain/v/vc
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: vlang/tccbin
ref: d6e7ac1b1bcc98aed734a6ecbfa8509f24606c74
path: toolchain/v/thirdparty/tcc
- name: Build pinned V3 compiler
run: |
make -C toolchain/v local=1
echo "$GITHUB_WORKSPACE/toolchain/v" >> "$GITHUB_PATH"
- name: Check demo with V3
run: v -new-compiler -check -path "$VMODULES/antono2|@vlib|@vmodules" source/demo

linux-v-master:
name: Advisory current V master and dependency masters
continue-on-error: true
runs-on: ubuntu-24.04
timeout-minutes: 45
env:
VMODULES: ${{ github.workspace }}/source/modules
VULKAN_SDK: /usr
GLFW_INCLUDE: /usr/include
GLFW_LIB: /usr/lib/x86_64-linux-gnu
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
path: source/demo
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: antono2/imgui
ref: master
path: source/modules/antono2/imgui
submodules: recursive
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: antono2/vulkan
ref: master
path: source/modules/antono2/vulkan
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: antono2/glfw
ref: master
path: source/modules/antono2/glfw
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: vlang/v
ref: master
path: toolchain/v
- name: Build current V master
run: |
make -C toolchain/v
echo "$GITHUB_WORKSPACE/toolchain/v" >> "$GITHUB_PATH"
- name: Install native dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential cmake libglfw3-dev libvulkan-dev libvulkan-volk-dev pkg-config
- name: Build and compile demo with V3
run: |
cd source/modules/antono2/imgui
v run build_vimgui.vsh --linkage shared --glfw system
cd "$GITHUB_WORKSPACE"
v -no-memory-limit -path "$VMODULES/antono2|@vlib|@vmodules" -cc gcc -o "$RUNNER_TEMP/v_imgui_demo" source/demo

required-checks:
if: always()
needs: [ubuntu24, windows2022]
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

This repository contains the GLFW/Vulkan example used to validate the
[`antono2/imgui`](https://github.com/antono2/imgui) V bindings.
The required CI builds use `antono2.vulkan@v2.0.0` and fixed ImGui, GLFW,
and V compiler revisions. An advisory job checks their moving master branches.

## Recommended quick start

Expand Down
4 changes: 2 additions & 2 deletions examples/glfw_vulkan/main.c.v
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ pub fn main() {
if fb_width > 0 && fb_height > 0
&& (app.swapchain_rebuild || app.main_window_data.width != fb_width || app.main_window_data.height != fb_height) {
impl_vulkan.set_min_image_count(app.min_image_count)
impl_vulkan.create_or_resize_window(app.instance, app.physical_device, app.device, wd, app.queue_family, app.allocator, fb_width, fb_height, app.min_image_count)
impl_vulkan.create_or_resize_window(app.instance, app.physical_device, app.device, mut wd, app.queue_family, app.allocator, fb_width, fb_height, app.min_image_count)
app.main_window_data.frame_index = 0
app.swapchain_rebuild = false
}
Expand Down Expand Up @@ -468,7 +468,7 @@ pub fn (mut app App) setup_vulkan_window(mut wd &impl_vulkan.Window, surface vk.

// Create SwapChain, RenderPass, Framebuffer, etc.
assert app.min_image_count >= 2
impl_vulkan.create_or_resize_window(app.instance, app.physical_device, app.device, wd, app.queue_family, app.allocator, width, height, app.min_image_count)
impl_vulkan.create_or_resize_window(app.instance, app.physical_device, app.device, mut wd, app.queue_family, app.allocator, width, height, app.min_image_count)
}

pub fn (mut app App) frame_render(mut wd impl_vulkan.Window, draw_data &imgui.ImDrawData) {
Expand Down
Loading