Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
74 changes: 35 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ jobs:
env:
PLUGINVAL_VERSION: v1.0.4
VST3: build/Drosera_artefacts/Release/VST3/Drosera.vst3
CAN_NOTARIZE: ${{ secrets.APPLE_ID != '' }}
# Any signing secret means signing is wanted: build_pkg.sh then fails unless all are there.
CAN_NOTARIZE: ${{ secrets.APPLE_CERTIFICATE != '' || secrets.APPLE_CERTIFICATE_PASSWORD != '' || secrets.APPLE_ID != '' || secrets.APPLE_TEAM_ID != '' || secrets.APPLE_APP_PASSWORD != '' }}
steps:
- uses: actions/checkout@v4

Expand All @@ -42,7 +43,7 @@ jobs:
"-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64"

- name: Build
run: cmake --build build --target voice_allocator_test render_test render_cli ui_test plugin_host_test Drosera_VST3 Drosera_AU
run: cmake --build build --target voice_allocator_test render_test render_cli ui_test plugin_host_test Drosera_VST3 Drosera_AU Drosera_Standalone

- name: Test the release check
run: python3 tools/test_release_check.py
Expand Down Expand Up @@ -77,54 +78,49 @@ jobs:
- name: Check reference renders
run: tools/hardware-comparison/check_reference.sh build/render_cli

- name: Sign with Developer ID and notarize
if: inputs.version != '' && env.CAN_NOTARIZE == 'true'
- name: Test the package scripts
run: tools/package/test_package.sh build/Drosera_artefacts/Release

- name: Build and check the installer
env: # only this step sees them, not brew, pluginval or the tests
VERSION: ${{ inputs.version }}
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_APP_PASSWORD: ${{ secrets.APPLE_APP_PASSWORD }}
run: |
keychain="$RUNNER_TEMP/signing.keychain-db"
password=$(uuidgen)
security create-keychain -p "$password" "$keychain"
security unlock-keychain -p "$password" "$keychain"
security list-keychains -d user -s "$keychain"
echo "$APPLE_CERTIFICATE" | base64 --decode > "$RUNNER_TEMP/certificate.p12"
security import "$RUNNER_TEMP/certificate.p12" -k "$keychain" -P "$APPLE_CERTIFICATE_PASSWORD" -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple: -s -k "$password" "$keychain"
codesign --force --deep --options runtime --timestamp --sign "Developer ID Application" "$VST3"
ditto -c -k --keepParent "$VST3" "$RUNNER_TEMP/notarize.zip"
xcrun notarytool submit "$RUNNER_TEMP/notarize.zip" --apple-id "$APPLE_ID" --team-id "$APPLE_TEAM_ID" --password "$APPLE_APP_PASSWORD" --wait
xcrun stapler staple "$VST3"

- name: Package
if: inputs.version != ''
env:
VERSION: ${{ inputs.version }}
run: |
stage="$RUNNER_TEMP/stage"
mkdir -p "$stage/licenses"
ditto "$VST3" "$stage/Drosera.vst3"
cp LICENSE THIRD_PARTY_LICENSES.md docs/INSTALL.txt "$stage/"
cp LICENSE-AudreyII "$stage/licenses/"
cp third_party/DaisySP/LICENSE "$stage/licenses/DaisySP-LICENSE"
ditto -c -k --norsrc --noextattr "$stage" "Drosera-$VERSION-macos.zip"

# What a user unpacks is what must work, not the build folder.
unpacked="$RUNNER_TEMP/unpacked"
ditto -x -k "Drosera-$VERSION-macos.zip" "$unpacked"
ls -la "$unpacked"
test -f "$unpacked/Drosera.vst3/Contents/MacOS/Drosera"
test -x "$unpacked/Drosera.vst3/Contents/MacOS/Drosera"
codesign --verify --deep --strict "$unpacked/Drosera.vst3"
build/plugin_host_test_artefacts/Release/plugin_host_test "$unpacked/Drosera.vst3" tests/fixtures/state-baseline.bin
version="$VERSION"
[ -n "$version" ] || version=$(sed -nE 's/^project\(Drosera VERSION ([0-9.]+).*/\1/p' CMakeLists.txt)

# Sign only a versioned build, and only when the secrets exist. build_pkg.sh signs when all five
# variables are set, so the others are cleared for every other build.
if [ -n "$VERSION" ] && [ "$CAN_NOTARIZE" = true ]; then
keychain="$RUNNER_TEMP/signing.keychain-db"
password=$(uuidgen)
security create-keychain -p "$password" "$keychain"
security unlock-keychain -p "$password" "$keychain"
security list-keychains -d user -s "$keychain"
echo "$APPLE_CERTIFICATE" | base64 --decode > "$RUNNER_TEMP/certificate.p12"
security import "$RUNNER_TEMP/certificate.p12" -k "$keychain" -P "$APPLE_CERTIFICATE_PASSWORD" \
-T /usr/bin/codesign -T /usr/bin/productbuild
security set-key-partition-list -S apple-tool:,apple: -s -k "$password" "$keychain"
identities=$(security find-identity -v -p basic "$keychain")
DEVELOPER_ID_APPLICATION=$(sed -nE 's/.*"(Developer ID Application: [^"]*)".*/\1/p' <<< "$identities" | head -1)
DEVELOPER_ID_INSTALLER=$(sed -nE 's/.*"(Developer ID Installer: [^"]*)".*/\1/p' <<< "$identities" | head -1)
export DEVELOPER_ID_APPLICATION DEVELOPER_ID_INSTALLER
export REQUIRE_SIGNED=1
else
unset APPLE_ID APPLE_TEAM_ID APPLE_APP_PASSWORD
fi

