Skip to content

Apply extra workaround for ubuntu #371

Apply extra workaround for ubuntu

Apply extra workaround for ubuntu #371

Workflow file for this run

name: MacOS Build
on:
push:
pull_request:
env:
VULKAN_SDK_VERSION: '1.3.250.1'
VULKAN_LIB_VERSION: '1.3.250'
MACOSX_DEPLOYMENT_TARGET: '10.15'
GH_CACHE_KEY: 9
jobs:
build:
strategy:
fail-fast: false
matrix:
env: [
{build_type: Debug, cmake: "-DOPTION_SOKOL=ON"},
{build_type: Release, cmake: ""}
]
name: ${{matrix.env.build_type}}
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: install libs
run: |
brew install ninja yasm dylibbundler \
libogg libvorbis libvpx boost meson cmake zlib \
sdl2 sdl2_image sdl2_mixer sdl2_net
- uses: actions/cache@v3
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 n5.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"
--arch=${{matrix.env.arch}}
--extra-cflags="-arch x86_64"
--extra-ldflags="-arch x86_64"
--target-os=darwin
--sysroot=$(xcrun --sdk macosx --show-sdk-path)
--disable-everything
--enable-swscale
--enable-swresample
--enable-zlib
--enable-libvpx
--enable-libvorbis
--enable-demuxer=avi,rawvideo,bink,matroska
--enable-decoder=png,rawvideo,bink,binkaudio_dct,vorbis,opus,vp8,vp9
--enable-parser=png,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}} -DOPTION_D3D9=ON ${{matrix.env.cmake}}
working-directory: build
- name: perimeter -- build dependencies
run: ninja dependencies
working-directory: build
- name: perimeter -- build project
run: ninja
working-directory: build
- name: perimeter -- strip binary
run: strip -x Source/Perimeter
working-directory: build
- 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@v3
# with:
# name: Perimeter MacOS ${{matrix.env.build_type}}
# path: Perimeter.app.tar