Runtime macOS - Deployment Setup
This should lay the foundation for deploying runtime changes to the public `rive-macos` repo and publishing SPM/CocoaPod named `RiveMacOS`.
### Files to look at:
- dev/**[mono.sh](https://github.com/rive-app/rive/blob/1e3469e82c7e4df7f965f0fa4048486d0c58c656/dev/mono.sh)**
- .github/workflows/**[apply_changes_downstream.yaml](https://github.com/rive-app/rive/blob/1e3469e82c7e4df7f965f0fa4048486d0c58c656/.github/workflows/apply_changes_downstream.yaml)**
- .github/actions/setup-downstream/**[action.yml](https://github.com/rive-app/rive/blob/1e3469e82c7e4df7f965f0fa4048486d0c58c656/.github/actions/setup-downstream/action.yml)**
- packages/runtime_mac/.github/**
- packages/runtime_mac/scripts/**
- packages/runtime/skia/dependencies/**[make_skia_macos.sh](https://github.com/rive-app/rive/blob/1e3469e82c7e4df7f965f0fa4048486d0c58c656/packages/runtime/skia/dependencies/make_skia_macos.sh)**
Diffs=
3039909c2 Update to using deployment workflow similar to ios
diff --git a/.rive_head b/.rive_head
index 5a706f9..389e070 100644
--- a/.rive_head
+++ b/.rive_head
@@ -1 +1 @@
-53a8f95178fbcfce0a775b6217c8108c48af4591
+3039909c2ab6ad363d1605276f325f7027de7d72
diff --git a/skia/dependencies/make_skia_macos.sh b/skia/dependencies/make_skia_macos.sh
new file mode 100755
index 0000000..20f04da
--- /dev/null
+++ b/skia/dependencies/make_skia_macos.sh
@@ -0,0 +1,119 @@
+#!/bin/bash
+
+set -ex
+
+export MAKE_SKIA_FILE="$0"
+source ./get_skia2.sh
+source ./cache_helper.sh
+
+build_skia_macos(){
+ cd $SKIA_DIR_NAME
+
+ local SHARED_EXTRA_CFLAGS="\
+ \"-fno-rtti\", \
+ \"-DSK_DISABLE_LEGACY_SHADERCONTEXT\", \
+ \"-DSK_DISABLE_LOWP_RASTER_PIPELINE\", \
+ \"-DSK_FORCE_RASTER_PIPELINE_BLITTER\", \
+ \"-DSK_DISABLE_AAA\", \
+ \"-DSK_DISABLE_EFFECT_DESERIALIZATION\" \
+ "
+
+ local SHARED_ARGS="\
+ is_official_build=true \
+ skia_use_gl=true \
+ skia_use_zlib=true \
+ skia_enable_gpu=true \
+ skia_enable_fontmgr_empty=false \
+ skia_use_libpng_encode=true \
+ skia_use_libpng_decode=true \
+ skia_enable_skgpu_v1=true \
+ skia_use_dng_sdk=false \
+ skia_use_egl=false \
+ skia_use_expat=false \
+ skia_use_fontconfig=false \
+ skia_use_freetype=false \
+ skia_use_icu=false \
+ skia_use_libheif=false \
+ skia_use_system_libpng=false \
+ skia_use_libjpeg_turbo_encode=false \
+ skia_use_libjpeg_turbo_decode=false \
+ skia_use_libwebp_encode=false \
+ skia_use_libwebp_decode=false \
+ skia_use_lua=false \
+ skia_use_piex=false \
+ skia_use_vulkan=false \
+ skia_use_metal=true \
+ skia_use_angle=false \
+ skia_use_system_zlib=false \
+ skia_enable_spirv_validation=false \
+ skia_enable_pdf=false \
+ skia_enable_skottie=false \
+ skia_enable_tools=false \
+ "
+
+ case $1 in
+ arm64)
+ ARCH=arm64
+ FOLDER=arm64
+
+ # use Rive optimized/stripped Skia for macOS static libs.
+ bin/gn gen out/$FOLDER --type=static_library --args=" \
+ target_os=\"mac\" \
+ target_cpu=\"arm64\" \
+ extra_cflags=[ \
+ ${SHARED_EXTRA_CFLAGS}
+ ] \
+ ${SHARED_ARGS}
+ "
+ ;;
+ x64)
+ ARCH=x64
+ FOLDER=x64
+
+ bin/gn gen out/$FOLDER --type=static_library --args=" \
+ target_os=\"mac\" \
+ target_cpu=\"x64\" \
+ extra_cflags=[ \
+ \"--target=x86_64-apple-macos10.12\", \
+ \"-fno-rtti\", \
+ \"-fno-rtti\", \
+ ${SHARED_EXTRA_CFLAGS}
+ ] \
+ extra_asmflags = [ \
+ \"--target=x86_64-apple-macos10.12\" \
+ ] \
+ extra_cflags_c = [ \
+ \"--target=x86_64-apple-macos10.12\", \
+ \"-Wno-error\" \
+ ] \
+ extra_ldflags=[ \
+ \"--target=x86_64-apple-macos10.12\" \
+ ] \
+ cc = \"clang\" \
+ cxx = \"clang++\" \
+ ${SHARED_ARGS}
+ "
+ ;;
+ *)
+ echo "Do not know build configuration for $1"
+ exit 1
+ esac
+
+ ninja -C out/$FOLDER
+ cd ..
+}
+
+if is_build_cached_locally; then
+ echo "Build is cached, nothing to do."
+else
+ if is_build_cached_remotely; then
+ pull_cache
+ else
+ getSkia
+ build_skia_macos $1
+ # hmm not the appiest with this guy
+ OUTPUT_CACHE=out/$FOLDER upload_cache
+ fi
+fi
+
+cd ..