-
Notifications
You must be signed in to change notification settings - Fork 2
133 lines (118 loc) · 4.85 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
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
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/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-cmake
os: macos-latest
cc: clang
cxx: clang++
build-system: cmake
cmake-generator: 'Unix Makefiles'
cmake-options: >-
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_VERBOSE_MAKEFILE=ON
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: download LLVM
run: |
cd thirdparty
curl -OL https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.0/clang+llvm-12.0.0-x86_64-apple-darwin.tar.xz
tar -xf clang+llvm-12.0.0-x86_64-apple-darwin.tar.xz
ls -r ${{ github.workspace }}/thirdparty/clang+llvm-12.0.0-x86_64-apple-darwin/lib/cmake/llvm/*
- name: Build libsndfile
run: |
brew install autoconf autogen automake flac libogg libtool libvorbis opus mpg123 pkg-config speex
mkdir thirdparty/libsndfile/build
cd thirdparty/libsndfile/build
cmake .. -G "${{matrix.cmake-generator}}" ${{matrix.cmake-options}}
cmake --build . --config Release
- name: Use CMake for TD-Faust
run: |
cmake -Bbuild -DUSE_LLVM_CONFIG=off -G "Xcode" -DCMAKE_PREFIX_PATH=${{ github.workspace }}/thirdparty/clang+llvm-12.0.0-x86_64-apple-darwin/lib/cmake/llvm -DSndFile_DIR=${{ github.workspace }}/thirdparty/libsndfile/build
cmake -Bbuild -DUSE_LLVM_CONFIG=off -G "Xcode" -DCMAKE_PREFIX_PATH=${{ github.workspace }}/thirdparty/clang+llvm-12.0.0-x86_64-apple-darwin/lib/cmake/llvm -DSndFile_DIR=${{ github.workspace }}/thirdparty/libsndfile/build
- name: Build TD-Faust (Release)
run: |
xcodebuild -configuration Release -project build/TD-Faust.xcodeproj/
ls -r *
mv Release/TD-Faust.bundle Release/TD-Faust.plugin
cd ${{ github.workspace }}/thirdparty/faust/build/lib/Release
ls -r *
mv libfaust.2.38.7.dylib libfaust.2.dylib
- name: Make distribution
run: |
mkdir TD-Faust_dist
cp ${{ github.workspace }}/thirdparty/faust/build/lib/Release/*.dylib TD-Faust_dist
cp ${{ github.workspace }}/thirdparty/libsndfile/build/*.dylib TD-Faust_dist
mv ${{ github.workspace }}/Release/*.plugin TD-Faust_dist
zip -r 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
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