tools/package/build_pkg.sh build/Drosera_artefacts/Release "$version" "Drosera-$version-macos.pkg"
tools/package/check_pkg.sh "Drosera-$version-macos.pkg"

- name: Upload the package
if: inputs.version != ''
uses: actions/upload-artifact@v4
with:
name: drosera-macos
path: Drosera-${{ inputs.version }}-macos.zip
path: Drosera-${{ inputs.version }}-macos.pkg
if-no-files-found: error
11 changes: 9 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
VERSION: ${{ needs.check.outputs.version }}
SIGNED: ${{ secrets.APPLE_CERTIFICATE != '' || secrets.APPLE_CERTIFICATE_PASSWORD != '' || secrets.APPLE_ID != '' || secrets.APPLE_TEAM_ID != '' || secrets.APPLE_APP_PASSWORD != '' }}
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
Expand All @@ -47,8 +48,14 @@ jobs:
- name: Create a draft release
run: |
python3 tools/release_check.py "$GITHUB_REF_NAME" > notes.md
sha256sum "Drosera-$VERSION-macos.zip" > SHA256SUMS.txt
if [ "$SIGNED" != true ]; then
printf '\n%s\n%s\n%s\n' \
'**Opening the installer.** This release is not notarized by Apple yet, so macOS blocks the installer the' \
'first time. Open it, close the warning, then go to System Settings → Privacy & Security and click' \
'**Open Anyway**. Nothing else needs unblocking.' >> notes.md
fi
sha256sum "Drosera-$VERSION-macos.pkg" > SHA256SUMS.txt
prerelease=""
case "$GITHUB_REF_NAME" in *-rc*) prerelease="--prerelease" ;; esac
gh release create "$GITHUB_REF_NAME" --draft $prerelease --title "Drosera $VERSION" --notes-file notes.md \
"Drosera-$VERSION-macos.zip" SHA256SUMS.txt
"Drosera-$VERSION-macos.pkg" SHA256SUMS.txt
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Ver

### Added

- An installer, `Drosera-X.Y.Z-macos.pkg`, in place of the zip. It installs the VST3, the Audio Unit and a
standalone app for all users, and each can be left out.
- The Audio Unit and the standalone app. The app asks for microphone access, to feed external sound into the loop.
- Three-string polyphony: up to three notes at once as separate feedback loops, with Coupling between them.
- POLY, LOCK, Coupling, Interval 2 and Interval 3. LOCK chooses between a tuned chord and the free drone.
- Three presets: Open Fifths, Sympathetic and Chord Keys.
Expand All @@ -15,6 +18,8 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Ver

### Changed

- The VST3 now installs to `/Library/Audio/Plug-Ins/VST3/`. If you copied 0.1.x to
`~/Library/Audio/Plug-Ins/VST3/`, delete that copy, or your host finds two.
- A new window, on one page with no tabs: the plant in the centre with Frequency and Body beside it, one row of FILTER,
REVERB, PONG and ECHO below, and a SETUP panel for Strings, Output and MIDI. Red marks the controls inside the
feedback loop, amber those after it.
Expand Down
9 changes: 9 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ build/plugin_host_test_artefacts/Release/plugin_host_test build/Drosera_artefact
tools/hardware-comparison/check_reference.sh build/render_cli
```

```bash
tools/package/build_pkg.sh build/Drosera_artefacts/Release 0.0.0 build/Drosera.pkg && tools/package/check_pkg.sh build/Drosera.pkg
```

```bash
tools/package/test_package.sh build/Drosera_artefacts/Release
```

## Code map

| Path | Holds |
Expand All @@ -43,6 +51,7 @@ tools/hardware-comparison/check_reference.sh build/render_cli
| `assets/fonts/` | The interface's fonts, embedded as binary data, with their licences |
| `third_party/` | Vendored DaisySP |
| `tools/hardware-comparison/` | Comparison against a real unit, and the reference checksums |
| `tools/package/` | The installer package: building it, checking it without installing, and its screens |
| `docs/superpowers/` | Design specs and implementation plans |

## Rules
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ if(DROSERA_BUILD_PLUGIN)
PRODUCT_NAME "Drosera"
IS_SYNTH TRUE
NEEDS_MIDI_INPUT TRUE
MICROPHONE_PERMISSION_ENABLED TRUE
MICROPHONE_PERMISSION_TEXT "Drosera uses audio input to feed external sound into its feedback loop."
COPY_PLUGIN_AFTER_BUILD FALSE)

target_sources(Drosera PRIVATE ${DROSERA_PLUGIN_SOURCES})
Expand Down
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

Contributions are welcome, and are accepted under the project's license, AGPLv3.

See [docs/BUILDING.md](docs/BUILDING.md) for how to build and test. CI must pass.
See [docs/BUILDING.md](docs/BUILDING.md) for how to build and test. CI must pass. If you change `tools/package/` or
the workflows, also run `tools/package/test_package.sh build/Drosera_artefacts/Release`.

## Rules

Expand Down
Loading
Loading