Skip to content

Commit 1291b64

Browse files
committed
CI: Minor fixes
1 parent ad75101 commit 1291b64

File tree

1 file changed

+95
-85
lines changed

1 file changed

+95
-85
lines changed

.github/workflows/build.yml

Lines changed: 95 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
branches:
1515
- '*'
1616
env:
17-
BUILD_TYPE: Release
17+
build_type: Release
1818

1919
jobs:
2020
clang_tidy:
@@ -65,7 +65,7 @@ jobs:
6565
-G Ninja
6666
-B build
6767
-S "$GITHUB_WORKSPACE"
68-
-D CMAKE_BUILD_TYPE="$BUILD_TYPE"
68+
-D CMAKE_BUILD_TYPE=${{ env.build_type }}
6969
-D CMAKE_CXX_STANDARD=17
7070
-D SFIZZ_JACK=OFF
7171
-D SFIZZ_RENDER=OFF
@@ -79,15 +79,15 @@ jobs:
7979
- name: Build
8080
shell: bash
8181
working-directory: ${{ runner.workspace }}
82-
run: cmake --build build --verbose -j 2
82+
run: cmake --build build --config ${{ env.build_type }} --verbose -j 2
8383
# No custom Linux packages, build from sources or provided in distro
8484

8585
build_for_macos:
8686
# if: ${{ false }}
8787
name: macOS 11
8888
runs-on: macos-11
8989
env:
90-
install_name: "sfizz-${{ github.ref_name }}-macos.pkg"
90+
install_name: "sfizz-${{ github.ref_name }}-macos"
9191
steps:
9292
- name: Checkout
9393
uses: actions/checkout@v3
@@ -103,7 +103,7 @@ jobs:
103103
options=(
104104
-B build
105105
-S "$GITHUB_WORKSPACE"
106-
-D CMAKE_BUILD_TYPE="$BUILD_TYPE"
106+
-D CMAKE_BUILD_TYPE=${{ env.build_type }}
107107
-D CMAKE_CXX_STANDARD=17
108108
-D SFIZZ_SHARED=OFF
109109
-D SFIZZ_AU=ON
@@ -121,7 +121,12 @@ jobs:
121121
- name: Build
122122
shell: bash
123123
working-directory: ${{ runner.workspace }}
124-
run: cmake --build build --verbose -j 2
124+
run: |
125+
cmake \
126+
--build build \
127+
--config ${{ env.build_type }} \
128+
--verbose \
129+
-j 2
125130
- name: Package bundles
126131
if: ${{ github.ref_type == 'tag' }}
127132
shell: bash
@@ -137,59 +142,13 @@ jobs:
137142
--identifier "sfz.tools.sfizz" \
138143
--package-path "${{ runner.workspace }}/build" \
139144
--version 0 \
140-
${{ env.install_name }}
145+
${{ env.install_name }}.pkg
141146
- name: Upload
142147
if: ${{ github.ref_type == 'tag' }}
143148
uses: actions/upload-artifact@v3
144149
with:
145150
name: macOS package
146-
path: ${{ runner.workspace }}/build/${{ env.install_name }}
147-
148-
build_for_mod:
149-
if: ${{ false }} # DISABLED: Old image which doesn't work with CMake > 3.5
150-
name: MOD
151-
runs-on: ubuntu-20.04
152-
container:
153-
image: jpcima/mod-plugin-builder
154-
options: --user 0
155-
steps:
156-
- name: Set install name
157-
run: echo "install_name=sfizz-$GITHUB_REF_NAME-moddevices" >> "$GITHUB_ENV"
158-
- uses: actions/checkout@v3
159-
with:
160-
submodules: recursive
161-
- name: Fix up MOD environment
162-
shell: bash
163-
run: ln -sf /home/builder/mod-workdir ~/mod-workdir
164-
- name: Create Build Environment
165-
shell: bash
166-
working-directory: ${{ runner.workspace }}
167-
run: mod-plugin-builder /usr/local/bin/cmake -E make_directory build
168-
- name: Configure CMake
169-
shell: bash
170-
working-directory: ${{ runner.workspace }}/build
171-
run: |
172-
mod-plugin-builder /usr/local/bin/cmake "$GITHUB_WORKSPACE" \
173-
-DPROJECT_SYSTEM_PROCESSOR=armv7-a \
174-
-DCMAKE_BUILD_TYPE=Release \
175-
-DSFIZZ_JACK=OFF \
176-
-DSFIZZ_VST=OFF \
177-
-DSFIZZ_LV2_UI=OFF
178-
- name: Build
179-
shell: bash
180-
working-directory: ${{ runner.workspace }}/build
181-
run: mod-plugin-builder /usr/local/bin/cmake --build . --config "$BUILD_TYPE" -- -j 2
182-
- name: Install
183-
working-directory: ${{ runner.workspace }}/build
184-
shell: bash
185-
run: |
186-
DESTDIR="$(pwd)/$install_name" mod-plugin-builder /usr/local/bin/cmake --build . --config "$BUILD_TYPE" --target install
187-
tar czvf "$install_name".tar.gz "$install_name"
188-
- name: Upload
189-
uses: actions/upload-artifact@v3
190-
with:
191-
name: MOD devices tarball
192-
path: ${{ runner.workspace }}/build/${{ env.install_name }}.tar.gz
151+
path: ${{ runner.workspace }}/build/${{ env.install_name }}.pkg
193152

194153
build_for_windows:
195154
# if: ${{ false }}
@@ -221,14 +180,14 @@ jobs:
221180
-A "${{ matrix.release_arch }}" `
222181
-B build `
223182
-S "${Env:GITHUB_WORKSPACE}" `
224-
-D CMAKE_BUILD_TYPE="${Env:BUILD_TYPE}" `
183+
-D CMAKE_BUILD_TYPE=${{ env.build_type }} `
225184
-D CMAKE_CXX_STANDARD=17 `
226185
-D SFIZZ_LV2=ON `
227186
-D SFIZZ_PUREDATA=ON `
228187
-D SFIZZ_VST=ON `
229188
- name: Build
230189
working-directory: ${{ runner.workspace }}
231-
run: cmake --build build -j 2
190+
run: cmake --build build --config ${{ env.build_type }} --verbose -j 2
232191
- name: Install pluginval
233192
if: ${{ matrix.platform == 'x64' }}
234193
run: |
@@ -248,13 +207,41 @@ jobs:
248207
- name: Create installer
249208
if: ${{ github.ref_type == 'tag' }}
250209
working-directory: ${{ runner.workspace }}/build
251-
run: iscc /O"." /F"${Env:install_name}" /dARCH="${{ matrix.platform }}" innosetup.iss
210+
run: iscc /O"." /F"${{ env.install_name }}" /dARCH="${{ matrix.platform }}" innosetup.iss
252211
- name: Upload
253212
if: ${{ github.ref_type == 'tag' }}
254213
uses: actions/upload-artifact@v3
255214
with:
256215
name: ${{ matrix.pkg_platform }} installer
257-
path: ${{ runner.workspace }}/build/${{ env.install_name }}.exe
216+
path: "${{ runner.workspace }}/build/${{ env.install_name }}.exe"
217+
218+
archive_source_code:
219+
# if: startsWith(github.ref, 'refs/tags/')
220+
if: ${{ github.ref_type == 'tag' }}
221+
name: Source code archive
222+
runs-on: ubuntu-20.04
223+
env:
224+
install_name: sfizz-${{ github.ref_name }}
225+
steps:
226+
- name: Checkout
227+
uses: actions/checkout@v3
228+
with:
229+
submodules: recursive
230+
- name: Install dependencies
231+
run: |
232+
sudo apt-get update && sudo apt-get install python3-pip
233+
sudo pip install git-archive-all
234+
- name: Archive source code
235+
shell: bash
236+
run: |
237+
cd "$GITHUB_WORKSPACE" && git-archive-all \
238+
--prefix="${{ env.install_name }}/" \
239+
-9 "${{ runner.workspace }}/${{ env.install_name }}.tar.gz"
240+
- name: Upload
241+
uses: actions/upload-artifact@v3
242+
with:
243+
name: Source code tarball
244+
path: "${{ runner.workspace }}/${{ env.install_name }}.tar.gz"
258245

259246
build_for_mingw:
260247
if: ${{ false }} # DISABLED TEMPORARILY
@@ -309,7 +296,7 @@ jobs:
309296
-G Ninja
310297
-B build
311298
-S "$GITHUB_WORKSPACE"
312-
-D CMAKE_BUILD_TYPE="$BUILD_TYPE"
299+
-D CMAKE_BUILD_TYPE=${{ env.build_type }}
313300
-D CMAKE_CXX_STANDARD=17
314301
-D ENABLE_LTO=OFF
315302
-D SFIZZ_STATIC_DEPENDENCIES=ON
@@ -321,57 +308,80 @@ jobs:
321308
- name: Build
322309
shell: bash
323310
working-directory: ${{ runner.workspace }}
324-
run: ${{ matrix.platform }}-w64-mingw32-cmake --build build -j 2
311+
run: ${{ matrix.platform }}-w64-mingw32-cmake \
312+
--build build --config ${{ env.build_type }} --verbose -j 2
325313
- name: Install
326314
if: ${{ github.ref_type == 'tag' }}
327315
working-directory: ${{ runner.workspace }}
328316
shell: bash
329317
run: |
330-
DESTDIR="$(pwd)/${{ env.install_name }}" ${{ matrix.platform }}-w64-mingw32-cmake \
331-
--build build --install
332-
tar czvf ${{ env.install_name }}.tar.gz "${{ env.install_name }}"
318+
DESTDIR="$(pwd)/${{ env.install_name }}" \
319+
${{ matrix.platform }}-w64-mingw32-cmake \
320+
--build build --config ${{ env.build_type }} --target install
321+
tar czvf "${{ env.install_name }}".tar.gz "${{ env.install_name }}"
333322
- name: Upload
334323
if: ${{ github.ref_type == 'tag' }}
335324
uses: actions/upload-artifact@v3
336325
with:
337326
name: ${{ matrix.pkg_platform }} MinGW tarball
338-
path: ${{ runner.workspace }}/build/${{ env.install_name }}.tar.gz
327+
path: "${{ runner.workspace }}/${{ env.install_name }}.tar.gz"
339328

340-
archive_source_code:
341-
# if: startsWith(github.ref, 'refs/tags/')
342-
if: ${{ github.ref_type == 'tag' }}
343-
name: Source code archive
329+
build_for_mod:
330+
if: ${{ false }} # DISABLED: Old image which doesn't work with CMake > 3.5
331+
name: MOD
344332
runs-on: ubuntu-20.04
333+
container:
334+
image: jpcima/mod-plugin-builder
335+
options: --user 0
345336
env:
346-
install_name: sfizz-${{ github.ref_name }}
337+
install_name: sfizz-${{ github.ref_name }}-moddevices
347338
steps:
348339
- name: Checkout
349340
uses: actions/checkout@v3
350341
with:
351342
submodules: recursive
352-
- name: Install dependencies
343+
- name: Fix up MOD environment
344+
shell: bash
345+
run: ln -sf /home/builder/mod-workdir ~/mod-workdir
346+
- name: Configure CMake
347+
shell: bash
348+
working-directory: ${{ runner.workspace }}
353349
run: |
354-
sudo apt-get update && sudo apt-get install python3-pip
355-
sudo pip install git-archive-all
356-
- name: Archive source code
350+
mod-plugin-builder /usr/local/bin/cmake \
351+
-B build \
352+
-S "$GITHUB_WORKSPACE" \
353+
-D PROJECT_SYSTEM_PROCESSOR=armv7-a \
354+
-D CMAKE_BUILD_TYPE=Release \
355+
-D SFIZZ_JACK=OFF \
356+
-D SFIZZ_VST=OFF \
357+
-D SFIZZ_LV2_UI=OFF
358+
- name: Build
357359
shell: bash
360+
working-directory: ${{ runner.workspace }}
358361
run: |
359-
cd "$GITHUB_WORKSPACE" && git-archive-all \
360-
--prefix="${{ env.install_name }}/" \
361-
-9 "${{ runner.workspace }}/${{ env.install_name }}.tar.gz"
362+
mod-plugin-builder /usr/local/bin/cmake \
363+
--build build --config ${{ env.build_type }} -- -j 2
364+
- name: Install
365+
working-directory: ${{ runner.workspace }}
366+
shell: bash
367+
run: |
368+
DESTDIR="$(pwd)/${{ env.install_name }}" mod-plugin-builder \
369+
/usr/local/bin/cmake --build build --config ${{ env.build_type }} --target install
370+
tar czvf "${{ env.install_name }}".tar.gz "${{ env.install_name }}"
362371
- name: Upload
363372
uses: actions/upload-artifact@v3
364373
with:
365-
name: Source code tarball
366-
path: ${{ runner.workspace }}/${{ env.install_name }}.tar.gz
374+
name: MOD devices tarball
375+
path: "${{ runner.workspace }}/${{ env.install_name }}.tar.gz"
367376

368377
deploy:
369378
if: ${{ github.ref_type == 'tag' }}
370379
runs-on: ubuntu-20.04
371380
needs:
372-
# - build_for_mod
381+
# - build_for_linux
373382
# - build_for_mingw
374383
- build_for_macos
384+
# - build_for_mod
375385
- build_for_windows
376386
- archive_source_code
377387
steps:
@@ -380,12 +390,6 @@ jobs:
380390
with:
381391
name: macOS package
382392

383-
- name: MOD download
384-
if: ${{ false }} # DISABLED: See comment above
385-
uses: actions/download-artifact@v3
386-
with:
387-
name: MOD devices tarball
388-
389393
- name: MinGW 32 download
390394
if: ${{ false }} # DISABLED: MinGW 32 build temporarily disabled
391395
uses: actions/download-artifact@v3
@@ -413,6 +417,12 @@ jobs:
413417
with:
414418
name: Source code tarball
415419

420+
- name: MOD download
421+
if: ${{ false }} # DISABLED: See comment above
422+
uses: actions/download-artifact@v3
423+
with:
424+
name: MOD devices tarball
425+
416426
- name: Display file information
417427
shell: bash
418428
run: ls -lR

0 commit comments

Comments
 (0)