|
| 1 | +name: Build macOS |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + push: |
| 6 | + |
| 7 | +concurrency: |
| 8 | + group: ${{github.ref}} |
| 9 | + cancel-in-progress: true |
| 10 | + |
| 11 | +env: |
| 12 | + PROJECT_NAME: TemplateProject |
| 13 | + BUILD_DIR: build-mac |
| 14 | + ARTIFACT_EXT: mac |
| 15 | + PLUGINVAL_VER: v1.0.2 |
| 16 | + VST3_VER: v3.7.9_build_61 |
| 17 | + CLAP_VER: v1.2.5 |
| 18 | + |
| 19 | +jobs: |
| 20 | + build-mac: |
| 21 | + name: Build macOS |
| 22 | + runs-on: macos-latest |
| 23 | + |
| 24 | + steps: |
| 25 | + - name: Check out repository |
| 26 | + |
| 27 | + with: |
| 28 | + submodules: recursive |
| 29 | + |
| 30 | + - name: Cache Prebuilt Libs |
| 31 | + id: cache-deps |
| 32 | + uses: actions/cache@v3 |
| 33 | + with: |
| 34 | + path: | |
| 35 | + iPlug2/Dependencies/Build |
| 36 | + iPlug2/Dependencies/iPlug |
| 37 | + 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')}} |
| 38 | + |
| 39 | + - name: Get Prebuilt Libs |
| 40 | + if: steps.cache-deps.outputs.cache-hit != 'true' |
| 41 | + shell: bash |
| 42 | + run: | |
| 43 | + cd iPlug2/Dependencies |
| 44 | + ./download-prebuilt-libs.sh |
| 45 | +
|
| 46 | + - name: Cache VST3 SDK |
| 47 | + id: cache-vst3 |
| 48 | + uses: actions/cache@v3 |
| 49 | + with: |
| 50 | + path: | |
| 51 | + iPlug2/Dependencies/IPlug/VST3_SDK |
| 52 | + key: ${{runner.os}}-vst3-${{env.VST3_VER}} |
| 53 | + |
| 54 | + - name: Get VST3 SDK |
| 55 | + if: steps.cache-vst3.outputs.cache-hit != 'true' |
| 56 | + shell: bash |
| 57 | + run: | |
| 58 | + cd iPlug2/Dependencies/IPlug |
| 59 | + ./download-vst3-sdk.sh ${{env.VST3_VER}} build-validator |
| 60 | +
|
| 61 | + - name: Cache CLAP SDK |
| 62 | + id: cache-clap |
| 63 | + uses: actions/cache@v3 |
| 64 | + with: |
| 65 | + path: | |
| 66 | + iPlug2/Dependencies/IPlug/CLAP_SDK |
| 67 | + key: ${{runner.os}}-clap-${{env.CLAP_VER}} |
| 68 | + |
| 69 | + - name: Get CLAP SDK |
| 70 | + if: steps.cache-clap.outputs.cache-hit != 'true' |
| 71 | + shell: bash |
| 72 | + run: | |
| 73 | + cd iPlug2/Dependencies/IPlug |
| 74 | + ./download-clap-sdks.sh ${{env.CLAP_VER}} |
| 75 | +
|
| 76 | + - name: Get VST2 SDK |
| 77 | + shell: bash |
| 78 | + env: |
| 79 | + VST2_SDK: ${{secrets.VST2_SDK}} |
| 80 | + run: | |
| 81 | + mkdir tmp |
| 82 | + echo $VST2_SDK | base64 -d > tmp/tmp.zip |
| 83 | + unzip tmp/tmp.zip -d tmp |
| 84 | + mv tmp/VST2_SDK/* iPlug2/Dependencies/IPlug/VST2_SDK |
| 85 | +
|
| 86 | + - name: Build |
| 87 | + shell: bash |
| 88 | + run: | |
| 89 | + cd ${{env.PROJECT_NAME}}/scripts |
| 90 | + ./makedist-mac.sh full zip |
| 91 | +
|
| 92 | + - name: Upload artifact |
| 93 | + uses: actions/upload-artifact@v4 |
| 94 | + with: |
| 95 | + name: ${{env.PROJECT_NAME}}-${{env.ARTIFACT_EXT}} |
| 96 | + path: | |
| 97 | + ${{env.PROJECT_NAME}}/${{env.BUILD_DIR}}/out |
| 98 | +
|
| 99 | + test-mac: |
| 100 | + name: Test macOS |
| 101 | + runs-on: macos-latest |
| 102 | + needs: build-mac |
| 103 | + |
| 104 | + steps: |
| 105 | + - name: Download artifact |
| 106 | + uses: actions/download-artifact@v4 |
| 107 | + with: |
| 108 | + name: ${{env.PROJECT_NAME}}-${{env.ARTIFACT_EXT}} |
| 109 | + |
| 110 | + - name: Unzip files |
| 111 | + shell: bash |
| 112 | + run: | |
| 113 | + unzip *-${{env.ARTIFACT_EXT}}.zip |
| 114 | + unzip *-${{env.ARTIFACT_EXT}}-auval.zip |
| 115 | +
|
| 116 | + - name: Cache Pluginval |
| 117 | + id: cache-pluginval |
| 118 | + uses: actions/cache@v3 |
| 119 | + with: |
| 120 | + path: | |
| 121 | + ./pluginval.app |
| 122 | + key: ${{runner.os}}-pluginval-${{env.PLUGINVAL_VER}} |
| 123 | + |
| 124 | + - name: Get Pluginval |
| 125 | + if: steps.cache-pluginval.outputs.cache-hit != 'true' |
| 126 | + shell: bash |
| 127 | + run: | |
| 128 | + curl -L "https://github.com/Tracktion/pluginval/releases/download/${{env.PLUGINVAL_VER}}/pluginval_macOS.zip" -o pluginval.zip |
| 129 | + unzip pluginval |
| 130 | +
|
| 131 | + - name: Restore VST3 SDK |
| 132 | + id: cache-vst3 |
| 133 | + uses: actions/cache/restore@v3 |
| 134 | + with: |
| 135 | + path: | |
| 136 | + iPlug2/Dependencies/IPlug/VST3_SDK |
| 137 | + key: ${{runner.os}}-vst3-${{env.VST3_VER}} |
| 138 | + |
| 139 | + - name: Test VST3 with VST3 Validator |
| 140 | + shell: bash |
| 141 | + run: | |
| 142 | + ./iPlug2/Dependencies/IPlug/VST3_SDK/validator ${{env.PROJECT_NAME}}.vst3 |
| 143 | +
|
| 144 | + - name: Test VST3 with Pluginval |
| 145 | + shell: bash |
| 146 | + run: | |
| 147 | + pluginval.app/Contents/MacOS/pluginval --skip-gui-tests --validate-in-process --output-dir "./bin" --validate ${{env.PROJECT_NAME}}.vst3 || exit 1 |
| 148 | +
|
| 149 | + - name: Test AUv2 with Pluginval |
| 150 | + shell: bash |
| 151 | + run: | |
| 152 | + mkdir -p ~/Library/Audio/Plug-Ins/Components |
| 153 | + mv ${{env.PROJECT_NAME}}.component ~/Library/Audio/Plug-Ins/Components |
| 154 | + pgrep -x AudioComponentRegistrar >/dev/null && killall -9 AudioComponentRegistrar; echo "killed AudioComponentRegistrar" || echo "AudioComponentRegistrar Process not found" |
| 155 | + 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 |
| 156 | +
|
| 157 | + - name: Test AUv2 with auval |
| 158 | + shell: bash |
| 159 | + run: | |
| 160 | + ./validate_audiounit.sh config.h |
| 161 | +
|
| 162 | + # - name: Test AUv2 with auval (RTSafe) |
| 163 | + # shell: bash |
| 164 | + # run: | |
| 165 | + # ./validate_audiounit.sh config.h rtsafe |
| 166 | + |
| 167 | + - name: Upload artifact |
| 168 | + uses: actions/upload-artifact@v4 |
| 169 | + with: |
| 170 | + name: ${{env.PROJECT_NAME}}-${{env.ARTIFACT_EXT}}-pluginval |
| 171 | + path: ./bin |
0 commit comments