Skip to content

Still working out this parameter array (this will fail CI/CD)... #115

Still working out this parameter array (this will fail CI/CD)...

Still working out this parameter array (this will fail CI/CD)... #115

name: macos-arm-latest
on:
workflow_dispatch: # lets you run a build from the UI
push:
# When pushing new commits, cancel any running builds on that branch
concurrency:
group: macos-arm-latest-${{ github.ref }}
cancel-in-progress: true
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
MULTI_CONFIG_TYPES: Debug;Release
BUILD_TYPE: Release
BUILD_DIR: Builds
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DISPLAY: :0 # linux pluginval needs this
CMAKE_BUILD_PARALLEL_LEVEL: 3 # Use up to 3 cpus to build juceaide, etc
VCPKG_MAX_CONCURRENCY: 3
VCPKG_OSX_ARCHITECTURES: "arm64;x86_64"
SCCACHE_GHA_ENABLED: "true"
SCCACHE_CACHE_MULTIARCH: 1 # for macos actions only!
HOMEBREW_NO_INSTALL_CLEANUP: 1
STONEYDSP_BIQUADS_CURRENT_VERSION: ${{ vars.STONEYDSP_BIQUADS_VERSION_CURRENT_MAJOR_MINOR_PATCH }}
STONEYDSP_CURRENT_JUCE_VERSION: ${{ vars.STONEYDSP_BIQUADS_JUCE_VERSION_CURRENT_MAJOR_MINOR_PATCH }}
jobs:
macos-arm:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: macos-14
steps:
- name: Install JUCE's macOS Deps
run: brew install ninja osxutils autoconf automake libtool m4 curl openssl sccache
# This block can be removed once 15.1 is default (JUCE requires it when building on macOS 14)
- name: Use latest Xcode on system (macOS)
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true # Get JUCE populated (if used)
- name: Cache the build
uses: mozilla-actions/sccache-action@v0.0.4
- name: vcpkg install
# You may pin to the exact commit or the version.
# uses: johnwason/vcpkg-action@7c4b562bb35ef5a01d9d728acc90100b107dee4d
uses: johnwason/vcpkg-action@v6
with:
# List of packages to build, separated by spaces. Cannot be used with manifest-dir
# pkgs: # optional
# vcpkg triplet to use
triplet: arm64-osx
# Extra vcpkg command line args (optional)
# extra-args: --allow-unsupported # optional
# Additional cache key component (optional)
cache-key: macos-14 # optional
# Disable cache (useful for release builds)
# disable-cache: # optional, default is false
# vcpkg revision to checkout.
revision: master # optional, default is
# GitHub token to authenticate API requests. Recommended to use github.token
token: ${{ github.token }}
# Directory containing vcpkg.json manifest file. Cannot be used with pkgs.
manifest-dir: ${{ github.workspace }} # optional, default is
# Use vcpkg built-in GitHub binary caching. If not specified, will use the dry-run based file cache.
github-binarycache: true
# Fetch depth for vcpkg checkout
# fetch-depth: # optional, default is 1
- name: Use Node.js 16.18.0
uses: actions/setup-node@v4
with:
node-version: 16.18.0
- name: npm install
run: npm install
- name: Configure (Debug)
working-directory: ${{github.workspace}}
shell: bash
# Configure CMake in a 'bin' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: >-
cmake --fresh -S${PWD}
-B${PWD}/${{ env.BUILD_DIR }}
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_C_COMPILER_LAUNCHER=sccache
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
-DSTONEYDSP_BIQUADS_BUILD_TESTS:BOOL=TRUE
-DCMAKE_INSTALL_PREFIX=${PWD}/install
-DVCPKG_HOST_TRIPLET:STRING=arm64-osx
-DVCPKG_TARGET_TRIPLET:STRING=arm64-osx
-DVCPKG_MANIFEST_MODE:BOOL=TRUE
-DCMAKE_TOOLCHAIN_FILE:FILEPATH="${PWD}/vcpkg/scripts/buildsystems/vcpkg.cmake"
-G "Ninja"
--compile-no-warning-as-error
--no-warn-unused-cli
- name: Build (Debug)
# Build your program with the given configuration
run: >-
cmake
--build ${PWD}/${{ env.BUILD_DIR }}
--config Debug
--parallel 4
--target all
- name: Test (Debug)
working-directory: ${{ github.workspace }}
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: >-
ctest
--test-dir ${PWD}/${{ env.BUILD_DIR }}
-C Debug
-j4
--rerun-failed
--output-on-failure
--verbose
- name: Install (Debug)
shell: bash
working-directory: ${{ github.workspace }}
# Install StoneyDSP with the given configuration
run: cmake --install ${PWD}/${{ env.BUILD_DIR }} --config Debug
- name: Configure (Release)
working-directory: ${{github.workspace}}
shell: bash
# Configure CMake in a 'bin' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: >-
cmake --fresh -S${PWD}
-B${PWD}/${{ env.BUILD_DIR }}
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_C_COMPILER_LAUNCHER=sccache
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
-DSTONEYDSP_BIQUADS_BUILD_TESTS:BOOL=TRUE
-DCMAKE_INSTALL_PREFIX=${PWD}/install
-DVCPKG_HOST_TRIPLET:STRING=arm64-osx
-DVCPKG_TARGET_TRIPLET:STRING=arm64-osx
-DVCPKG_MANIFEST_MODE:BOOL=TRUE
-DCMAKE_TOOLCHAIN_FILE:FILEPATH="${PWD}/vcpkg/scripts/buildsystems/vcpkg.cmake"
-G "Ninja"
--compile-no-warning-as-error
--no-warn-unused-cli
- name: Build (Release)
# Build your program with the given configuration
run: >-
cmake
--build ${PWD}/${{ env.BUILD_DIR }}
--config Release
--parallel 4
--target all
- name: Test (Release)
working-directory: ${{ github.workspace }}
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: >-
ctest
--test-dir ${PWD}/${{ env.BUILD_DIR }}
-C Release
-j4
--rerun-failed
--output-on-failure
--verbose
- name: Install (Release)
shell: bash
working-directory: ${{ github.workspace }}
# Install StoneyDSP with the given configuration
run: cmake --install ${PWD}/${{ env.BUILD_DIR }} --config Release
- name: Zip Source
shell: bash
working-directory: ${{ github.workspace }}
# Pack the StoneyDSP source code with the given configuration
run: cpack --config ${PWD}/${{ env.BUILD_DIR }}/CPackSourceConfig.cmake -B install -G ZIP
- name: Tar Source
shell: bash
working-directory: ${{ github.workspace }}
# Pack the StoneyDSP source code with the given configuration
run: cpack --config ${PWD}/${{ env.BUILD_DIR }}/CPackSourceConfig.cmake -B install -G TGZ
- name: Zip Build
shell: bash
working-directory: ${{github.workspace}}
# Pack the StoneyDSP source code with the given configuration
run: cpack --config ${PWD}/${{ env.BUILD_DIR }}/CPackConfig.cmake -B install -G ZIP
- name: Tar Build
shell: bash
working-directory: ${{github.workspace}}
# Pack the StoneyDSP source code with the given configuration
run: cpack --config ${PWD}/${{ env.BUILD_DIR }}/CPackConfig.cmake -B install -G TGZ
# - name: Upload Zip Source
# uses: actions/upload-artifact@v4
# with:
# name: StoneyDSP-v${{ env.STONEYDSP_BIQUADS_CURRENT_VERSION }}-Source.zip
# path: '${{ github.workspace }}/install/StoneyDSP-v${{ env.STONEYDSP_BIQUADS_CURRENT_VERSION }}-Source.zip'
# - name: Upload Tar Source
# uses: actions/upload-artifact@v4
# with:
# name: StoneyDSP-v${{ env.STONEYDSP_BIQUADS_CURRENT_VERSION }}-Source.tar.gz
# path: '${{ github.workspace }}/install/StoneyDSP-v${{ env.STONEYDSP_BIQUADS_CURRENT_VERSION }}-Source.tar.gz'
- name: Upload Zip Build
uses: actions/upload-artifact@v4
with:
name: StoneyDSP-Biquads-v${{ env.STONEYDSP_BIQUADS_CURRENT_VERSION }}-Darwin-arm64-JUCE-v${{ env.STONEYDSP_CURRENT_JUCE_VERSION }}.zip
path: '${{ github.workspace }}/install/StoneyDSP-Biquads-v${{ env.STONEYDSP_BIQUADS_CURRENT_VERSION }}-Darwin-arm64-JUCE-v${{ env.STONEYDSP_CURRENT_JUCE_VERSION }}.zip'
- name: Upload Tar Build
uses: actions/upload-artifact@v4
with:
name: StoneyDSP-Biquads-v${{ env.STONEYDSP_BIQUADS_CURRENT_VERSION }}-Darwin-arm64-JUCE-v${{ env.STONEYDSP_CURRENT_JUCE_VERSION }}.tar.gz
path: '${{ github.workspace }}/install/StoneyDSP-Biquads-v${{ env.STONEYDSP_BIQUADS_CURRENT_VERSION }}-Darwin-arm64-JUCE-v${{ env.STONEYDSP_CURRENT_JUCE_VERSION }}.tar.gz'
- name: Get Artifacts
uses: actions/download-artifact@v4