Skip to content

Commit b6c0205

Browse files
author
Hidetomo Katsura
committed
add ci and release
1 parent 6a61417 commit b6c0205

4 files changed

Lines changed: 256 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: macos-latest
12+
13+
steps:
14+
- uses: actions/checkout@v5
15+
16+
- name: Select Xcode version 26.3
17+
run: |
18+
sudo xcode-select --switch /Applications/Xcode_26.3.app
19+
20+
- name: Build
21+
run: |
22+
xcodebuild build \
23+
-project AmorphousMemoryMark/AmorphousMemoryMark.xcodeproj \
24+
-scheme AmorphousMemoryMark \
25+
-destination 'platform=macOS' \
26+
CODE_SIGN_IDENTITY="-" \
27+
CODE_SIGNING_REQUIRED=NO \
28+
CODE_SIGNING_ALLOWED=NO
29+
30+
- name: Test
31+
run: |
32+
xcodebuild test \
33+
-project AmorphousMemoryMark/AmorphousMemoryMark.xcodeproj \
34+
-scheme AmorphousMemoryMark \
35+
-destination 'platform=macOS' \
36+
CODE_SIGN_IDENTITY="-" \
37+
CODE_SIGNING_REQUIRED=NO \
38+
CODE_SIGNING_ALLOWED=NO

.github/workflows/release.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: Release to App Store Connect
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
upload:
9+
runs-on: macos-latest
10+
timeout-minutes: 30
11+
12+
env:
13+
SCHEME: AmorphousMemoryMark
14+
PROJECT: AmorphousMemoryMark/AmorphousMemoryMark.xcodeproj
15+
16+
steps:
17+
- uses: actions/checkout@v5
18+
19+
- name: Select Xcode version 26.3
20+
run: |
21+
ls -ldT /Applications/Xcode*
22+
sudo xcode-select --switch /Applications/Xcode_26.3.app
23+
24+
# --- Version from tag ---
25+
- name: Set version from tag
26+
run: |
27+
VERSION="${GITHUB_REF_NAME#v}"
28+
VERSION="${VERSION%-rc*}"
29+
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
30+
31+
- name: Stamp version into Info.plist
32+
run: |
33+
PLIST="AmorphousMemoryMark/AmorphousMemoryMark/Info.plist"
34+
BUNDLE_VERSION=`expr $GITHUB_RUN_NUMBER + 27`
35+
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $VERSION" "$PLIST"
36+
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $BUNDLE_VERSION" "$PLIST"
37+
38+
# --- Signing ---
39+
- name: Install certificate and provisioning profile
40+
env:
41+
CERTIFICATE_BASE64: ${{ secrets.TWO_CERTS_BASE64 }}
42+
CERTIFICATE_PASSWORD: ${{ secrets.TWO_CERTS_PASSWORD }}
43+
PROVISIONING_PROFILE_BASE64: ${{ secrets.PROVISIONING_PROFILE_BASE64 }}
44+
run: |
45+
CERT_PATH="$RUNNER_TEMP/certs.p12"
46+
PP_PATH="$RUNNER_TEMP/profile.provisionprofile"
47+
KEYCHAIN_PATH="$RUNNER_TEMP/signing.keychain-db"
48+
49+
echo -n "$CERTIFICATE_BASE64" | base64 --decode -o "$CERT_PATH"
50+
echo -n "$PROVISIONING_PROFILE_BASE64" | base64 --decode -o "$PP_PATH"
51+
52+
security create-keychain -p "" "$KEYCHAIN_PATH"
53+
security set-keychain-settings -lut 21600 "$KEYCHAIN_PATH"
54+
security unlock-keychain -p "" "$KEYCHAIN_PATH"
55+
security import "$CERT_PATH" -P "$CERTIFICATE_PASSWORD" \
56+
-A -t cert -f pkcs12 -k "$KEYCHAIN_PATH"
57+
security set-key-partition-list -S apple-tool:,apple: \
58+
-k "" "$KEYCHAIN_PATH"
59+
security list-keychains -d user -s "$KEYCHAIN_PATH"
60+
security find-identity -v
61+
62+
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
63+
cp "$PP_PATH" ~/Library/MobileDevice/Provisioning\ Profiles/
64+
65+
# --- Install API key ---
66+
- name: Install App Store Connect API key
67+
env:
68+
ASC_KEY_BASE64: ${{ secrets.ASC_KEY_BASE64 }}
69+
ASC_KEY_ID: ${{ secrets.ASC_KEY_ID }}
70+
run: |
71+
mkdir -p ~/.private_keys
72+
echo -n "$ASC_KEY_BASE64" | base64 --decode \
73+
-o ~/.private_keys/AuthKey_${ASC_KEY_ID}.p8
74+
75+
# --- Archive ---
76+
- name: Archive
77+
run: |
78+
xcodebuild archive \
79+
-project "$PROJECT" \
80+
-scheme "$SCHEME" \
81+
-destination 'generic/platform=macOS' \
82+
-configuration Release \
83+
-archivePath "$RUNNER_TEMP/App.xcarchive" \
84+
CODE_SIGN_STYLE=Manual \
85+
CODE_SIGN_IDENTITY="Apple Distribution"
86+
87+
# --- Export and upload in one step ---
88+
- name: Export and upload to App Store Connect
89+
run: |
90+
xcodebuild -exportArchive \
91+
-archivePath "$RUNNER_TEMP/App.xcarchive" \
92+
-exportOptionsPlist AmorphousMemoryMark/ExportOptions.plist \
93+
-exportPath "$RUNNER_TEMP/export" \
94+
-authenticationKeyPath ~/.private_keys/AuthKey_${{ secrets.ASC_KEY_ID }}.p8 \
95+
-authenticationKeyID ${{ secrets.ASC_KEY_ID }} \
96+
-authenticationKeyIssuerID ${{ secrets.ASC_ISSUER_ID }} \
97+
-allowProvisioningUpdates
98+
99+
# --- Cleanup ---
100+
- name: Clean up keychain
101+
if: always()
102+
run: security delete-keychain "$RUNNER_TEMP/signing.keychain-db" || true
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>method</key>
6+
<string>app-store-connect</string>
7+
<key>destination</key>
8+
<string>upload</string>
9+
<key>teamID</key>
10+
<string>4G5652JFRC</string>
11+
<key>signingStyle</key>
12+
<string>manual</string>
13+
<key>installerSigningCertificate</key>
14+
<string>3rd Party Mac Developer Installer</string>
15+
<key>signingCertificate</key>
16+
<string>Apple Distribution</string>
17+
<key>provisioningProfiles</key>
18+
<dict>
19+
<key>com.katsurashareware.AmorphousMemoryMark</key>
20+
<string>com.katsurashareware.AmorphousMemoryMark</string>
21+
</dict>
22+
<key>generateAppStoreInformation</key>
23+
<true/>
24+
<key>uploadSymbols</key>
25+
<true/>
26+
<key>uploadBitcode</key>
27+
<false/>
28+
</dict>
29+
</plist>

