Skip to content

Commit 2dbb204

Browse files
robertmetaclaude
andcommitted
Simplify to Apple Silicon only (drop Intel support)
Remove Intel/x86_64 build complexity: - Build only for arm64 (Apple Silicon) - Remove universal binary creation steps - Remove architecture detection and lipo complexity - Simplify workflow significantly SwiftMac now targets modern Macs: - M1, M2, M3, M4, and future Apple Silicon Updated documentation to reflect Apple Silicon requirement. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
1 parent 7075ad7 commit 2dbb204

2 files changed

Lines changed: 14 additions & 108 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -55,120 +55,24 @@ jobs:
5555
run: |
5656
echo "Building for Apple Silicon (arm64)..."
5757
swift build --configuration release --arch arm64
58-
mkdir -p build-artifacts/arm64
59-
cp .build/release/swiftmac build-artifacts/arm64/
60-
cp -r .build/release/ogg.framework build-artifacts/arm64/
61-
cp -r .build/release/vorbis.framework build-artifacts/arm64/
62-
echo "Saved arm64 build artifacts"
63-
file build-artifacts/arm64/swiftmac
64-
65-
- name: Clean build directory
66-
run: |
67-
echo "Cleaning build directory..."
68-
rm -rf .build
69-
70-
- name: Build for Intel (x86_64)
71-
run: |
72-
echo "Building for Intel (x86_64)..."
73-
swift build --configuration release --arch x86_64
74-
mkdir -p build-artifacts/x86_64
75-
cp .build/release/swiftmac build-artifacts/x86_64/
76-
cp -r .build/release/ogg.framework build-artifacts/x86_64/
77-
cp -r .build/release/vorbis.framework build-artifacts/x86_64/
78-
echo "Saved x86_64 build artifacts"
79-
file build-artifacts/x86_64/swiftmac
80-
81-
- name: Create Universal Binary
82-
run: |
83-
echo "Creating universal binary..."
84-
85-
# Verify source binaries
86-
echo "ARM64 binary:"
87-
file build-artifacts/arm64/swiftmac
88-
lipo -info build-artifacts/arm64/swiftmac
89-
90-
echo "x86_64 binary:"
91-
file build-artifacts/x86_64/swiftmac
92-
lipo -info build-artifacts/x86_64/swiftmac
93-
94-
# Create universal binary for swiftmac executable
95-
lipo -create \
96-
build-artifacts/arm64/swiftmac \
97-
build-artifacts/x86_64/swiftmac \
98-
-output swiftmac-universal
99-
100-
# Verify it's universal
101-
echo "Universal binary:"
102-
file swiftmac-universal
103-
lipo -info swiftmac-universal
104-
105-
# Check framework architectures
106-
mkdir -p universal-frameworks
107-
108-
echo ""
109-
echo "Checking ogg.framework architectures..."
110-
echo "ARM64 version:"
111-
lipo -info build-artifacts/arm64/ogg.framework/ogg || true
112-
echo "x86_64 version:"
113-
lipo -info build-artifacts/x86_64/ogg.framework/ogg || true
114-
115-
# Handle ogg framework - check if architectures differ
116-
ARM_OGG_ARCH=$(lipo -info build-artifacts/arm64/ogg.framework/ogg 2>&1 | grep -o 'arm64\|x86_64' | head -1)
117-
X86_OGG_ARCH=$(lipo -info build-artifacts/x86_64/ogg.framework/ogg 2>&1 | grep -o 'arm64\|x86_64' | head -1)
118-
119-
if [ "$ARM_OGG_ARCH" = "$X86_OGG_ARCH" ]; then
120-
echo "ogg.framework has same architecture in both builds, using as-is"
121-
cp -r build-artifacts/arm64/ogg.framework universal-frameworks/
122-
else
123-
echo "Creating universal ogg.framework"
124-
cp -r build-artifacts/arm64/ogg.framework universal-frameworks/
125-
lipo -create \
126-
build-artifacts/arm64/ogg.framework/ogg \
127-
build-artifacts/x86_64/ogg.framework/ogg \
128-
-output universal-frameworks/ogg.framework/ogg
129-
fi
130-
131-
echo ""
132-
echo "Checking vorbis.framework architectures..."
133-
echo "ARM64 version:"
134-
lipo -info build-artifacts/arm64/vorbis.framework/vorbis || true
135-
echo "x86_64 version:"
136-
lipo -info build-artifacts/x86_64/vorbis.framework/vorbis || true
137-
138-
# Handle vorbis framework - check if architectures differ
139-
ARM_VORBIS_ARCH=$(lipo -info build-artifacts/arm64/vorbis.framework/vorbis 2>&1 | grep -o 'arm64\|x86_64' | head -1)
140-
X86_VORBIS_ARCH=$(lipo -info build-artifacts/x86_64/vorbis.framework/vorbis 2>&1 | grep -o 'arm64\|x86_64' | head -1)
141-
142-
if [ "$ARM_VORBIS_ARCH" = "$X86_VORBIS_ARCH" ]; then
143-
echo "vorbis.framework has same architecture in both builds, using as-is"
144-
cp -r build-artifacts/arm64/vorbis.framework universal-frameworks/
145-
else
146-
echo "Creating universal vorbis.framework"
147-
cp -r build-artifacts/arm64/vorbis.framework universal-frameworks/
148-
lipo -create \
149-
build-artifacts/arm64/vorbis.framework/vorbis \
150-
build-artifacts/x86_64/vorbis.framework/vorbis \
151-
-output universal-frameworks/vorbis.framework/vorbis
152-
fi
15358
154-
# Verify final frameworks
155-
echo ""
156-
echo "Final framework architectures:"
157-
lipo -info universal-frameworks/ogg.framework/ogg
158-
lipo -info universal-frameworks/vorbis.framework/vorbis
59+
# Verify architecture
60+
echo "Verifying swiftmac binary:"
61+
file .build/release/swiftmac
62+
lipo -info .build/release/swiftmac
15963
16064
- name: Create release archive
16165
run: |
16266
VERSION="${{ needs.check-version.outputs.version }}"
163-
echo "Building swiftmac version $VERSION (Universal Binary)"
67+
echo "Building swiftmac version $VERSION (Apple Silicon only)"
16468
16569
# Create release directory
16670
mkdir -p swiftmac
16771
168-
# Copy universal binary and frameworks
169-
cp swiftmac-universal swiftmac/swiftmac
170-
cp -rf universal-frameworks/ogg.framework swiftmac/
171-
cp -rf universal-frameworks/vorbis.framework swiftmac/
72+
# Copy arm64 binary and frameworks
73+
cp .build/release/swiftmac swiftmac/
74+
cp -rf .build/release/ogg.framework swiftmac/
75+
cp -rf .build/release/vorbis.framework swiftmac/
17276
17377
# Copy support files
17478
cp swiftmac-voices.el swiftmac/

