-
Notifications
You must be signed in to change notification settings - Fork 0
273 lines (259 loc) · 10.8 KB
/
cmake.yml
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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
name: CMake
on:
push:
branches:
- master
- internal_cppsound
pull_request:
branches:
- master
- develop
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: RelWithDebInfo
# This will change for later macOS versions, to /opt/homebrew.
HOMEBREW_PREFIX: /usr/local
jobs:
build:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- name: "macOS Latest Clang"
os: "macos-14"
cc: "clang"
cxx: "clang++"
- name: "Ubuntu Latest GCC"
os: ubuntu-latest
cc: "gcc"
cxx: "g++"
#~ - name: "Windows Latest MSVC"
#~ os: windows-latest
#~ cc: "cl"
#~ cxx: "cl"
#~ environment_script: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Install boost on macOS
uses: MarkusJx/install-boost@v2.4.5
id: install-boost-macos
if: runner.os == 'macOS'
with:
# REQUIRED: Specify the required boost version
# A list of supported versions can be found here:
# https://github.com/actions/boost-versions/blob/main/versions-manifest.json
boost_version: 1.79.0
# OPTIONAL: Specify a platform version
platform_version: 11
# OPTIONAL: Specify a custom install location
# Should be $GITHUB_WORKSPACE
# boost_install_dir: ${{ env.GITHUB_WORKSPACE }}
# OPTIONAL: Specify a toolset
toolset: clang
- name: Install boost on Linux
uses: MarkusJx/install-boost@v2.4.5
id: install-boost-linux
if: runner.os == 'Linux'
with:
# REQUIRED: Specify the required boost version
# A list of supported versions can be found here:
# https://github.com/actions/boost-versions/blob/main/versions-manifest.json
boost_version: 1.79.0
# OPTIONAL: Specify a platform version
platform_version: 20.04
# OPTIONAL: Specify a custom install location
# boost_install_dir: /home/runner/work/csound-ac/csound-ac
# OPTIONAL: Specify a toolset
toolset: gcc
- name: Install boost on Windows
uses: MarkusJx/install-boost@v2.4.5
id: install-boost-windows
if: runner.os == 'Windows'
with:
# REQUIRED: Specify the required boost version
# A list of supported versions can be found here:
# https://github.com/actions/boost-versions/blob/main/versions-manifest.json
boost_version: 1.79.0
# OPTIONAL: Specify a platform version
platform_version: 2022
# OPTIONAL: Specify a custom install location
# boost_install_dir: D:\a\csound-ac\csound-ac
# OPTIONAL: Specify a toolset
toolset: msvc
link: shared
- name: Build on Mac OS
# Most homebrew packages can be found in ${HOMEBREW_PREFIX}/opt.
if: runner.os == 'macOS'
run: |
echo "Installing tools..."
brew update
brew install python@3.11 --overwrite
brew upgrade
brew install graphviz
brew install doxygen
brew install texlive
echo "Installing dependencies..."
brew install opencv
brew install csound
ls -ll
echo "Updating all git submodules..."
git submodule update --init --recursive
git submodule status --recursive
echo "Environment:"
env
echo "Finished updating all git submodules."
echo "brew list csound:"
brew list csound
echo "brew list libsndfile:"
brew list libsndfile
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBOOST_ROOT=${{ steps.install-boost-macos.outputs.BOOST_ROOT }} -DCSOUND_INCLUDE_DIR=/usr/local/opt/csound/include -DCSOUND_LIBRARY=/usr/local/opt/csound/Frameworks/CsoundLib64.framework -DLIBSNDFILE_INCLUDE_DIR=/usr/local/Cellar/libsndfile/1.1.0/include -DLIBSNDFILE_LIBRARY=/usr/local/opt/libsndfile/lib/libsndfile.dylib -DBOOST_HAS_UNISTD_H=0
# Build with CMake.
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
echo "Documenting..."
cd ${{github.workspace}}/doc
doxygen
cd ..
echo "Packaging..."
cd build
pwd
sudo cpack -V -G ZIP
ls -ll
- name: Build on Linux
if: runner.os == 'Linux'
run: |
echo "Installing tools..."
sudo apt-get update
sudo apt-get install graphviz
sudo apt-get install doxygen
sudo apt-get install texlive
echo "Installing dependencies..."
sudo apt-get install libopencv-dev
sudo apt-get install libsndfile1-dev
sudo apt-get install libcsound64-dev
sudo apt-get install libcsnd6-6.0v5
sudo apt-get install libcsnd-dev
ls -ll
echo "Environment:"
env
echo "Trying to find csdl.h..."
#find /opt/runner . -name "csdl.h" -ls 2>/dev/null
find /home/runner . -name "csdl.h" -ls 2>/dev/null
find /usr . -name "csdl.h" -ls 2>/dev/null
echo "Trying to find csnd6 library..."
#find /opt/runner . -name "*csnd*" -ls 2>/dev/null
find /home/runner . -name "*csnd*" -ls 2>/dev/null
find /usr . -name "*csnd*" -ls 2>/dev/null
echo "Trying to find all CMake package config files..."
find /home/runner . -name "*onfig.cmake" -ls 2>/dev/null
find /usr . -name "*onfig.cmake" -ls 2>/dev/null
echo "Updating all git submodules..."
git submodule update --init --recursive
git submodule status --recursive
find /usr . -name "*csnd*" -ls 2>/dev/null
echo "Finished updating all git submodules."
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
cmake -B ${{github.workspace}}/build -Wno-dev -DCMAKE_PREFIX_PATH=/usr/local:/usr -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBOOST_ROOT=${{ steps.install-boost-linux.outputs.BOOST_ROOT }} -DCSND6_LIBRARY=/usr/lib/libcsnd6.so.6.0
# Build with CMake.
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
echo "Documenting..."
cd ${{github.workspace}}/doc
doxygen
cd ..
echo "Packaging..."
cd build
pwd
sudo cpack -V -G ZIP
ls -ll
- name: Build on Windows
if: runner.os == 'Windows'
run: |
echo "Installing tools..."
choco install wget -y
choco install graphviz -y
choco install doxygen -y
echo "Installing dependencies..."
choco install opencv -y
choco install libsndfile -y
echo "Refreshing env..."
refreshenv
echo "Current env..."
env
echo "dir..."
dir "${{github.workspace}}"
#ls -r "C:\tools"
echo "info opencv..."
choco info opencv
echo "info libsndfile..."
choco info libsndfile
#ls -r "C:\Program Files\libsndfile"
# The Windows installer doesn't seem to do anything on the Windows
# GitHub runner, so we download a consistent set of binaries and
# headers from the Csound repository.
echo "Downloading Csound binaries..."
wget -v https://github.com/csound/csound/releases/download/6.17.0/csound-6.17.0-windows-x64-binaries.zip
unzip csound-6.17.0-windows-x64-binaries.zip -dCsound6
wget -v https://github.com/csound/csound/archive/refs/tags/6.17.0.zip
unzip 6.17.0.zip -dcsound
refreshenv
ls -r Csound6
ls -r csound
echo "Current environment:"
env
echo "Current PATH:"
echo "${PATH}"
pwd
refreshenv
echo "Updating all git submodules..."
git submodule update --init --recursive
git submodule status --recursive
echo "Finished updating all git submodules."
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBOOST_ROOT=${{ steps.install-boost-windows.outputs.BOOST_ROOT }} -DCSOUND_INCLUDE_DIR=${{github.workspace}}/Csound6/include -DCSOUND_LIBRARY=${{github.workspace}}/Csound6/build/Release/csound64.lib -DLIBSNDFILE_LIBRARY="C:\Program Files\libsndfile\lib\sndfile.lib" -DCSND6_LIBRARY=${{github.workspace}}/Csound6/build/Release/csnd6.dll -DOpenCV_DIR="C:\tools\opencv\build" -DCSOUND_SOURCE_HOME="${{github.workspace}}/csound/csound-6.17.0" -DLIBSNDFILE_INCLUDE_DIR="C:\Program Files\libsndfile\include" -DUNISTD_WIN32_INCLUDE_DIR="${{github.workspace}}/unistd_win32"
# Build with CMake.
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
# dir ${{github.workspace}}/build/Release
echo "Documenting..."
cd ${{github.workspace}}/doc
doxygen
cd ..
echo "Packaging..."
cd build
pwd
cpack -V -G TGZ
dir
- uses: "marvinpinto/action-automatic-releases@latest"
if: runner.os == 'macOS'
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "macos-latest"
prerelease: true
title: "Mac OS Development Release"
files: |
LICENSE
README.md
${{github.workspace}}/build/*.zip
- uses: "marvinpinto/action-automatic-releases@latest"
if: runner.os == 'Linux'
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "linux-latest"
prerelease: true
title: "Linux Development Release"
files: |
LICENSE
README.md
${{github.workspace}}/build/*.zip
- uses: "marvinpinto/action-automatic-releases@latest"
if: runner.os == 'Windows'
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "windows-latest"
prerelease: true
title: "Windows Development Release"
files: |
LICENSE
README.md
build/*.zip