Nota — a free DAW for macOS, Windows and Linux. No subscription, no account — just open it and make music.
C# audioaudio-unitavaloniacpp20cross-platformdawdigital-audio-workstationdspjucelinux-audiomcp-servermidimusicmusic-productionpiano-rollplugin-hostsequencersynthesizervstvst3
(fix) Fix macos build
Egor Khindikaynen6d511a2f1d08
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex aac687ef..86556912 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -5,6 +5,10 @@ name: Release# commit contained in `main`. The GitHub release is created as a DRAFT with the matching# CHANGELOG section as its body; you review the artifacts and publish manually.#+# Manual run (Actions -> Release -> Run workflow): builds the chosen platforms from+# any branch, without a tag, and only uploads the build artifacts — no release is+# created. Use it to check a platform build before tagging.+## Artifacts:# macOS -> Nota-<version>-arm64.dmg , Nota-<version>-x86_64.dmg# Windows -> Nota-Setup-<version>-x64.exe , Nota-Setup-<version>-arm64.exe@@ -14,6 +18,13 @@ on:push:tags:- 'v*.*.*'+ workflow_dispatch:+ inputs:+ platforms:+ description: Platforms to build (no release is created)+ type: choice+ default: macos+ options: [macos, windows, linux, all]permissions:contents: write # create the release + upload assets@@ -24,7 +35,7 @@ jobs:# CHANGELOG section. Every build job depends on this, so a bad tag never builds.# --------------------------------------------------------------------------------guard:- name: Validate release tag+ name: ${{ github.event_name == 'push' && 'Validate release tag' || 'Read version' }}runs-on: ubuntu-latestoutputs:version: ${{ steps.meta.outputs.version }}@@ -37,6 +48,13 @@ jobs:id: metarun: |set -euo pipefail+ # Manual run: no tag to validate — just take the version from the branch.+ if [ "$GITHUB_EVENT_NAME" = "workflow_dispatch" ]; then+ version="$(tr -d '[:space:]' < VERSION)"+ echo "Manual build of $GITHUB_REF_NAME (version $version)"+ echo "version=$version" >> "$GITHUB_OUTPUT"+ exit 0+ fiversion="${GITHUB_REF_NAME#v}"echo "Release tag: $GITHUB_REF_NAME (version $version)"@@ -65,11 +83,14 @@ jobs:# --------------------------------------------------------------------------------# macOS — one .dmg per arch (Apple Silicon + Intel). Both build on the arm64# runner: clang cross-compiles the x86_64 engine, dotnet cross-publishes osx-x64.+ # macos-26 for the same Xcode 26 toolchain the engine is developed with; the+ # minimum macOS the app runs on is set by the deployment target (13.0), not here.# --------------------------------------------------------------------------------macos:name: Build macOS (${{ matrix.arch }})needs: guard- runs-on: macos-14+ if: github.event_name == 'push' || contains(fromJSON('["macos","all"]'), inputs.platforms)+ runs-on: macos-26strategy:fail-fast: falsematrix:@@ -102,6 +123,7 @@ jobs:windows:name: Build Windows (x64 + arm64)needs: guard+ if: github.event_name == 'push' || contains(fromJSON('["windows","all"]'), inputs.platforms)runs-on: windows-2022steps:- uses: actions/checkout@v5@@ -129,6 +151,7 @@ jobs:linux:name: Build Linux (${{ matrix.arch }})needs: guard+ if: github.event_name == 'push' || contains(fromJSON('["linux","all"]'), inputs.platforms)strategy:fail-fast: falsematrix:@@ -166,6 +189,7 @@ jobs:release:name: Create draft releaseneeds: [guard, macos, windows, linux]+ if: github.event_name == 'push' # manual runs only build, never releaseruns-on: ubuntu-lateststeps:- uses: actions/checkout@v5diff --git a/scripts/package-dmg.sh b/scripts/package-dmg.shindex 2b5b131a..2ed91063 100755--- a/scripts/package-dmg.sh+++ b/scripts/package-dmg.sh@@ -18,6 +18,20 @@ set -euo pipefailcd "$(dirname "$0")/.."export PATH="/opt/homebrew/bin:$PATH"+# Run a noisy step with its output in a log; on failure print the tail so CI+# shows the actual compiler/publish error instead of a bare "exit code 1".+quiet() {+ local log rc=0; log="$(mktemp -t nota-step)"+ "$@" >"${log}" 2>&1 || rc=$?+ if [ "${rc}" -ne 0 ]; then+ echo "error: step failed (exit ${rc}): $*" >&2+ echo "----- last 80 lines of output -----" >&2+ tail -n 80 "${log}" >&2+ exit "${rc}"+ fi+ rm -f "${log}"+}+ARCH="${1:-}"case "${ARCH}" inarm64) RID="osx-arm64" ;;@@ -44,15 +58,15 @@ mkdir -p "${OUT_DIR}"# 1) Native engine (thin, this arch only) -------------------------------------echo "==> Building native engine (${ARCH})…"-cmake -G Ninja -S src/native/nota.engine -B "${NATIVE_BUILD}" \- -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES="${ARCH}" >/dev/null-cmake --build "${NATIVE_BUILD}" >/dev/null+quiet cmake -G Ninja -S src/native/nota.engine -B "${NATIVE_BUILD}" \+ -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES="${ARCH}"+quiet cmake --build "${NATIVE_BUILD}"lipo -info "${NATIVE_BUILD}/libnota_engine.dylib"# 2) Managed publish, pointed at this arch's engine ---------------------------echo "==> Publishing managed (${RID}, self-contained)…"-dotnet publish src/managed/Nota.App -c Release -r "${RID}" --self-contained true \- -p:NotaNativeDir="${NATIVE_BUILD}" -o "${PUB}" >/dev/null+quiet dotnet publish src/managed/Nota.App -c Release -r "${RID}" --self-contained true \+ -p:NotaNativeDir="${NATIVE_BUILD}" -o "${PUB}"# 3) Assemble the .app --------------------------------------------------------echo "==> Assembling ${APP_NAME}.app…"@@ -140,11 +154,11 @@ if ! "${DMGBUILD_VENV}/bin/python" -c \firm -f "${DMG}"-"${DMGBUILD_VENV}/bin/dmgbuild" -s scripts/dmg-settings.py \+quiet "${DMGBUILD_VENV}/bin/dmgbuild" -s scripts/dmg-settings.py \-D app="${APP}" \-D background="${BG_TMP}/background.tiff" \-D icon="${CONTENTS}/Resources/${APP_NAME}.icns" \- "${APP_NAME} ${VERSION}" "${DMG}" >/dev/null+ "${APP_NAME} ${VERSION}" "${DMG}"rm -rf "${BG_TMP}"echo "==> Verifying:"