Skip to content

Fix ET survival maps #218

Fix ET survival maps

Fix ET survival maps #218

Workflow file for this run

name: MacOS Build
on:
push:
pull_request:
types:
- opened
- reopened
- synchronize
- 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
jobs:
build:
strategy:
fail-fast: false
matrix:
env: [
{build_type: Debug, cmake: ""},
{build_type: Release, cmake: ""}
]
name: ${{matrix.env.build_type}}
if: github.event.pull_request.draft != true
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: install libs
run: |
brew install ninja yasm dylibbundler \
libvpx boost meson 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
- 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
- name: ffmpeg -- configure
if: steps.cache.outputs.cache-hit != 'true'
run: ./configure
--prefix=/usr/local
--enable-shared --disable-static
--cc="clang"
--extra-cflags="-arch arm64"
--extra-ldflags="-arch arm64"
--target-os=darwin
--sysroot=$(xcrun --sdk macosx --show-sdk-path)
--disable-everything
--enable-swscale
--enable-swresample
--enable-zlib
--enable-libvpx
--enable-demuxer=rawvideo,bink,matroska
--enable-decoder=rawvideo,bink,binkaudio_dct,opus,vp8,vp9
--enable-parser=vp9
--enable-filter=aresample,aformat
--enable-protocol=file
--disable-d3d11va
--disable-dxva2
--disable-vulkan
--disable-network
--disable-doc --disable-ffplay --disable-ffprobe --disable-ffmpeg
--disable-bzlib --disable-libopenjpeg --disable-iconv
working-directory: ffmpeg
- name: ffmpeg -- build
if: steps.cache.outputs.cache-hit != 'true'
run: make -j4
working-directory: ffmpeg
- name: ffmpeg -- install
run: sudo make install
working-directory: ffmpeg
- 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}}
working-directory: build
- name: perimeter -- build project
run: ninja
working-directory: build
- name: perimeter -- install project
run: cmake --install . --prefix output
working-directory: build
- name: perimeter -- strip
run: |
if [[ -d output/lib ]]; then
strip -x output/lib/*
fi
strip -x output/bin/*
working-directory: build
#TODO update package.sh to handle cmake install result
#- name: perimeter -- package app
# run: macos/package.sh
# env:
# TEMPLATE_DIR: "macos/Perimeter.app.template"
# BUILD_DIR: "build"
# APP_DIR: "Perimeter.app"
# LIB_DIR: "/usr/local/lib"
#- name: perimeter -- release tar
# run: tar -cvf Perimeter.app.tar Perimeter.app
#TODO Expose artifacts once we build universal binaries
#- uses: actions/upload-artifact@v4
# with:
# name: Perimeter MacOS ${{matrix.env.build_type}}
# path: Perimeter.app.tar