-
-
Notifications
You must be signed in to change notification settings - Fork 1
239 lines (210 loc) · 9.36 KB
/
macos-arm-latest.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
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