forked from supercollider/supercollider
-
Notifications
You must be signed in to change notification settings - Fork 0
198 lines (167 loc) · 6.92 KB
/
Copy pathbuild_linux.yml
File metadata and controls
198 lines (167 loc) · 6.92 KB
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
name: Build Linux
on:
workflow_call:
inputs:
sc-version:
required: true
type: string
jobs:
build-linux:
runs-on: ubuntu-${{ matrix.os-version }}
strategy:
fail-fast: false
matrix:
include:
- job-name: ""
os-version: "22.04"
c-compiler: "gcc-9"
cxx-compiler: "g++-9"
use-syslibs: false
shared-libscsynth: false
ctest: false
- job-name: ""
os-version: "22.04"
c-compiler: "gcc-11"
cxx-compiler: "g++-11"
use-syslibs: false
shared-libscsynth: false
ctest: false
- job-name: "with ctest"
os-version: "22.04"
c-compiler: "gcc-12"
cxx-compiler: "g++-12"
use-syslibs: false
shared-libscsynth: false
artifact-suffix: "ubuntu-22.04-gcc12" # will trigger artifact upload; after changing this update the test-linux artifact-file in actions.yml
ctest: true
- job-name: "use system libraries with ctest"
os-version: "24.04"
c-compiler: "gcc-13"
cxx-compiler: "g++-13"
use-syslibs: true
shared-libscsynth: false
ctest: true
- job-name: "shared libscsynth"
os-version: "24.04"
c-compiler: "gcc-14"
cxx-compiler: "g++-14"
use-syslibs: false
shared-libscsynth: true
ctest: false
- job-name: ""
os-version: "22.04"
c-compiler: "clang-11"
cxx-compiler: "clang++-11"
use-syslibs: false
shared-libscsynth: false
ctest: false
- job-name: ""
os-version: "24.04"
c-compiler: "clang-15"
cxx-compiler: "clang++-15"
use-syslibs: false
shared-libscsynth: false
ctest: false
- job-name: ""
os-version: "24.04"
c-compiler: "clang-16"
cxx-compiler: "clang++-16"
use-syslibs: false
shared-libscsynth: false
ctest: false
- job-name: ""
os-version: "24.04"
c-compiler: "clang-17"
cxx-compiler: "clang++-17"
use-syslibs: false
shared-libscsynth: false
ctest: false
- job-name: "with ctest"
os-version: "24.04"
c-compiler: "clang-18"
cxx-compiler: "clang++-18"
use-syslibs: false
shared-libscsynth: false
ctest: true
- job-name: "arm64 with ctest"
os-version: "24.04-arm"
c-compiler: "clang-18"
cxx-compiler: "clang++-18"
use-syslibs: false
shared-libscsynth: false
ctest: true
name: Ubuntu ${{ matrix.os-version }} ${{ matrix.c-compiler }} ${{ matrix.job-name }}
env:
BUILD_PATH: ${{ github.workspace }}/build
INSTALL_PATH: ${{ github.workspace }}/build/Install
USE_SYSLIBS: ${{ matrix.use-syslibs }}
SHARED_LIBSCSYNTH: ${{ matrix.shared-libscsynth }}
CC: ${{ matrix.c-compiler }}
CXX: ${{ matrix.cxx-compiler }}
ARTIFACT_FILE: "SuperCollider-${{ inputs.sc-version }}-${{ matrix.artifact-suffix }}"
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: prepare daily timestamp for cache
id: current-date
run: echo "stamp=$(date '+%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: cache ccache
uses: actions/cache@v5
with:
path: |
~/.ccache
~/.cache/ccache
key: ${{ runner.os }}-${{ matrix.os-version }}-${{ matrix.c-compiler }}-${{ matrix.use-syslibs }}-${{ matrix.shared-libscsynth }}-${{ steps.current-date.outputs.stamp }}
restore-keys: ${{ runner.os }}-${{ matrix.os-version }}-${{ matrix.c-compiler }}-${{ matrix.use-syslibs }}-${{ matrix.shared-libscsynth }}-
- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install --yes build-essential cmake pkg-config libjack-jackd2-dev libsndfile1-dev libasound2-dev libavahi-client-dev libreadline6-dev libfftw3-dev libicu-dev libxt-dev libudev-dev emacs ccache
# install appropriate clang/gcc compilers
if [[ "$CC" =~ clang-[1-9] ]]; then
sudo apt-get install -y $CC # package names are clang-X
sudo apt-get install -y libc++-${CC##clang-}-dev libc++abi-${CC##clang-}-dev # install additional libraries; package names are libc++-X-dev and libc++abi-X-dev
elif [[ "$CC" =~ gcc-[1-9] ]]; then
sudo apt-get install -y $CXX # package names are g++-X
fi
- name: install system libraries
if: env.USE_SYSLIBS == 'true'
run: sudo apt-get install --yes libboost-thread-dev libboost-system-dev libboost-filesystem-dev libboost-regex-dev libboost-test-dev libboost-program-options-dev libyaml-cpp-dev
- name: install qt from apt
run: sudo apt-get install --yes qt6-base-dev qt6-base-dev-tools qt6-tools-dev qt6-tools-dev-tools qt6-declarative-dev libqt6gui6 libqt6printsupport6 libqt6svgwidgets6 libqt6websockets6-dev libqt6webenginecore6 qt6-webengine-dev qt6-webengine-dev-tools libqt6webchannel6-dev libqt6opengl6-dev libqt6svg6-dev linguist-qt6 qt6-l10n-tools libglx-dev libgl1-mesa-dev libvulkan-dev libxkbcommon-dev libxcb-xkb-dev
- name: configure
run: |
mkdir $BUILD_PATH && cd $BUILD_PATH
EXTRA_CMAKE_FLAGS=
if $USE_SYSLIBS; then EXTRA_CMAKE_FLAGS="-DSYSTEM_BOOST=ON -DSYSTEM_YAMLCPP=ON"; fi
if $SHARED_LIBSCSYNTH; then EXTRA_CMAKE_FLAGS="-DLIBSCSYNTH=ON $EXTRA_CMAKE_FLAGS"; fi
cmake $EXTRA_CMAKE_FLAGS -DSC_EL=ON -DSC_VIM=ON -DSC_QT=ON -DSC_IDE=ON -DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_PATH -DCMAKE_BUILD_TYPE=Release .. # --debug-output
- name: build
run: |
cd $BUILD_PATH
make install -j$(nproc)
- name: create archive
if: matrix.artifact-suffix
run: cd $INSTALL_PATH && zip --symlinks -r $ARTIFACT_FILE.zip .
- name: upload artifacts
uses: actions/upload-artifact@v7
if: matrix.artifact-suffix
with:
name: ${{ env.ARTIFACT_FILE }}
path: ${{ env.INSTALL_PATH }}/${{ env.ARTIFACT_FILE }}.zip
- name: Configure CTests
if: matrix.ctest
run: |
cd $BUILD_PATH
sudo apt-get install --yes xvfb jackd1 socat
# start jack
jackd --no-realtime --silent -d dummy &
# start virtual display server
export DISPLAY=:99
echo "DISPLAY=$DISPLAY" >> $GITHUB_ENV
Xvfb $DISPLAY -screen 0 1024x768x16 &
- name: Run CTests
continue-on-error: false
if: matrix.ctest
run: cmake --build $BUILD_PATH --config Release --target test