Merge pull request #392 from StoneyDSP/preview #812
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: macos | |
on: | |
# Runs on all pushes | |
push: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# When pushing new commits, cancel any running builds on that branch | |
concurrency: | |
group: macos-latest-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
DISPLAY: :0 | |
CMAKE_BUILD_PARALLEL_LEVEL: 3 | |
CMAKE_INSTALL_PARALLEL_LEVEL: 3 | |
VCPKG_MAX_CONCURRENCY: 3 | |
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
HOMEBREW_NO_INSTALL_CLEANUP: 1 | |
RACK_SDK_VERSION_MAJOR: 2 | |
RACK_SDK_VERSION: 2.5.2 | |
RACK_SDK_PLATFORM: "mac-x64+arm64" | |
# STONEYVCV_VERSION_MAJOR: ${{ vars.STONEYVCV_VERSION_MAJOR }} | |
# STONEYVCV_VERSION_MINOR: ${{ vars.STONEYVCV_VERSION_MINOR }} | |
# STONEYVCV_VERSION_PATCH: ${{ vars.STONEYVCV_VERSION_PATCH }} | |
# STONEYVCV_VERSION: ${{ vars.STONEYVCV_VERSION_MAJOR }}.${{ vars.STONEYVCV_VERSION_MINOR }}.${{ vars.STONEYVCV_VERSION_PATCH }} | |
jobs: | |
macos: | |
runs-on: macos-latest | |
steps: | |
# Requirements | |
# https://vcvrack.com/manual/Building#Setting-up-your-development-environment | |
- name: Install VCV's macOS Deps | |
run: | | |
brew install coreutils git wget cmake autoconf automake libtool jq python zstd pkg-config sccache ninja tree | |
- name: checkout StoneyVCV | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- name: get Rack Executable | |
shell: bash | |
run: | | |
brew install --cask vcv-rack | |
# CI helpers | |
- name: Enable GitHub Actions Cache backend | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); | |
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
# Output package name (don't do this at home) | |
- name: make version | |
shell: bash | |
run: | | |
echo STONEYVCV_VERSION_MAJOR=${{ env.RACK_SDK_VERSION_MAJOR }} >> $GITHUB_ENV | |
echo STONEYVCV_VERSION_MINOR=0 >> $GITHUB_ENV | |
echo STONEYVCV_VERSION_PATCH=$(git rev-list HEAD | wc -l | awk '{$1=$1};1') >> $GITHUB_ENV | |
echo STONEYVCV_VERSION_TWEAK=$(git rev-parse HEAD | awk '{$1=$1};1') >> $GITHUB_ENV | |
echo STONEYVCV_VERSION_BUILD=$(git rev-parse --short HEAD | awk '{$1=$1};1') >> $GITHUB_ENV | |
echo STONEYVCV_VERSION_PACKAGE=${{ env.RACK_SDK_VERSION_MAJOR }}.0.$(git rev-list HEAD | wc -l | awk '{$1=$1};1') >> $GITHUB_ENV | |
echo STONEYVCV_VERSION=${{ env.RACK_SDK_VERSION_MAJOR }}.0.$(git rev-list HEAD | wc -l | awk '{$1=$1};1') >> $GITHUB_ENV | |
echo STONEYVCV_GIT_BRANCH=$(git rev-parse --abbrev-ref --symbolic-full-name HEAD | awk '{$1=$1};1') >> $GITHUB_ENV | |
- name: make dep | |
shell: bash | |
run: make dep -j 3 | |
# Developer workflow | |
- name: make workflow | |
shell: bash | |
run: make workflow -j 3 | |
# Deployment workflow | |
- name: make | |
shell: bash | |
run: make -j 3 | |
- name: make dist | |
shell: bash | |
run: make dist -j 3 | |
- name: make install | |
shell: bash | |
run: make install -j 3 | |
# List all artefact directories | |
- name: tree | |
shell: bash | |
run: | | |
tree ${{ github.workspace }}/dist | |
tree ${{ github.workspace }}/install | |
# Upload build artefacts | |
- name: upload vcvplugin | |
uses: actions/upload-artifact@v4 | |
with: | |
name: StoneyDSP-StoneyVCV-${{ env.STONEYVCV_VERSION_PACKAGE }}-mac-arm64.vcvplugin | |
path: ${{ github.workspace }}/dist/StoneyDSP-StoneyVCV-${{ env.STONEYVCV_VERSION_PACKAGE }}-mac-arm64.vcvplugin | |
if-no-files-found: error | |
- name: upload .sh | |
uses: actions/upload-artifact@v4 | |
with: | |
name: StoneyVCV-${{ env.STONEYVCV_VERSION_PACKAGE }}-Darwin.sh | |
path: ${{ github.workspace }}/install/StoneyVCV-${{ env.STONEYVCV_VERSION_PACKAGE }}-Darwin.sh | |
if-no-files-found: error | |
- name: upload .tar.gz | |
uses: actions/upload-artifact@v4 | |
with: | |
name: StoneyVCV-${{ env.STONEYVCV_VERSION_PACKAGE }}-Darwin.tar.gz | |
path: ${{ github.workspace }}/install/StoneyVCV-${{ env.STONEYVCV_VERSION_PACKAGE }}-Darwin.tar.gz | |
if-no-files-found: error | |
# Download build artefacts | |
- name: download | |
uses: actions/download-artifact@v4 |