-
Notifications
You must be signed in to change notification settings - Fork 2
140 lines (124 loc) · 5.34 KB
/
all.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
name: Compile
on:
push:
tags:
- '*'
jobs:
build-windows:
runs-on: windows-latest
strategy:
matrix:
os: [windows-latest]
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Get CMake
uses: lukka/get-cmake@latest
- name: Download libsndfile
run: |
cd thirdparty
curl -OL https://github.com/libsndfile/libsndfile/releases/download/1.0.31/libsndfile-1.0.31-win64.zip
tar -xf libsndfile-1.0.31-win64.zip
ls -r ${{ github.workspace }}/thirdparty/libsndfile-1.0.31-win64/*
- name: Build LLVM
run: |
cd thirdparty/llvm-project/llvm
cmake -Bbuild -DLLVM_USE_CRT_DEBUG=MDd -DLLVM_USE_CRT_RELEASE=MD -DLLVM_BUILD_TESTS=Off -DCMAKE_INSTALL_PREFIX="./llvm" -Thost=x64 -DLLVM_ENABLE_ZLIB=off
msbuild build/LLVM.sln /property:Configuration=Release
- name: Build TD-Faust (Release)
run: |
cmake -Bbuild -DUSE_LLVM_CONFIG=off -DSndFile_DIR=${{ github.workspace }}/thirdparty/libsndfile-1.0.31-win64/cmake
msbuild build/TD-Faust.sln /property:Configuration=Release
env:
LLVM_DIR: ${{ github.workspace }}/thirdparty/llvm-project/llvm/build/lib/cmake/llvm
- name: Make distribution
run: |
mkdir TD-Faust_dist
move ${{ github.workspace }}/Plugins/TD-Faust.dll TD-Faust_dist
move ${{ github.workspace }}/Plugins/faust.dll TD-Faust_dist
cp ${{ github.workspace }}/thirdparty/libsndfile-1.0.31-win64/bin/sndfile.dll TD-Faust_dist
tar.exe -c -f TD-Faust-${{ matrix.os }}.zip TD-Faust_dist
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: my-artifact-${{ matrix.os }}
path: TD-Faust-${{ matrix.os }}.zip
build-macos:
strategy:
matrix:
name: [macos-cmake]
include:
- name: macos-x86_64
os: macos-latest
cmake-options: >-
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_VERBOSE_MAKEFILE=ON
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15
-DCMAKE_OSX_ARCHITECTURES="x86_64"
llvm-options: >-
-DLLVM_TARGETS_TO_BUILD="X86"
-DLLVM_DEFAULT_TARGET_TRIPLE="x86_64-apple-darwin19.6.0"
- name: macos-arm64
os: macos-latest
cmake-options: >-
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_VERBOSE_MAKEFILE=ON
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15
-DCMAKE_OSX_ARCHITECTURES="arm64"
llvm-options: >-
-DLLVM_TARGETS_TO_BUILD="AArch64"
-DLLVM_DEFAULT_TARGET_TRIPLE="arm64-apple-darwin19.6.0"
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Build libsndfile
# brew install autoconf autogen automake flac libogg libtool libvorbis opus mpg123 pkg-config speex
run: |
cd thirdparty/libsndfile
mkdir build && cd build
cmake .. -G "Unix Makefiles" ${{matrix.cmake-options}} -DENABLE_EXTERNAL_LIBS=off
cmake --build . --config Release
- name: Build LLVM
run: |
cd thirdparty/llvm-project/llvm
cmake -Bbuild -DCMAKE_INSTALL_PREFIX="./llvm" ${{matrix.llvm-options}} -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ZLIB=off
cmake --build build
- name: Use CMake for TD-Faust
run: |
cmake -Bbuild -G "Xcode" ${{matrix.cmake-options}} -DUSE_LLVM_CONFIG=off -DCMAKE_PREFIX_PATH=${{ github.workspace }}/thirdparty/llvm-project/llvm/build/lib/cmake/llvm -DSndFile_DIR=${{ github.workspace }}/thirdparty/libsndfile/build
cmake -Bbuild -G "Xcode" ${{matrix.cmake-options}} -DUSE_LLVM_CONFIG=off -DCMAKE_PREFIX_PATH=${{ github.workspace }}/thirdparty/llvm-project/llvm/build/lib/cmake/llvm -DSndFile_DIR=${{ github.workspace }}/thirdparty/libsndfile/build
- name: Build TD-Faust (Release)
run: |
xcodebuild -configuration Release -project build/TD-Faust.xcodeproj
mv thirdparty/faust/build/lib/Release/libfaust.2.38.7.dylib thirdparty/faust/build/lib/Release/libfaust.2.dylib
install_name_tool -change @rpath/libfaust.2.dylib @loader_path/../../../libfaust.2.dylib Release/TD-Faust.plugin/Contents/MacOS/TD-Faust
- name: Make distribution
run: |
mkdir TD-Faust_dist
cp ${{ github.workspace }}/thirdparty/faust/build/lib/Release/libfaust.2.dylib TD-Faust_dist
mv ${{ github.workspace }}/Release/TD-Faust.plugin TD-Faust_dist
zip -r TD-Faust-${{ matrix.name }}.zip TD-Faust_dist
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: my-artifact-${{ matrix.name }}
path: TD-Faust-${{ matrix.name }}.zip
create-release:
if: startsWith(github.ref, 'refs/tags/v')
needs: [build-windows, build-macos]
runs-on: ubuntu-latest
name: "Create Release on GitHub"
steps:
- uses: actions/download-artifact@v2
with:
path: "dist"
- uses: ncipollo/release-action@v1
with:
artifacts: "dist/*/*"
token: ${{ secrets.GITHUB_TOKEN }}
draft: true