Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: update CI scripts #9

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
155 changes: 155 additions & 0 deletions .github/workflows/build-mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
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

jobs:
build-mac:
name: Build macOS
runs-on: macos-latest

steps:
- name: Check out repository
uses: actions/[email protected]
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: 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@v3
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@v3
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@v3
with:
name: ${{env.PROJECT_NAME}}-${{env.ARTIFACT_EXT}}-pluginval
path: ./bin
4 changes: 2 additions & 2 deletions .github/workflows/build-native.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Build Native

on:
# workflow_dispatch
push:
workflow_dispatch
# push:
# tags:
# - "v*"

Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
.DS_Store
xcuserdata
*.RPP-bak
build-*

build-mac/
build-win/
build-web/
*.ipch
*.db
*.suo
Expand Down
4 changes: 2 additions & 2 deletions TemplateProject/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define PLUG_MFR_ID 'Acme'
#define PLUG_URL_STR "https://iplug2.github.io"
#define PLUG_EMAIL_STR "[email protected]"
#define PLUG_COPYRIGHT_STR "Copyright 2021 Acme Inc"
#define PLUG_COPYRIGHT_STR "Copyright 2024 Acme Inc"
#define PLUG_CLASS_NAME TemplateProject

#define BUNDLE_NAME "TemplateProject"
Expand Down Expand Up @@ -47,7 +47,7 @@
#define AAX_PLUG_CATEGORY_STR "Effect"
#define AAX_DOES_AUDIOSUITE 1

#define VST3_SUBCATEGORY "Instrument|Synth"
#define VST3_SUBCATEGORY "Fx"

#define APP_NUM_CHANNELS 2
#define APP_N_VECTOR_WAIT 0
Expand Down
4 changes: 0 additions & 4 deletions TemplateProject/projects/TemplateProject-macOS.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,5 @@
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.network.server</key>
<true/>
</dict>
</plist>
Loading