Readme.org

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
A fast, async Emacspeak speech server for macOS written in Swift.
66

7+
*Requirements:* Apple Silicon Mac (M1, M2, M3, M4, or newer)
8+
79
** Quick Links
810

911
- [[#helper-scripts-and-tools][Helper Scripts and Tools]] - Voice browsers, device finders, configuration helpers
@@ -338,13 +340,13 @@ When you update the version in =Sources/SwiftMacPackage/main.swift= and push to
338340
*** What Gets Included in Releases
339341

340342
The release tarball (=swiftmac-VERSION.tar.gz=) includes:
341-
- =swiftmac= universal binary (works on both Intel and Apple Silicon Macs)
342-
- =ogg.framework= and =vorbis.framework= (universal frameworks)
343+
- =swiftmac= binary (Apple Silicon arm64)
344+
- =ogg.framework= and =vorbis.framework=
343345
- =swiftmac-voices.el=
344346
- =cloud-swiftmac= and =log-swiftmac= scripts
345347
- Documentation: =LICENSE=, =Readme.org=, =Readme.emacspeak.org=
346348

347-
*Note:* All binaries are universal, containing both x86_64 (Intel) and arm64 (Apple Silicon) code.
349+
*Note:* SwiftMac is built for Apple Silicon (arm64) only. Requires M1, M2, M3, M4, or newer Mac.
348350

349351
** Hacking
350352
:PROPERTIES:

0 commit comments

Comments
 (0)