-
Notifications
You must be signed in to change notification settings - Fork 0
176 lines (159 loc) · 6.52 KB
/
build.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
# Cetone Synth Series - GitHub Workflow
# Based on Wasted Audio workflow (https://github.com/Wasted-Audio/wstd-eq/blob/master/.github/workflows/build.yml)
name: build
on:
push:
env:
HVCC_VERSION: 424308377a8b0e4291e0bfda3bcf68ae9fd88f33
jobs:
linux-x86_64:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -yqq libgl1-mesa-dev
- name: Build plugins
run: |
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
make -C build -j $(nproc)
- name: Set sha8 (non-release)
if: startsWith(github.ref, 'refs/tags/') != true
id: slug1
run: echo "action_tag=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
- name: Set tag (release)
if: startsWith(github.ref, 'refs/tags/')
id: slug2
run: echo "action_tag=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV
- name: Pack binaries
run: |
cd build
mv bin CetoneSynthLight
tar -c -h -z -f ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || env.action_tag }}.tar.gz CetoneSynthLight/
- uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || env.action_tag }}
path: |
build/*.tar.gz
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
draft: false
prerelease: false
# files: |
# WSTD_DL3Y/*.tar.gz
win64:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -yqq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable
- name: Deal with File does not contain a valid CIL image error
run: |
# See: https://github.com/orgs/community/discussions/64826 for more details.
sudo apt remove --purge --auto-remove mono-runtime
sudo apt-get install wine-binfmt
- name: Build win64 cross-compiled plugins
env:
EXE_WRAPPER: wine
PKG_CONFIG: "false"
WINEDEBUG: "-all"
run: |
echo "SET(CMAKE_SYSTEM_NAME Windows)" > windows-cross-build.cmake
echo "SET(CMAKE_SYSTEM_PROCESSOR x86_64)" >> windows-cross-build.cmake
echo "SET(CMAKE_C_COMPILER /usr/bin/x86_64-w64-mingw32-gcc)" >> windows-cross-build.cmake
echo "SET(CMAKE_CXX_COMPILER /usr/bin/x86_64-w64-mingw32-g++)" >> windows-cross-build.cmake
echo "SET(CMAKE_RC_COMPILER /usr/bin/x86_64-w64-mingw32-windres)" >> windows-cross-build.cmake
echo "SET(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32/)" >> windows-cross-build.cmake
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=windows-cross-build.cmake
make -C build -j $(nproc)
- name: Set sha8 (non-release)
if: startsWith(github.ref, 'refs/tags/') != true
id: slug1
run: echo "action_tag=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
- name: Set tag (release)
if: startsWith(github.ref, 'refs/tags/')
id: slug2
run: echo "action_tag=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV
- name: Pack binaries
run: |
cd build
mv bin CetoneSynthLight
tar -c -h -z -f ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || env.action_tag }}.tar.gz CetoneSynthLight/
- uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || env.action_tag }}
path: |
build/*.tar.gz
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
draft: false
prerelease: false
# files: |
# WSTD_DL3Y/*.tar.gz
macos-universal:
runs-on: macos-11
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
echo "No need to install dependencies on macOS."
- name: Build macOS universal plugins
env:
CFLAGS: -arch x86_64 -arch arm64 -DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_12 -DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_9 -mmacosx-version-min=10.9 -mtune=generic -msse -msse2
CXXFLAGS: -arch x86_64 -arch arm64 -DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_12 -DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_9 -mmacosx-version-min=10.9 -mtune=generic -msse -msse2
LDFLAGS: -arch x86_64 -arch arm64 -mmacosx-version-min=10.9
run: |
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
make -C build NOOPT=true -j $(sysctl -n hw.logicalcpu)
cd build && ../dpf/utils/package-osx-bundles.sh
- name: Set sha8 (non-release)
if: startsWith(github.ref, 'refs/tags/') != true
id: slug1
run: echo "action_tag=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
- name: Set tag (release)
if: startsWith(github.ref, 'refs/tags/')
id: slug2
run: echo "action_tag=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV
- uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || env.action_tag }}
path: |
build/*-macOS.pkg
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
draft: false
prerelease: false
# files: |
# WSTD_DL3Y/*-macOS.pkg