From c6655710a99cbde97304a97f0ac93ed167fedc9a Mon Sep 17 00:00:00 2001 From: ichizok Date: Thu, 2 May 2024 16:19:56 +0900 Subject: [PATCH] Test sound on macOS --- .github/workflows/ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42343e4..4f89bbd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,9 +47,14 @@ jobs: echo "start_dt=$(date +'%F %H:%M:%S')" >> $GITHUB_OUTPUT cat <<'EOT' > test.swift import AppKit - NSSound(named: "Tink")?.play() + if let s = NSSound(named: "Tink") { + if !s.play() { + exit(1) + } + } EOT - swift test.swift + xcrun swiftc -o test.out test.swift + ./test.out - name: Log if: always()