Files
obs-localvocal/.github/workflows/push.yaml
Tabitha Cromarty 6a4abbc848 Make multiple MacOS variants targeting different Metal versions (#266)
* Make multiple MacOS variants targeting different Metal versions

Different MacOS versions support different maximum Metal versions. As we build on MacOS 14, it's
likely that when embedding the Metal shaders into the Metal backend they're being built for
Metal 3.1, the maximum supported version on MacOS 14. This may be why users are seeing crashes
when trying to use Metal on older versions of MacOS

This will also allow users of MacOS 15 and newer to take advantage of improvements from Metal 3.2

* Fix checking incorrect env var for MacOS version
2025-12-07 13:04:18 +00:00

134 lines
4.3 KiB
YAML

name: Push to master
run-name: ${{ github.ref_name }} push run 🚀
on:
push:
branches:
- master
- main
- 'release/**'
tags:
- '*'
permissions:
contents: write
concurrency:
group: '${{ github.workflow }} @ ${{ github.ref }}'
cancel-in-progress: ${{ github.ref_type == 'tag' }}
jobs:
check-format:
name: Check Formatting 🔍
if: github.ref_name == 'master'
uses: ./.github/workflows/check-format.yaml
permissions:
contents: read
build-project:
name: Build Project 🧱
uses: ./.github/workflows/build-project.yaml
secrets: inherit
permissions:
contents: read
create-release:
name: Create Release 🛫
if: github.ref_type == 'tag'
runs-on: ubuntu-22.04
needs: build-project
defaults:
run:
shell: bash
steps:
- name: Check Release Tag ☑️
id: check
run: |
: Check Release Tag ☑️
if [[ "${RUNNER_DEBUG}" ]]; then set -x; fi
shopt -s extglob
case "${GITHUB_REF_NAME}" in
+([0-9]).+([0-9]).+([0-9]) )
echo 'validTag=true' >> $GITHUB_OUTPUT
echo 'prerelease=false' >> $GITHUB_OUTPUT
echo "version=${GITHUB_REF_NAME}" >> $GITHUB_OUTPUT
;;
+([0-9]).+([0-9]).+([0-9])-@(beta|rc)*([0-9]) )
echo 'validTag=true' >> $GITHUB_OUTPUT
echo 'prerelease=true' >> $GITHUB_OUTPUT
echo "version=${GITHUB_REF_NAME}" >> $GITHUB_OUTPUT
;;
*) echo 'validTag=false' >> $GITHUB_OUTPUT ;;
esac
- name: Download Build Artifacts 📥
uses: actions/download-artifact@v4
if: fromJSON(steps.check.outputs.validTag)
id: download
- name: Rename Files 🏷️
if: fromJSON(steps.check.outputs.validTag)
run: |
: Rename Files 🏷️
if [[ "${RUNNER_DEBUG}" ]]; then set -x; fi
shopt -s extglob
shopt -s nullglob
root_dir="$(pwd)"
commit_hash="${GITHUB_SHA:0:9}"
variants=(
'windows-x64-generic;zip|exe'
'windows-x64-nvidia;zip|exe'
'windows-x64-amd;zip|exe'
'macos-12-arm64;tar.xz|pkg'
'macos-13-arm64;tar.xz|pkg'
'macos-14-arm64;tar.xz|pkg'
'macos-15-arm64;tar.xz|pkg'
'macos-12-x86_64;tar.xz|pkg'
'macos-13-x86_64;tar.xz|pkg'
'macos-14-x86_64;tar.xz|pkg'
'macos-15-x86_64;tar.xz|pkg'
'ubuntu-22.04-x86_64-generic;tar.xz|deb|ddeb'
'ubuntu-22.04-x86_64-nvidia;tar.xz|deb|ddeb'
'ubuntu-22.04-x86_64-amd;tar.xz|deb|ddeb'
'sources;tar.xz'
)
for variant_data in "${variants[@]}"; do
IFS=';' read -r variant suffix <<< "${variant_data}"
candidates=(*-${variant}-${commit_hash}/@(*|*-dbgsym).@(${suffix}))
for candidate in "${candidates[@]}"; do
mv "${candidate}" "${root_dir}"
done
done
- name: Generate Checksums 🪪
if: fromJSON(steps.check.outputs.validTag)
run: |
: Generate Checksums 🪪
if [[ "${RUNNER_DEBUG}" ]]; then set -x; fi
shopt -s extglob
echo "### Checksums" > ${{ github.workspace }}/CHECKSUMS.txt
for file in ${{ github.workspace }}/@(*.exe|*.deb|*.ddeb|*.pkg|*.tar.xz|*.zip); do
echo " ${file##*/}: $(sha256sum "${file}" | cut -d " " -f 1)" >> ${{ github.workspace }}/CHECKSUMS.txt
done
- name: Create Release 🛫
if: fromJSON(steps.check.outputs.validTag)
id: create_release
uses: softprops/action-gh-release@d4e8205d7e959a9107da6396278b2f1f07af0f9b
with:
draft: true
prerelease: ${{ fromJSON(steps.check.outputs.prerelease) }}
tag_name: ${{ steps.check.outputs.version }}
name: ${{ needs.build-project.outputs.pluginName }} ${{ steps.check.outputs.version }}
body_path: ${{ github.workspace }}/CHECKSUMS.txt
files: |
${{ github.workspace }}/*.exe
${{ github.workspace }}/*.zip
${{ github.workspace }}/*.pkg
${{ github.workspace }}/*.deb
${{ github.workspace }}/*.ddeb
${{ github.workspace }}/*.tar.xz