From 4c88e29cd3d514e9208e2e26d4e8562fd9b9eff7 Mon Sep 17 00:00:00 2001 From: Oli Larkin Date: Sun, 2 Mar 2025 12:35:32 +0100 Subject: [PATCH 1/7] [DROP] Disable build-native.yml GHA workflow build on push --- .github/workflows/build-native.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-native.yml b/.github/workflows/build-native.yml index a5b527e..70e1bde 100644 --- a/.github/workflows/build-native.yml +++ b/.github/workflows/build-native.yml @@ -1,8 +1,8 @@ name: Build Native on: - # workflow_dispatch - push: + workflow_dispatch + # push: # tags: # - "v*" From b5e35505b94e7e2630a486aba26ac22bca926362 Mon Sep 17 00:00:00 2001 From: Oli Larkin Date: Sat, 25 Feb 2023 18:02:03 +0100 Subject: [PATCH 2/7] Add new build-mac.yml GHA workflow --- .github/workflows/build-mac.yml | 171 ++++++++++++++++++++++++++++++++ .gitignore | 5 +- 2 files changed, 174 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build-mac.yml diff --git a/.github/workflows/build-mac.yml b/.github/workflows/build-mac.yml new file mode 100644 index 0000000..5acc3db --- /dev/null +++ b/.github/workflows/build-mac.yml @@ -0,0 +1,171 @@ +name: Build macOS + +on: + workflow_dispatch: + push: + +concurrency: + group: ${{github.ref}} + cancel-in-progress: true + +env: + PROJECT_NAME: TemplateProject + BUILD_DIR: build-mac + ARTIFACT_EXT: mac + PLUGINVAL_VER: v1.0.2 + VST3_VER: v3.7.9_build_61 + CLAP_VER: v1.2.5 + +jobs: + build-mac: + name: Build macOS + runs-on: macos-latest + + steps: + - name: Check out repository + uses: actions/checkout@v3.3.0 + with: + submodules: recursive + + - name: Cache Prebuilt Libs + id: cache-deps + uses: actions/cache@v3 + with: + path: | + iPlug2/Dependencies/Build + iPlug2/Dependencies/iPlug + key: ${{runner.os}}-deps-${{hashFiles('iPlug2/Dependencies/download-prebuilt-libs.sh', 'iPlug2/Dependencies/IGraphics/build-igraphics-libs-mac.sh', 'iPlug2/Dependencies/IGraphics/build-skia-mac.sh')}} + + - name: Get Prebuilt Libs + if: steps.cache-deps.outputs.cache-hit != 'true' + shell: bash + run: | + cd iPlug2/Dependencies + ./download-prebuilt-libs.sh + + - name: Cache VST3 SDK + id: cache-vst3 + uses: actions/cache@v3 + with: + path: | + iPlug2/Dependencies/IPlug/VST3_SDK + key: ${{runner.os}}-vst3-${{env.VST3_VER}} + + - name: Get VST3 SDK + if: steps.cache-vst3.outputs.cache-hit != 'true' + shell: bash + run: | + cd iPlug2/Dependencies/IPlug + ./download-vst3-sdk.sh ${{env.VST3_VER}} build-validator + + - name: Cache CLAP SDK + id: cache-clap + uses: actions/cache@v3 + with: + path: | + iPlug2/Dependencies/IPlug/CLAP_SDK + key: ${{runner.os}}-clap-${{env.CLAP_VER}} + + - name: Get CLAP SDK + if: steps.cache-clap.outputs.cache-hit != 'true' + shell: bash + run: | + cd iPlug2/Dependencies/IPlug + ./download-clap-sdks.sh ${{env.CLAP_VER}} + + - name: Get VST2 SDK + shell: bash + env: + VST2_SDK: ${{secrets.VST2_SDK}} + run: | + mkdir tmp + echo $VST2_SDK | base64 -d > tmp/tmp.zip + unzip tmp/tmp.zip -d tmp + mv tmp/VST2_SDK/* iPlug2/Dependencies/IPlug/VST2_SDK + + - name: Build + shell: bash + run: | + cd ${{env.PROJECT_NAME}}/scripts + ./makedist-mac.sh full zip + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: ${{env.PROJECT_NAME}}-${{env.ARTIFACT_EXT}} + path: | + ${{env.PROJECT_NAME}}/${{env.BUILD_DIR}}/out + + test-mac: + name: Test macOS + runs-on: macos-latest + needs: build-mac + + steps: + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: ${{env.PROJECT_NAME}}-${{env.ARTIFACT_EXT}} + + - name: Unzip files + shell: bash + run: | + unzip *-${{env.ARTIFACT_EXT}}.zip + unzip *-${{env.ARTIFACT_EXT}}-auval.zip + + - name: Cache Pluginval + id: cache-pluginval + uses: actions/cache@v3 + with: + path: | + ./pluginval.app + key: ${{runner.os}}-pluginval-${{env.PLUGINVAL_VER}} + + - name: Get Pluginval + if: steps.cache-pluginval.outputs.cache-hit != 'true' + shell: bash + run: | + curl -L "https://github.com/Tracktion/pluginval/releases/download/${{env.PLUGINVAL_VER}}/pluginval_macOS.zip" -o pluginval.zip + unzip pluginval + + - name: Restore VST3 SDK + id: cache-vst3 + uses: actions/cache/restore@v3 + with: + path: | + iPlug2/Dependencies/IPlug/VST3_SDK + key: ${{runner.os}}-vst3-${{env.VST3_VER}} + + - name: Test VST3 with VST3 Validator + shell: bash + run: | + ./iPlug2/Dependencies/IPlug/VST3_SDK/validator ${{env.PROJECT_NAME}}.vst3 + + - name: Test VST3 with Pluginval + shell: bash + run: | + pluginval.app/Contents/MacOS/pluginval --skip-gui-tests --validate-in-process --output-dir "./bin" --validate ${{env.PROJECT_NAME}}.vst3 || exit 1 + + - name: Test AUv2 with Pluginval + shell: bash + run: | + mkdir -p ~/Library/Audio/Plug-Ins/Components + mv ${{env.PROJECT_NAME}}.component ~/Library/Audio/Plug-Ins/Components + pgrep -x AudioComponentRegistrar >/dev/null && killall -9 AudioComponentRegistrar; echo "killed AudioComponentRegistrar" || echo "AudioComponentRegistrar Process not found" + pluginval.app/Contents/MacOS/pluginval --skip-gui-tests --validate-in-process --output-dir "./bin" --validate ~/Library/Audio/Plug-Ins/Components/${{env.PROJECT_NAME}}.component || exit 1 + + - name: Test AUv2 with auval + shell: bash + run: | + ./validate_audiounit.sh config.h + + # - name: Test AUv2 with auval (RTSafe) + # shell: bash + # run: | + # ./validate_audiounit.sh config.h rtsafe + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: ${{env.PROJECT_NAME}}-${{env.ARTIFACT_EXT}}-pluginval + path: ./bin diff --git a/.gitignore b/.gitignore index e52a453..bdfaef8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,9 @@ .DS_Store xcuserdata *.RPP-bak -build-* - +build-mac/ +build-win/ +build-web/ *.ipch *.db *.suo From a64a547922ddac17b07452151ef81a6c4d3ce9b4 Mon Sep 17 00:00:00 2001 From: Oli Larkin Date: Sun, 26 Feb 2023 11:28:25 +0100 Subject: [PATCH 3/7] Mac build script: zips validate_audiounit.sh --- TemplateProject/scripts/makedist-mac.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/TemplateProject/scripts/makedist-mac.sh b/TemplateProject/scripts/makedist-mac.sh index 6e00296..d274c90 100755 --- a/TemplateProject/scripts/makedist-mac.sh +++ b/TemplateProject/scripts/makedist-mac.sh @@ -358,6 +358,14 @@ echo "packaging dSYMs" echo "" zip -r ./build-mac/$ARCHIVE_NAME-dSYMs.zip ./build-mac/*.dSYM +#--------------------------------------------------------------------------------------------------------- +# auval +sudo rm -R -f build-mac/*-auval.zip + +echo "packaging auval script" +echo "" +zip -j ./build-mac/$ARCHIVE_NAME-auval.zip ./config.h ./../iPlug2/Scripts/validate_audiounit.sh + #--------------------------------------------------------------------------------------------------------- # prepare out folder for CI From 5b46427069144b48f70947b2805774269d5621d9 Mon Sep 17 00:00:00 2001 From: Oli Larkin Date: Sun, 26 Feb 2023 12:22:42 +0100 Subject: [PATCH 4/7] Mac build script: remove -UseModernBuildSystem=NO --- TemplateProject/scripts/makedist-mac.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TemplateProject/scripts/makedist-mac.sh b/TemplateProject/scripts/makedist-mac.sh index d274c90..35cfcbd 100755 --- a/TemplateProject/scripts/makedist-mac.sh +++ b/TemplateProject/scripts/makedist-mac.sh @@ -154,7 +154,7 @@ fi #--------------------------------------------------------------------------------------------------------- # build xcode project. Change target to build individual formats, or add to All target in the xcode project -xcodebuild -project ./projects/$PLUGIN_NAME-macOS.xcodeproj -xcconfig ./config/$PLUGIN_NAME-mac.xcconfig DEMO_VERSION=$DEMO -target "All" -UseModernBuildSystem=NO -configuration Release | tee build-mac.log | xcpretty #&& exit ${PIPESTATUS[0]} +xcodebuild -project ./projects/$PLUGIN_NAME-macOS.xcodeproj -xcconfig ./config/$PLUGIN_NAME-mac.xcconfig DEMO_VERSION=$DEMO -target "All" -configuration Release | tee build-mac.log | xcpretty #&& exit ${PIPESTATUS[0]} if [ "${PIPESTATUS[0]}" -ne "0" ]; then echo "ERROR: build failed, aborting" From 855fbe9569dc9385c93c1a396310c4458395e750 Mon Sep 17 00:00:00 2001 From: Oli Larkin Date: Sun, 26 Feb 2023 15:14:02 +0100 Subject: [PATCH 5/7] WIP: Improve mac build script --- TemplateProject/scripts/makedist-mac.sh | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/TemplateProject/scripts/makedist-mac.sh b/TemplateProject/scripts/makedist-mac.sh index 35cfcbd..f0ac2e9 100755 --- a/TemplateProject/scripts/makedist-mac.sh +++ b/TemplateProject/scripts/makedist-mac.sh @@ -11,14 +11,15 @@ if [ -d build-mac ]; then fi #--------------------------------------------------------------------------------------------------------- -#variables +# variables IPLUG2_ROOT=../iPlug2 XCCONFIG=$IPLUG2_ROOT/../common-mac.xcconfig SCRIPTS=$IPLUG2_ROOT/Scripts -# CODESIGN disabled by default. -CODESIGN=0 +# CODE_SIGN disabled by default. +CODE_SIGN=0 +NOTARIZE=0 # macOS codesigning/notarization NOTARIZE_BUNDLE_ID=com.AcmeInc.TemplateProject @@ -118,7 +119,7 @@ echo "" touch *.cpp #--------------------------------------------------------------------------------------------------------- -#remove existing binaries +# remove existing binaries echo "remove existing binaries" echo "" @@ -154,7 +155,7 @@ fi #--------------------------------------------------------------------------------------------------------- # build xcode project. Change target to build individual formats, or add to All target in the xcode project -xcodebuild -project ./projects/$PLUGIN_NAME-macOS.xcodeproj -xcconfig ./config/$PLUGIN_NAME-mac.xcconfig DEMO_VERSION=$DEMO -target "All" -configuration Release | tee build-mac.log | xcpretty #&& exit ${PIPESTATUS[0]} +xcodebuild -project ./projects/$PLUGIN_NAME-macOS.xcodeproj -xcconfig ./config/$PLUGIN_NAME-mac.xcconfig DEMO_VERSION=$DEMO -configuration Release | tee build-mac.log | xcpretty #&& exit ${PIPESTATUS[0]} if [ "${PIPESTATUS[0]}" -ne "0" ]; then echo "ERROR: build failed, aborting" @@ -221,7 +222,7 @@ if [ -d $CLAP ]; then strip -x $CLAP/Contents/MacOS/$PLUGIN_NAME fi -if [ $CODESIGN == 1 ]; then +if [ $CODE_SIGN == 1 ]; then #--------------------------------------------------------------------------------------------------------- # code sign AAX binary with wraptool @@ -259,7 +260,7 @@ if [ $BUILD_INSTALLER == 1 ]; then ./scripts/makeinstaller-mac.sh $FULL_VERSION - if [ $CODESIGN == 1 ]; then + if [ $CODE_SIGN == 1 ]; then echo "code-sign installer for Gatekeeper on macOS 10.8+" echo "" mv "${PKG}" "${PKG_US}" @@ -267,7 +268,7 @@ if [ $BUILD_INSTALLER == 1 ]; then rm -R -f "${PKG_US}" fi - #set installer icon + # set installer icon ./$SCRIPTS/SetFileIcon -image resources/$PLUGIN_NAME.icns -file "${PKG}" #--------------------------------------------------------------------------------------------------------- @@ -286,9 +287,9 @@ if [ $BUILD_INSTALLER == 1 ]; then sudo rm -R -f build-mac/installer/ - if [ $CODESIGN == 1 ]; then + if [ $NOTARIZE == 1 ]; then #--------------------------------------------------------------------------------------------------------- - #notarize dmg + # notarize dmg echo "notarizing" echo "" # you need to create an app-specific id/password https://support.apple.com/en-us/HT204397 @@ -359,7 +360,7 @@ echo "" zip -r ./build-mac/$ARCHIVE_NAME-dSYMs.zip ./build-mac/*.dSYM #--------------------------------------------------------------------------------------------------------- -# auval +# auval tools sudo rm -R -f build-mac/*-auval.zip echo "packaging auval script" From 0de216e9259eede659e27d0fc829c29dbf799797 Mon Sep 17 00:00:00 2001 From: Oli Larkin Date: Sun, 2 Mar 2025 13:16:12 +0100 Subject: [PATCH 6/7] Xcode project: Use AUv3App target in All, rather than App --- .../project.pbxproj | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/TemplateProject/projects/TemplateProject-macOS.xcodeproj/project.pbxproj b/TemplateProject/projects/TemplateProject-macOS.xcodeproj/project.pbxproj index 668a597..fd3d9f2 100644 --- a/TemplateProject/projects/TemplateProject-macOS.xcodeproj/project.pbxproj +++ b/TemplateProject/projects/TemplateProject-macOS.xcodeproj/project.pbxproj @@ -13,8 +13,8 @@ buildPhases = ( ); dependencies = ( + 4F61D85E2D74836400578AA8 /* PBXTargetDependency */, 4F61D8582D7482DA00578AA8 /* PBXTargetDependency */, - 4F06F18623566DC800FD0962 /* PBXTargetDependency */, 4F78DAFA13B6436B0032E0F3 /* PBXTargetDependency */, 4F9828F8140A9F0200F3FCC1 /* PBXTargetDependency */, ); @@ -267,13 +267,6 @@ /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 4F06F18523566DC800FD0962 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 089C1669FE841209C02AAC07 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 4FD16A0813B63081001D0217; - remoteInfo = APP; - }; 4F3EE1BC231438D000004786 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 089C1669FE841209C02AAC07 /* Project object */; @@ -288,6 +281,13 @@ remoteGlobalIDString = 4F8E0FDF2BF5F3B500D360CE; remoteInfo = CLAP; }; + 4F61D85D2D74836400578AA8 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 089C1669FE841209C02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 4F3EE1BA231438D000004786; + remoteInfo = AUv3App; + }; 4F78BE3522E742DE00AD537E /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 089C1669FE841209C02AAC07 /* Project object */; @@ -2519,11 +2519,6 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 4F06F18623566DC800FD0962 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 4FD16A0813B63081001D0217 /* APP */; - targetProxy = 4F06F18523566DC800FD0962 /* PBXContainerItemProxy */; - }; 4F3EE1BB231438D000004786 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 4F78BE0122E73D0800AD537E /* TemplateProjectAU */; @@ -2534,6 +2529,11 @@ target = 4F8E0FDF2BF5F3B500D360CE /* CLAP */; targetProxy = 4F61D8572D7482DA00578AA8 /* PBXContainerItemProxy */; }; + 4F61D85E2D74836400578AA8 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 4F3EE1BA231438D000004786 /* AUv3App */; + targetProxy = 4F61D85D2D74836400578AA8 /* PBXContainerItemProxy */; + }; 4F78BE3622E742DE00AD537E /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 4F78BE0122E73D0800AD537E /* TemplateProjectAU */; From 2aefb3d8e067d731ef137c412fba1dbc74f4cd82 Mon Sep 17 00:00:00 2001 From: Oli Larkin Date: Sun, 2 Mar 2025 15:32:33 +0100 Subject: [PATCH 7/7] Revert "Xcode project: BuildIndependentTargetsInParallel = YES;" This reverts commit 71e99649613616dcb8e07449375cd5557a48d1c3. --- .../projects/TemplateProject-iOS.xcodeproj/project.pbxproj | 1 - .../projects/TemplateProject-macOS.xcodeproj/project.pbxproj | 1 - 2 files changed, 2 deletions(-) diff --git a/TemplateProject/projects/TemplateProject-iOS.xcodeproj/project.pbxproj b/TemplateProject/projects/TemplateProject-iOS.xcodeproj/project.pbxproj index ae2343e..a8c4d1d 100644 --- a/TemplateProject/projects/TemplateProject-iOS.xcodeproj/project.pbxproj +++ b/TemplateProject/projects/TemplateProject-iOS.xcodeproj/project.pbxproj @@ -743,7 +743,6 @@ 91D3DA0C1B023C03008FFFBB /* Project object */ = { isa = PBXProject; attributes = { - BuildIndependentTargetsInParallel = YES; LastSwiftUpdateCheck = 0730; LastUpgradeCheck = 1250; TargetAttributes = { diff --git a/TemplateProject/projects/TemplateProject-macOS.xcodeproj/project.pbxproj b/TemplateProject/projects/TemplateProject-macOS.xcodeproj/project.pbxproj index fd3d9f2..f8a0303 100644 --- a/TemplateProject/projects/TemplateProject-macOS.xcodeproj/project.pbxproj +++ b/TemplateProject/projects/TemplateProject-macOS.xcodeproj/project.pbxproj @@ -1879,7 +1879,6 @@ 089C1669FE841209C02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - BuildIndependentTargetsInParallel = YES; LastUpgradeCheck = 1320; TargetAttributes = { 4F20EEC8132C69FE0030E34C = {