-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from valsteen/valsteen-patch-1
Create rust.yml
- Loading branch information
Showing
2 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Rust | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: macos-10.15 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build | ||
run: cargo build --verbose | ||
- name: Run tests | ||
run: cargo test --verbose | ||
- name: Release | ||
run: cargo build --verbose --release | ||
- name: Produce bundle | ||
run: ./osx_vst_bundler.sh | ||
- name: Upload a Build Artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: Mac OSX VST Bundle | ||
path: artefact | ||
if-no-files-found: error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/bin/bash | ||
|
||
ARTEFACT_DIRECTORY=artefact | ||
BUNDLE_NAME=NoteGenerator | ||
LIB_PATH=target/release/libnote_generator.dylib | ||
|
||
# Make the bundle folder | ||
mkdir -p "${ARTEFACT_DIRECTORY}/${BUNDLE_NAME}.vst/Contents/MacOS" | ||
|
||
# Create the PkgInfo | ||
echo "BNDL????" > "${ARTEFACT_DIRECTORY}/${BUNDLE_NAME}.vst/Contents/PkgInfo" | ||
|
||
#build the Info.Plist | ||
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?> | ||
<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"> | ||
<plist version=\"1.0\"> | ||
<dict> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>English</string> | ||
<key>CFBundleExecutable</key> | ||
<string>${BUNDLE_NAME}</string> | ||
<key>CFBundleGetInfoString</key> | ||
<string>vst</string> | ||
<key>CFBundleIconFile</key> | ||
<string></string> | ||
<key>CFBundleIdentifier</key> | ||
<string>com.rust-vst.${BUNDLE_NAME}</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>${BUNDLE_NAME}</string> | ||
<key>CFBundlePackageType</key> | ||
<string>BNDL</string> | ||
<key>CFBundleVersion</key> | ||
<string>1.$((RANDOM % 9999))</string> | ||
<key>CFBundleSignature</key> | ||
<string>$((RANDOM % 9999))</string> | ||
<key>CSResourcesFileMapped</key> | ||
<string></string> | ||
</dict> | ||
</plist>" > "${ARTEFACT_DIRECTORY}/${BUNDLE_NAME}.vst/Contents/Info.plist" | ||
|
||
# move the provided library to the correct location | ||
cp "${LIB_PATH}" "${ARTEFACT_DIRECTORY}/${BUNDLE_NAME}.vst/Contents/MacOS/${BUNDLE_NAME}" | ||
|
||
echo "Created bundle ${BUNDLE_NAME}.vst" |