Skip to content

Conversation

Mrkol
Copy link

@Mrkol Mrkol commented Aug 28, 2024

Trivial compilation test is required because the sample is windows-specific. Linux CI is needed because pull requests must stop breaking linux builds. The tiny m_Handle(VMA_NULL) -> m_Handle() fix is needed to fix linux CI.

As promised @adam-sawicki-a . Same day delivery because my CI is still broken =)
(I will stop using master for my builds soon, I promise)

Compilation test is required because the smaple is windows-specific.
Linux CI is needed because pull requests must stop breaking linux builds.
return allocation->GetWin32Handle(allocator, hTargetProcess, pHandle);
}
#endif // VMA_EXTERNAL_MEMORY_WIN32
#endif // VMA_EXTERNAL_MEMORY_WIN32
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that you change many lines that are unrelated to your change due to using some automated formatting tools. Changes like this make it difficult to analyze the history of a file later (like "blame" function).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mrkol Let me know if you need help doing this :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to reuse VulkanSample app for testing compilation on Linux instead of creating a new project? VulkanSample.cpp and VmaUsage.* files already have appropriate #ifdef-s and even some Clang-specific #pragma directives.

Copy link
Contributor

@IAmNotHanni IAmNotHanni Mar 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean we have to port VulkanSample app to Linux? I would be happy to help, but note that this would require glfw library most likely (#169).

@IAmNotHanni
Copy link
Contributor

Does this pull request mean you want to move away from appveyor and use just GitHub actions instead? I could help with that. In my opinion, it would be nice to have a CI for Windows and Linux and both Debug and Release.

@adam-sawicki-a
Copy link
Contributor

@IAmNotHanni Help is very welcome. It would be good to have CI builds set up for both Windows and Linux using some free online service. We had AppVeyor for Windows and TravisCI for Linux. Unfortunately, TravisCI stopped working >2 years ago. AppVeyor is still testing Windows.

It is enough to test if the library compiles successfully (both public interface and the code under VMA_IMPLEMENTATION).

Running some actual tests in CI could be considered in the future, but that would require access to some Vulkan implementation on the server (a GPU or software emulation) and likely major changes in the sample app and testing code, which I would prefer to avoid. The problem is I use Windows at work and I don't have a local Linux development environment to be able to test and fix things.

@adam-sawicki-a
Copy link
Contributor

The proposed code fails with error:

Error: This request has been automatically failed because it uses a deprecated version of actions/cache: v2. Please update your workflow to use v3/v4 of actions/cache to avoid interruptions. Learn more: https://github.blog/changelog/2024-12-05-notice-of-upcoming-releases-and-breaking-changes-for-github-actions/#actions-cache-v1-v2-and-actions-toolkit-cache-package-closing-down

@IAmNotHanni
Copy link
Contributor

IAmNotHanni commented Apr 2, 2025

The proposed code fails with error:

Error: This request has been automatically failed because it uses a deprecated version of actions/cache: v2. Please update your workflow to use v3/v4 of actions/cache to avoid interruptions. Learn more: https://github.blog/changelog/2024-12-05-notice-of-upcoming-releases-and-breaking-changes-for-github-actions/#actions-cache-v1-v2-and-actions-toolkit-cache-package-closing-down

Use actions/checkout@v4 like in here:

uses: actions/checkout@v4

@adam-sawicki-a
Copy link
Contributor

File ".github/workflows/linux.yaml" added by this change uses "actions/checkout@v4". I think it's the external repository "humbletim/[email protected]" referenced by this change that triggers this error. I think we should just download and install Vulkan SDK (or just its headers) without referencing such external repository.

@IAmNotHanni
Copy link
Contributor

IAmNotHanni commented Apr 3, 2025

File ".github/workflows/linux.yaml" added by this change uses "actions/checkout@v4". I think it's the external repository "humbletim/[email protected]" referenced by this change that triggers this error. I think we should just download and install Vulkan SDK (or just its headers) without referencing such external repository.

Yes, it should be downloaded directly like this for example:

- name: Install Vulkan SDK
  shell: bash
  run: |
    curl -LS -o vulkansdk.tar.xz https://sdk.lunarg.com/sdk/download/${{ env.VMA_VULKAN_VERSION }}/linux/vulkansdk-linux-x86_64-${{ env.VMA_VULKAN_VERSION }}.tar.xz
    echo "${{ env.VMA_VULKAN_SDK_CHECKSUM_LINUX }} vulkansdk.tar.xz" | sha256sum --check
    mkdir -p ${{ env.VMA_VULKAN_SDK_PATH }}
    tar xf vulkansdk.tar.xz -C "${{ env.VMA_VULKAN_SDK_PATH }}"
    rm -rf vulkansdk.tar.xz

@IAmNotHanni
Copy link
Contributor

IAmNotHanni commented Apr 3, 2025

@adam-sawicki-a Looking at the recent changes you pushed to master branch (0183545), one thing which points out to me is that clang and gcc seem to display no warnings at all in the CI build. In my experience, gcc and clang are much more detailed with warnings and they usually catch things which MSVC does not report by default. Maybe flags like -Wall and -Wextra are required to display any warnings?

@adam-sawicki-a
Copy link
Contributor

Yes, this sounds like a good idea as long as those warnings don't fail the build. Can you please propose such change?

@IAmNotHanni
Copy link
Contributor

Also, don't forget that in VmaSample code, there are a lot of #indef _WIN32, so on Linux, no code is realyl compiled from the tests. I guess the library itself is compiled though? I'm still working on #466 so we can have unit tests in the console on Linux :)

@adam-sawicki-a
Copy link
Contributor

I added Linux CI build as #477, based on this ticket. Thank you very much for your help with it.

@IAmNotHanni
Copy link
Contributor

Yes, this sounds like a good idea as long as those warnings don't fail the build. Can you please propose such change?

Yes, let me see..

@adam-sawicki-a
Copy link
Contributor

Also, don't forget that in VmaSample code, there are a lot of #indef _WIN32, so on Linux, no code is realyl compiled from the tests. I guess the library itself is compiled though? I'm still working on #466 so we can have unit tests in the console on Linux :)

Yes, the library is compiled. I made a syntax error in "vk_mem_alloc.h" to check if the build fails - it does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants