Skip to content

Commit

Permalink
Merge pull request #377 from expipiplus1/vulkan-update-v1.2.210
Browse files Browse the repository at this point in the history
  • Loading branch information
expipiplus1 authored Apr 6, 2022
2 parents 4f20aee + 11535c2 commit 4e3905c
Show file tree
Hide file tree
Showing 103 changed files with 6,154 additions and 1,908 deletions.
85 changes: 46 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,13 @@ jobs:
if: matrix.os == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install libvulkan-dev glslang-tools libsdl2-dev
sudo apt-get install libsdl2-dev
- name: Install system dependencies macOS
if: matrix.os == 'macOS-latest'
shell: bash
run: |
brew install pkg-config sdl2
brew tap apenngrace/homebrew-vulkan
brew install --cask vulkan-sdk --verbose ||
brew install --cask vulkan-sdk --verbose ||
brew install --cask vulkan-sdk --verbose
- name: Install system dependencies Windows
if: matrix.os == 'windows-latest'
Expand All @@ -61,27 +57,31 @@ jobs:
printf "%s\n" "$SDL2/bin" >> "$GITHUB_PATH"
printf "%s\n" "PKG_CONFIG_PATH=$SDL2/lib/pkgconfig" >> "$GITHUB_ENV"
choco install vulkan-sdk
VulkanSDK=$(cygpath --windows --absolute /c/VulkanSDK/*/)
printf "%s\n" "$VulkanSDK/Bin" >> "$GITHUB_PATH"
curl -L https://sdk.lunarg.com/sdk/download/latest/windows/vulkan-runtime-components.zip?u= > vulkan-runtime-components.zip
unzip vulkan-runtime-components.zip
printf "%s\n" "$(cygpath --windows --absolute VulkanRT-*/x64)" >> "$GITHUB_PATH"
cat >> cabal.project <<EOF
package sdl2
extra-lib-dirs: $SDL2/lib/
extra-include-dirs: $SDL2/include/SDL2/
EOF
package vulkan
extra-lib-dirs: $VulkanSDK/Lib/
package vulkan-utils
extra-include-dirs: $VulkanSDK/Include/
- name: Prepare Vulkan SDK
uses: humbletim/[email protected]
with:
vulkan-query-version: latest
vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang
vulkan-use-cache: true

package VulkanMemoryAllocator
extra-include-dirs: $VulkanSDK/Include/
- name: Inform Cabal about Vulkan
shell: bash
run: |
cat >> cabal.project <<EOF
extra-lib-dirs: $VULKAN_SDK/lib/
extra-include-dirs: $VULKAN_SDK/include/
EOF
printf "%s\n" "$VULKAN_SDK/bin" >> "$GITHUB_PATH"
if uname -s | grep -i mingw; then sep=';'; else sep=':'; fi
printf "%s\n" "PKG_CONFIG_PATH=${PKG_CONFIG_PATH:+${PKG_CONFIG_PATH}${sep}}$VULKAN_SDK/lib/pkgconfig" >> "$GITHUB_ENV"
# until this is fixed https://github.com/haskell/cabal/issues/7339
printf "%s\n" "DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH:+${DYLD_LIBRARY_PATH}${sep}}$VULKAN_SDK/lib" >> "$GITHUB_ENV"
- name: Remove openxr
run: |
Expand Down Expand Up @@ -157,11 +157,14 @@ jobs:
${{ runner.os }}-stack-global-${{ matrix.stack-args }}
${{ runner.os }}-stack-global
- name: Set up yq
uses: frenck/action-setup-yq@v1

