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