Skip to content
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
83ecb32
Set up GitHub Actions for CI/CD
XevilA Jul 20, 2026
25fdfcd
Support both Apple Silicon and Intel architectures in CI/CD
XevilA Jul 20, 2026
af92dc9
Optimize Xcode project for full Apple Silicon support
XevilA Jul 20, 2026
c9a601e
Add full RMarkdown and LaTeX support to MacDown
XevilA Jul 20, 2026
b0b9a08
Complete RMarkdown and LaTeX parsing and integration infrastructure
XevilA Jul 20, 2026
a49ff8f
Update GitHub Actions to use latest artifact and checkout versions
XevilA Jul 20, 2026
05cae24
Fix GitHub Actions build failures
XevilA Jul 20, 2026
8686d08
Update CONTRIBUTING.md with new features and workflows
XevilA Jul 20, 2026
35ba5ca
Add Swift migration plan and performance optimization strategy
XevilA Jul 20, 2026
edd3c92
Add comprehensive modernization roadmap for MacDown
XevilA Jul 20, 2026
d15d848
Fix release workflow to properly create and collect DMGs for both arc…
XevilA Jul 20, 2026
b22ec7a
Optimize GitHub Actions workflows for faster runner startup
XevilA Jul 20, 2026
8ec668f
Optimize build workflow - Apple Silicon only on push, both on release
XevilA Jul 20, 2026
8e471d7
Add GitHub Actions strategy documentation
XevilA Jul 20, 2026
398f395
Fix GitHub Actions workflow syntax error
XevilA Jul 20, 2026
ec829b8
Initial plan
Copilot Jul 20, 2026
8385de6
Simplify build workflow commands for reliability
XevilA Jul 20, 2026
09fdc49
Fix CocoaPods cache validation in build workflow
Copilot Jul 20, 2026
275a005
Merge pull request #1 from Dotmini/copilot/fix-failing-github-actions…
XevilA Jul 20, 2026
895505a
Simplify release workflow - Apple Silicon only DMG
XevilA Jul 20, 2026
4eeac13
Fix git submodule checkout in workflows
XevilA Jul 20, 2026
b120406
Add pmh_parser.c generation step before build
XevilA Jul 20, 2026
3fb582e
Remove Intel build job from CI/CD workflows
XevilA Jul 20, 2026
8e6587b
Add permissions to release workflow
XevilA Jul 20, 2026
6d84678
Force pod install in release workflow to prevent cache issues
XevilA Jul 20, 2026
6fb8e93
Update Sparkle to 2.5 for Apple Silicon support
XevilA Jul 20, 2026
4ba2209
Disable Sparkle - version compatibility issue with arm64
XevilA Jul 20, 2026
fe838fa
Remove Sparkle imports and delegates from MPMainController
XevilA Jul 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 137 additions & 0 deletions .github/APPLE_SILICON_SUPPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
# Apple Silicon Support

MacDown now has full support for Apple Silicon (ARM64) Macs running macOS 11 Big Sur and later.

## Architecture Support

The project is built and tested on **two architectures**:

- **Apple Silicon (ARM64)**: Built on macOS 14 (latest Apple Silicon runner)
- **Intel (x86_64)**: Built on macOS 12 (Intel runner)

## Build Configuration

### Podfile
The `Podfile` includes a `post_install` hook that ensures all CocoaPods dependencies support both architectures:

```ruby
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ARCHS'] = '$(ARCHS_STANDARD)'
config.build_settings['VALID_ARCHS'] = 'x86_64 arm64'
end
end
end
```

### CI/CD Build Process

Both `.github/workflows/build.yml` and `.github/workflows/release.yml` use a matrix strategy to build for both architectures:

- Each architecture gets its own dedicated macOS runner
- `ARCHS` flag is explicitly set during xcodebuild to target the specific architecture
- Separate build products and artifacts are created for each architecture

## Releases

When you create a release (via `git tag v1.0.0`), the CI/CD pipeline automatically:

1. Builds for both ARM64 and x86_64
2. Creates separate DMG files for each architecture:
- `MacDown-v1.0.0-arm64.dmg` (Apple Silicon)
- `MacDown-v1.0.0-x86_64.dmg` (Intel)
3. Publishes both DMGs to the GitHub release

Users can download the version appropriate for their Mac:
- **Apple Silicon Mac**: Use `arm64` version
- **Intel Mac**: Use `x86_64` version

## Local Development

### Building for Apple Silicon (on Apple Silicon Mac)
```bash
xcodebuild -workspace MacDown.xcworkspace \
-scheme MacDown \
-configuration Release \
ARCHS=arm64 \
build
```

### Building for Intel (on Apple Silicon Mac with Rosetta)
```bash
xcodebuild -workspace MacDown.xcworkspace \
-scheme MacDown \
-configuration Release \
ARCHS=x86_64 \
build
```

### Building for Both (Universal Binary)
```bash
xcodebuild -workspace MacDown.xcworkspace \
-scheme MacDown \
-configuration Release \
ARCHS='arm64 x86_64' \
build
```

## CocoaPods Compatibility

All CocoaPods dependencies used in MacDown support Apple Silicon:

- handlebars-objc
- hoedown
- JJPluralForm
- LibYAML
- M13OrderedDictionary
- MASPreferences
- Sparkle
- PAPreferences
- GBCli (macdown-cmd target)

If you need to add new dependencies, ensure they support ARM64 architecture before adding to the Podfile.

## Testing

Both architectures are tested in CI/CD:

```bash
# Tests run on both macOS 14 (Apple Silicon) and macOS 12 (Intel)
xcodebuild -workspace MacDown.xcworkspace \
-scheme MacDown \
-configuration Debug \
test
```

## Troubleshooting

### Pod Install Fails for ARM64

If you encounter pod install issues on Apple Silicon, try:

```bash
# Clear pods and reinstall
rm -rf Pods
rm Podfile.lock
pod install
```

### Build Fails with "Architecture Mismatch"

Ensure you're using the correct `ARCHS` setting and that all dependencies are properly installed via CocoaPods.

### Rosetta 2 Builds on Apple Silicon

If building for x86_64 on Apple Silicon via Rosetta 2:

```bash
# Use arch command to run in x86_64 mode
arch -x86_64 /usr/bin/ruby -I/usr/local/lib/ruby/gems/3.0.0 /usr/local/bin/pod install
```

## Future Improvements

- Consider creating universal binaries (both arm64 + x86_64 in one DMG) for simplified distribution
- Monitor minimum macOS deployment target for potential modernization
- Keep CocoaPods dependencies updated for optimal ARM64 support
Loading