- name: Install system dependencies Linux
if: matrix.os == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install libvulkan-dev glslang-tools libsdl2-dev
sudo apt-get install libsdl2-dev
- name: Install system dependencies Windows
if: matrix.os == 'windows-latest'
Expand All @@ -174,47 +177,51 @@ jobs:
printf "%s\n" "$SDL2/bin" >> "$GITHUB_PATH"
printf "%s\n" "PKG_CONFIG_PATH=$SDL2/lib/pkgconfig" >> "$GITHUB_ENV"
choco install vulkan-sdk
VulkanSDK=$(cygpath --windows --absolute /c/VulkanSDK/*/)
printf "%s\n" "$VulkanSDK/Bin" >> "$GITHUB_PATH"
curl -L https://sdk.lunarg.com/sdk/download/latest/windows/vulkan-runtime-components.zip?u= > vulkan-runtime-components.zip
unzip vulkan-runtime-components.zip
printf "%s\n" "$(cygpath --windows --absolute VulkanRT-*/x64)" >> "$GITHUB_PATH"
cat >> stack.yaml <<EOF
extra-lib-dirs:
- $SDL2/lib/
- $VulkanSDK/Lib/
extra-include-dirs:
- $SDL2/include/SDL2/
- $VulkanSDK/Include/
EOF
yq --inplace ".\"extra-lib-dirs\" += [\"$SDL2/lib/\"]" stack.yaml
yq --inplace ".\"extra-include-dirs\" += [\"$SDL2/include/\"]" stack.yaml
- name: Install system dependencies macOS
if: matrix.os == 'macOS-latest'
shell: bash
run: |
brew install pkg-config sdl2
brew tap apenngrace/homebrew-vulkan --verbose
brew install --cask vulkan-sdk --verbose ||
brew install --cask vulkan-sdk --verbose ||
brew install --cask vulkan-sdk --verbose
- name: Prepare Vulkan SDK
uses: humbletim/[email protected]
with:
vulkan-query-version: latest
vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang
vulkan-use-cache: true

- name: Inform Stack about Vulkan
shell: bash
run: |
yq --inplace ".\"extra-lib-dirs\" += [\"$VULKAN_SDK/lib/\"]" stack.yaml
yq --inplace ".\"extra-include-dirs\" += [\"$VULKAN_SDK/include/\"]" stack.yaml
printf "%s\n" "$VULKAN_SDK/bin" >> "$GITHUB_PATH"
if uname -s | grep -i mingw; then sep=';'; else sep=':'; fi
printf "%s\n" "PKG_CONFIG_PATH=${PKG_CONFIG_PATH:+${PKG_CONFIG_PATH}${sep}}$VULKAN_SDK/lib/pkgconfig" >> "$GITHUB_ENV"
# until this is fixed https://github.com/haskell/cabal/issues/7339
printf "%s\n" "DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH:+${DYLD_LIBRARY_PATH}${sep}}$VULKAN_SDK/lib" >> "$GITHUB_ENV"
- name: Remove openxr
run: |
sed -ibak '/openxr/d' stack.yaml
- name: Install dependencies
shell: bash
run: stack build $ARGS --test --bench --only-dependencies
env:
ARGS: ${{ matrix.stack-args }}

- name: Build
shell: bash
run: stack build $ARGS
env:
ARGS: ${{ matrix.stack-args }}

- name: Build documentation
shell: bash
run: stack haddock $ARGS
env:
ARGS: ${{ matrix.stack-args }}
Expand Down
2 changes: 1 addition & 1 deletion VulkanMemoryAllocator/VulkanMemoryAllocator
4 changes: 2 additions & 2 deletions VulkanMemoryAllocator/VulkanMemoryAllocator.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cabal-version: 2.2
-- see: https://github.com/sol/hpack

name: VulkanMemoryAllocator
version: 0.9
version: 0.10
synopsis: Bindings to the VulkanMemoryAllocator library
category: Graphics
homepage: https://github.com/expipiplus1/vulkan#readme
Expand Down Expand Up @@ -96,7 +96,7 @@ library
, bytestring
, transformers
, vector
, vulkan >=3.6 && <3.17
, vulkan >=3.6 && <3.18
if flag(safe-foreign-calls)
cpp-options: -DSAFE_FOREIGN_CALLS
if flag(vma-ndebug)
Expand Down
5 changes: 5 additions & 0 deletions VulkanMemoryAllocator/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## WIP

## [0.10] - 2022-03-31
- Bump VMA to 3.0.0
- Several breaking changes
- Raise upper bound on `vulkan`

## [0.9] - 2022-02-05
- Bump VMA
- Vulkan 1.3 support
Expand Down
4 changes: 2 additions & 2 deletions VulkanMemoryAllocator/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: VulkanMemoryAllocator
version: "0.9"
version: "0.10"
synopsis: Bindings to the VulkanMemoryAllocator library
category: Graphics
maintainer: Ellie Hermaszewska <[email protected]>
Expand All @@ -20,7 +20,7 @@ library:
src/lib.cpp
dependencies:
- base <5
- vulkan >= 3.6 && < 3.17
- vulkan >= 3.6 && < 3.18
- bytestring
- transformers
- vector
Expand Down
Loading

0 comments on commit 4e3905c

Please sign in to comment.