Skip to content

Commit

Permalink
mac: Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
IonAgorria committed Jun 14, 2024
1 parent 91c9be8 commit c03668a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 27 deletions.
29 changes: 5 additions & 24 deletions .github/workflows/macos_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ on:
- ready_for_review

env:
VULKAN_SDK_VERSION: '1.3.250.1'
VULKAN_LIB_VERSION: '1.3.250'
MACOSX_DEPLOYMENT_TARGET: '10.15'
GH_CACHE_KEY: 10
GH_CACHE_KEY: 1

jobs:
build:
Expand All @@ -32,28 +30,14 @@ jobs:
- name: install libs
run: |
brew install ninja yasm dylibbundler \
libvpx boost meson cmake zlib \
libvpx boost cmake zlib \
sdl2 sdl2_image sdl2_mixer sdl2_net
- uses: actions/cache@v4
id: cache
with:
path: |
vulkansdk-macos.dmg
ffmpeg
key: MacOS-${{ env.VULKAN_SDK_VERSION }}-${{ env.GH_CACHE_KEY }}
- name: download Vulkan SDK
if: steps.cache.outputs.cache-hit != 'true'
run: |
wget https://sdk.lunarg.com/sdk/download/${{ env.VULKAN_SDK_VERSION }}/mac/vulkansdk-macos-${{ env.VULKAN_SDK_VERSION }}.dmg?Human=true -O vulkansdk-macos.dmg
- name: install Vulkan SDK
run: |
hdiutil attach vulkansdk-macos.dmg
sudo /Volumes/VulkanSDK/InstallVulkan.app/Contents/MacOS/InstallVulkan --root ~/VulkanSDK --accept-licenses --default-answer --confirm-command install
sync
cd ~/VulkanSDK/
sudo ./install_vulkan.py
sleep 10
hdiutil detach /Volumes/VulkanSDK
key: MacOS-${{ env.GH_CACHE_KEY }}
- name: ffmpeg -- download
if: steps.cache.outputs.cache-hit != 'true'
run: git clone --depth 1 --branch n6.1 https://git.ffmpeg.org/ffmpeg.git ffmpeg
Expand Down Expand Up @@ -94,7 +78,7 @@ jobs:
- name: perimeter -- create build dir
run: mkdir build
- name: perimeter -- configure
run: cmake .. -G Ninja -DCMAKE_BUILD_TYPE=${{matrix.env.build_type}} ${{matrix.env.cmake}}
run: cmake .. -G Ninja -DCMAKE_BUILD_TYPE=${{matrix.env.build_type}} -DOPTION_D3D9=OFF ${{matrix.env.cmake}}
working-directory: build
- name: perimeter -- build project
run: ninja
Expand All @@ -104,10 +88,7 @@ jobs:
working-directory: build
- name: perimeter -- strip
run: |
if [[ -d output/lib ]]; then
strip -x output/lib/*
fi
strip -x output/bin/*
strip -x output/bundle/perimeter.app/Contents/MacOS/*
working-directory: build
#TODO update package.sh to handle cmake install result
#- name: perimeter -- package app
Expand Down
8 changes: 5 additions & 3 deletions Source/Game/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,11 @@ IF(APPLE)
SET_TARGET_PROPERTIES(perimeter PROPERTIES
MACOSX_BUNDLE TRUE
MACOSX_BUNDLE_INFO_PLIST "${PROJECT_SOURCE_DIR}/macos/DebugInfo.plist"
BUNDLE DESTINATION ${CMAKE_SOURCE_DIR}
)
ELSE()
SET_TARGET_PROPERTIES(perimeter PROPERTIES
MACOSX_BUNDLE TRUE
MACOSX_BUNDLE_INFO_PLIST "${PROJECT_SOURCE_DIR}/macos/Perimeter.app.template/Contents/Info.plist"
BUNDLE DESTINATION ${CMAKE_SOURCE_DIR}
)
ENDIF()
ENDIF()
Expand All @@ -187,4 +185,8 @@ ENDIF()
target_link_libraries(perimeter PRIVATE ${perimeter_LINK_LIBS})

#Install rules
install (TARGETS perimeter RUNTIME)
install (TARGETS perimeter
RUNTIME
LIBRARY
BUNDLE DESTINATION bundle
)

0 comments on commit c03668a

Please sign in to comment.