README.md

Lines changed: 87 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,88 @@
11
# AmorphousMemoryMark
2-
AmorphousMemoryMark
2+
A macOS memory benchmark tool that measures read/write performance in GB/s.
3+
4+
[![Download on the Mac App Store](https://developer.apple.com/app-store/marketing/guidelines/images/badge-download-on-the-mac-app-store.svg)](https://apps.apple.com/us/app/amorphousmemorymark/id1495719766)
5+
6+
## Features
7+
- **Sequential benchmarks:** 1 MiB block reads/writes, single-thread (T=1) and multi-thread (T up to 64)
8+
- **Random benchmarks:** 4 KiB block reads/writes, single-thread (T=1) and multi-thread (T up to 64)
9+
- **Flexible test parameters:** configurable iteration count, test data (random/zero), measurement size (128 MiB – 64 GiB), and interval (0 s – 10 s)
10+
- **Tooltip:** shows results in GB/s
11+
- **Copy-pasteable results:** export measurements as formatted plain text
12+
13+
## Example Output
14+
```
15+
Sequential Read 128KiB (T= 8) : 18.95 GB/s (memmove)
16+
Sequential Write 128KiB (T= 8) : 23.79 GB/s (bzero)
17+
Random Read 4KiB (T= 8) : 20.04 GB/s (memmove)
18+
Random Write 4KiB (T= 8) : 11.09 GB/s (bzero)
19+
Sequential Read 1MiB (T=1) : 10.06 GB/s (memmove)
20+
Sequential Write 1MiB (T=1) : 16.37 GB/s (bzero)
21+
Random Read 4KiB (T=1) : 10.33 GB/s (memmove)
22+
Random Write 4KiB (T=1) : 7.85 GB/s (bzero)
23+
24+
Sequential Read 128KiB (T= 8) : 19.09 GB/s (rep movsb)
25+
Sequential Write 128KiB (T= 8) : 23.88 GB/s (rep stosb)
26+
Random Read 4KiB (T= 8) : 19.99 GB/s (rep movsb)
27+
Random Write 4KiB (T= 8) : 23.08 GB/s (rep stosb)
28+
Sequential Read 1MiB (T=1) : 10.34 GB/s (rep movsb)
29+
Sequential Write 1MiB (T=1) : 16.58 GB/s (rep stosb)
30+
Random Read 4KiB (T=1) : 10.06 GB/s (rep movsb)
31+
Random Write 4KiB (T=1) : 11.25 GB/s (rep stosb)
32+
33+
Sequential Read 128KiB (T= 8) : 19.99 GB/s (temporal)
34+
Sequential Write 128KiB (T= 8) : 10.97 GB/s (temporal)
35+
Random Read 4KiB (T= 8) : 19.81 GB/s (temporal)
36+
Random Write 4KiB (T= 8) : 11.22 GB/s (temporal)
37+
Sequential Read 1MiB (T=1) : 14.28 GB/s (temporal)
38+
Sequential Write 1MiB (T=1) : 8.71 GB/s (temporal)
39+
Random Read 4KiB (T=1) : 10.43 GB/s (temporal)
40+
Random Write 4KiB (T=1) : 7.90 GB/s (temporal)
41+
42+
Sequential Read 128KiB (T= 8) : 19.96 GB/s (non-temporal)
43+
Sequential Write 128KiB (T= 8) : 22.12 GB/s (non-temporal)
44+
Random Read 4KiB (T= 8) : 20.21 GB/s (non-temporal)
45+
Random Write 4KiB (T= 8) : 22.30 GB/s (non-temporal)
46+
Sequential Read 1MiB (T=1) : 14.07 GB/s (non-temporal)
47+
Sequential Write 1MiB (T=1) : 19.27 GB/s (non-temporal)
48+
Random Read 4KiB (T=1) : 10.30 GB/s (non-temporal)
49+
Random Write 4KiB (T=1) : 14.90 GB/s (non-temporal)
50+
```
51+
52+
## Requirements
53+
- macOS 10.9.5 or later
54+
- Xcode (to build from source)
55+
56+
## Building
57+
Open `AmorphousMemoryMark/AmorphousMemoryMark.xcodeproj` in Xcode and build the scheme. The app is sandboxed.
58+
59+
## Architecture
60+
The codebase is Objective-C, structured around a few key components:
61+
62+
| File | Role |
63+
|---|---|
64+
| `AppDelegate` | Main UI controller — handles toolbar actions, test size selection, test orchestration |
65+
| `memmark` | Core memory benchmark engine |
66+
| `memento` | memory info utilities |
67+
| `DiskMark` | manages threaded I/O with configurable block size, threads, and duration |
68+
| `DiskUtil` | human readable size string utility |
69+
| `DMTextView` | Custom text view with logarithmic bar graph rendering (matching CrystalDiskMark's visual style) |
70+
| `DMButton` / `DMButtonCell` | Custom button with dark mode support |
71+
| `DMMediaIcon` | Resolves storage device icons from IOKit kernel extension bundles |
72+
| `LinkTextField` | Clickable URL text field |
73+
74+
### How benchmarking works
75+
AmorphousMemoryMark spawns threads to perform I/O against a temporary file on the target volume.
76+
77+
## Usage
78+
1. Click **All** (or an individual test button).
79+
2. When finished, press ⌘S to save a screenshot, or copy the plain-text results.
80+
81+
## License
82+
MIT License. See [LICENSE](LICENSE) for details.
83+
84+
UI design used with permission from the author of CrystalDiskMark.
85+
86+
## Links
87+
- [Katsura Shareware](https://katsurashareware.com/)
88+
- [CrystalDiskMark](http://crystalmark.info/)

0 commit comments

Comments
 (0)