|
| 1 | +name: Build macOS |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + push: |
| 6 | + |
| 7 | +concurrency: |
| 8 | + group: ${{github.ref}}-mac |
| 9 | + cancel-in-progress: true |
| 10 | + |
| 11 | +env: |
| 12 | + BUILD_DIR: build-mac |
| 13 | + ARTIFACT_EXT: mac |
| 14 | + PLUGINVAL_VER: v1.0.4 |
| 15 | + VST3_VER: v3.8.0_build_66 |
| 16 | + CLAP_VER: "main" |
| 17 | + CLAP_VALIDATOR_VER: "0.3.2" |
| 18 | + |
| 19 | +jobs: |
| 20 | + build-mac: |
| 21 | + name: Build macOS (${{matrix.project}}) |
| 22 | + runs-on: macos-latest |
| 23 | + strategy: |
| 24 | + fail-fast: false |
| 25 | + matrix: |
| 26 | + project: [TemplateProject] |
| 27 | + # Add more projects here: |
| 28 | + # project: [TemplateProject, VisageTemplate] |
| 29 | + |
| 30 | + steps: |
| 31 | + - name: Check out repository |
| 32 | + uses: actions/checkout@v3.3.0 |
| 33 | + with: |
| 34 | + submodules: recursive |
| 35 | + |
| 36 | + - name: Cache Prebuilt Libs |
| 37 | + id: cache-deps |
| 38 | + uses: actions/cache@v3 |
| 39 | + with: |
| 40 | + path: | |
| 41 | + iPlug2/Dependencies/Build |
| 42 | + iPlug2/Dependencies/iPlug |
| 43 | + 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')}} |
| 44 | + |
| 45 | + - name: Get Prebuilt Libs |
| 46 | + if: steps.cache-deps.outputs.cache-hit != 'true' |
| 47 | + shell: bash |
| 48 | + run: | |
| 49 | + cd iPlug2/Dependencies |
| 50 | + ./download-prebuilt-libs.sh |
| 51 | +
|
| 52 | + - name: Cache VST3 SDK |
| 53 | + id: cache-vst3 |
| 54 | + uses: actions/cache@v3 |
| 55 | + with: |
| 56 | + path: | |
| 57 | + iPlug2/Dependencies/IPlug/VST3_SDK |
| 58 | + key: ${{runner.os}}-vst3-${{env.VST3_VER}} |
| 59 | + |
| 60 | + - name: Get VST3 SDK |
| 61 | + if: steps.cache-vst3.outputs.cache-hit != 'true' |
| 62 | + shell: bash |
| 63 | + run: | |
| 64 | + cd iPlug2/Dependencies/IPlug |
| 65 | + ./download-vst3-sdk.sh ${{env.VST3_VER}} build-validator |
| 66 | +
|
| 67 | + - name: Get VST2 SDK |
| 68 | + shell: bash |
| 69 | + env: |
| 70 | + VST2_SDK: ${{secrets.VST2_SDK}} |
| 71 | + run: | |
| 72 | + set -eo pipefail |
| 73 | + mkdir tmp |
| 74 | + echo $VST2_SDK | base64 -d > tmp/tmp.zip |
| 75 | + unzip tmp/tmp.zip -d tmp |
| 76 | + mv tmp/VST2_SDK/* iPlug2/Dependencies/IPlug/VST2_SDK |
| 77 | +
|
| 78 | + - name: Cache CLAP SDK |
| 79 | + id: cache-clap |
| 80 | + uses: actions/cache@v3 |
| 81 | + with: |
| 82 | + path: | |
| 83 | + iPlug2/Dependencies/IPlug/CLAP_SDK |
| 84 | + iPlug2/Dependencies/IPlug/CLAP_HELPERS |
| 85 | + key: ${{runner.os}}-clap-${{env.CLAP_VER}} |
| 86 | + |
| 87 | + - name: Get CLAP SDK |
| 88 | + if: steps.cache-clap.outputs.cache-hit != 'true' |
| 89 | + shell: bash |
| 90 | + run: | |
| 91 | + cd iPlug2/Dependencies/IPlug |
| 92 | + ./download-clap-sdks.sh ${{env.CLAP_VER}} |
| 93 | +
|
| 94 | + - name: Build |
| 95 | + shell: bash |
| 96 | + run: | |
| 97 | + set -eo pipefail |
| 98 | + cd ${{matrix.project}}/scripts |
| 99 | + ./makedist-mac.sh full zip |
| 100 | +
|
| 101 | + - name: Upload artifact |
| 102 | + uses: actions/upload-artifact@v4 |
| 103 | + with: |
| 104 | + name: ${{matrix.project}}-${{env.ARTIFACT_EXT}} |
| 105 | + path: | |
| 106 | + ${{matrix.project}}/${{env.BUILD_DIR}}/out |
| 107 | +
|
| 108 | + test-mac: |
| 109 | + name: Test macOS (${{matrix.project}}) |
| 110 | + runs-on: macos-latest |
| 111 | + needs: build-mac |
| 112 | + strategy: |
| 113 | + fail-fast: false |
| 114 | + matrix: |
| 115 | + project: [TemplateProject] |
| 116 | + # Add more projects here: |
| 117 | + # project: [TemplateProject, VisageTemplate] |
| 118 | + |
| 119 | + steps: |
| 120 | + - name: Download artifact |
| 121 | + uses: actions/download-artifact@v4 |
| 122 | + with: |
| 123 | + name: ${{matrix.project}}-${{env.ARTIFACT_EXT}} |
| 124 | + |
| 125 | + - name: Unzip files |
| 126 | + shell: bash |
| 127 | + run: | |
| 128 | + set -eo pipefail |
| 129 | + unzip *-${{env.ARTIFACT_EXT}}.zip |
| 130 | + unzip *-${{env.ARTIFACT_EXT}}-auval.zip |
| 131 | +
|
| 132 | + - name: Cache Pluginval |
| 133 | + id: cache-pluginval |
| 134 | + uses: actions/cache@v3 |
| 135 | + with: |
| 136 | + path: | |
| 137 | + ./pluginval.app |
| 138 | + key: ${{runner.os}}-pluginval-${{env.PLUGINVAL_VER}} |
| 139 | + |
| 140 | + - name: Get Pluginval |
| 141 | + if: steps.cache-pluginval.outputs.cache-hit != 'true' |
| 142 | + shell: bash |
| 143 | + run: | |
| 144 | + set -eo pipefail |
| 145 | + curl -fL "https://github.com/Tracktion/pluginval/releases/download/${{env.PLUGINVAL_VER}}/pluginval_macOS.zip" -o pluginval.zip |
| 146 | + unzip pluginval |
| 147 | +
|
| 148 | + - name: Restore VST3 SDK |
| 149 | + id: cache-vst3 |
| 150 | + uses: actions/cache/restore@v3 |
| 151 | + with: |
| 152 | + path: | |
| 153 | + iPlug2/Dependencies/IPlug/VST3_SDK |
| 154 | + key: ${{runner.os}}-vst3-${{env.VST3_VER}} |
| 155 | + |
| 156 | + - name: Cache CLAP Validator |
| 157 | + id: cache-clap-validator |
| 158 | + uses: actions/cache@v3 |
| 159 | + with: |
| 160 | + path: | |
| 161 | + ./clap-validator |
| 162 | + key: ${{runner.os}}-clap-validator-${{env.CLAP_VALIDATOR_VER}} |
| 163 | + |
| 164 | + - name: Get CLAP Validator |
| 165 | + if: steps.cache-clap-validator.outputs.cache-hit != 'true' |
| 166 | + shell: bash |
| 167 | + run: | |
| 168 | + set -eo pipefail |
| 169 | + curl -fL "https://github.com/free-audio/clap-validator/releases/download/${{env.CLAP_VALIDATOR_VER}}/clap-validator-${{env.CLAP_VALIDATOR_VER}}-macos-universal.tar.gz" -o clap-validator.tar.gz |
| 170 | + tar -xzf clap-validator.tar.gz |
| 171 | + mv binaries/clap-validator ./clap-validator |
| 172 | + rm -rf binaries clap-validator.tar.gz |
| 173 | +
|
| 174 | + - name: Test VST3 with VST3 Validator |
| 175 | + shell: bash |
| 176 | + run: | |
| 177 | + set -eo pipefail |
| 178 | + ./iPlug2/Dependencies/IPlug/VST3_SDK/validator ${{matrix.project}}.vst3 |
| 179 | +
|
| 180 | + - name: Test CLAP with CLAP Validator |
| 181 | + shell: bash |
| 182 | + run: | |
| 183 | + set -eo pipefail |
| 184 | + ./clap-validator validate ./${{matrix.project}}.clap |
| 185 | +
|
| 186 | + - name: Test VST3 with Pluginval |
| 187 | + shell: bash |
| 188 | + run: | |
| 189 | + set -eo pipefail |
| 190 | + pluginval.app/Contents/MacOS/pluginval --skip-gui-tests --validate-in-process --output-dir "./bin" --validate ${{matrix.project}}.vst3 |
| 191 | +
|
| 192 | + - name: Test AUv2 with Pluginval |
| 193 | + shell: bash |
| 194 | + run: | |
| 195 | + set -eo pipefail |
| 196 | + mkdir -p ~/Library/Audio/Plug-Ins/Components |
| 197 | + mv ${{matrix.project}}.component ~/Library/Audio/Plug-Ins/Components |
| 198 | + pgrep -x AudioComponentRegistrar >/dev/null && killall -9 AudioComponentRegistrar; echo "killed AudioComponentRegistrar" || echo "AudioComponentRegistrar Process not found" |
| 199 | + pluginval.app/Contents/MacOS/pluginval --skip-gui-tests --validate-in-process --output-dir "./bin" --validate ~/Library/Audio/Plug-Ins/Components/${{matrix.project}}.component |
| 200 | +
|
| 201 | + - name: Test AUv2 with auval |
| 202 | + shell: bash |
| 203 | + run: | |
| 204 | + set -eo pipefail |
| 205 | + ./validate_audiounit.sh config.h |
| 206 | +
|
| 207 | + # - name: Test AUv3 with auval |
| 208 | + # shell: bash |
| 209 | + # run: | |
| 210 | + # set -eo pipefail |
| 211 | + # APPEX_PATH="./${{matrix.project}}.app/Contents/PlugIns/${{matrix.project}}.appex" |
| 212 | + # if [ -d "$APPEX_PATH" ]; then |
| 213 | + # echo "Found AUv3 appex at $APPEX_PATH" |
| 214 | + # # Remove AUv2 component so auval finds the AUv3 (they share the same IDs) |
| 215 | + # echo "Removing AUv2 component to avoid ID conflict..." |
| 216 | + # rm -rf ~/Library/Audio/Plug-Ins/Components/${{matrix.project}}.component |
| 217 | + # # Install app to ~/Applications for AUv3 to be discoverable |
| 218 | + # echo "Installing app to ~/Applications..." |
| 219 | + # mkdir -p ~/Applications |
| 220 | + # cp -R ./${{matrix.project}}.app ~/Applications/ |
| 221 | + # echo "Registering AUv3 with pluginkit..." |
| 222 | + # pluginkit -a ~/Applications/${{matrix.project}}.app/Contents/PlugIns/${{matrix.project}}.appex |
| 223 | + # sleep 2 |
| 224 | + # pgrep -x AudioComponentRegistrar >/dev/null && killall -9 AudioComponentRegistrar; echo "killed AudioComponentRegistrar" || echo "AudioComponentRegistrar not running" |
| 225 | + # sleep 3 |
| 226 | + # echo "Running auval for AUv3..." |
| 227 | + # ./validate_audiounit.sh config.h |
| 228 | + # else |
| 229 | + # echo "No AUv3 appex found at $APPEX_PATH - skipping AUv3 validation" |
| 230 | + # fi |
| 231 | + |
| 232 | + # - name: Test AUv2 with auval (RTSafe) |
| 233 | + # shell: bash |
| 234 | + # run: | |
| 235 | + # ./validate_audiounit.sh config.h rtsafe |
| 236 | + |
| 237 | + - name: Upload artifact |
| 238 | + uses: actions/upload-artifact@v4 |
| 239 | + with: |
| 240 | + name: ${{matrix.project}}-${{env.ARTIFACT_EXT}}-pluginval |
| 241 | + path: ./bin |
0 commit comments