Skip to content

Commit

Permalink
Dockerize (#155)
Browse files Browse the repository at this point in the history
Move the linux build to dcocker
Move macOS back to 10.14 to support Xcode 12, goldilocks style
  • Loading branch information
baconpaul committed Jan 23, 2025
1 parent 55ea1fe commit 0bc5b34
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 34 deletions.
98 changes: 65 additions & 33 deletions .github/workflows/build-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- main
- rel_*
tags:
- 'v**'
pull_request:
Expand Down Expand Up @@ -56,6 +57,20 @@ jobs:
cmake -S . -B ./build ${{ matrix.cmake_args }} -DCMAKE_BUILD_TYPE=Release -DCOPY_AFTER_BUILD=FALSE -DGITHUB_ACTIONS_BUILD=TRUE
cmake --build ./build --config Release --target six-sines_all --parallel 3
- name: Configure pull request version
if: github.event_name == 'pull_request'
run: |
cmake -S . -B ./build ${{ matrix.cmake_args }} -DCMAKE_BUILD_TYPE=Debug -DCOPY_AFTER_BUILD=FALSE -DGITHUB_ACTIONS_BUILD=TRUE
- name: Build pull request version
if: github.event_name == 'pull_request'
run: |
cmake --build ./build --config Debug --target six-sines_all --parallel 3
- name: Find all the six sines
run: |
find build -name "Six Sines*" -print
- name: Make windows zip
if: github.event_name != 'pull_request' && runner.os == 'Windows'
run: |
Expand All @@ -71,26 +86,6 @@ jobs:
7z a -r build/inst/six-sines-windows-`date +"%Y-%m-%d"`-`git rev-parse --short HEAD`.zip build/insttmp/*
- name: Make linux tgz
if: github.event_name != 'pull_request' && runner.os == 'Linux'
run: |
find build -name "Six Sines*" -print
mkdir build/inst
mkdir build/insttmp
mv build/*.clap build/insttmp
mv "build/Six Sines" build/insttmp
mv build/Release/*.vst3 build/insttmp
find build -name "Six Sines*" -print
cd build/insttmp
ls -al
tar cvzf ../inst/six-sines-linux-`date +"%Y-%m-%d"`-`git rev-parse --short HEAD`.tgz .
- name: Make Mac
if: github.event_name != 'pull_request' && runner.os == 'macOS'
run: |
Expand All @@ -108,31 +103,68 @@ jobs:
codesign -d --entitlement - installer-tmp/APP/Six\ Sines.app
- name: Configure pull request version
if: github.event_name == 'pull_request'
run: |
cmake -S . -B ./build ${{ matrix.cmake_args }} -DCMAKE_BUILD_TYPE=Debug -DCOPY_AFTER_BUILD=FALSE -DGITHUB_ACTIONS_BUILD=TRUE
- name: Upload artifact
if: github.event_name != 'pull_request' && runner.os != 'Linux' # We get this through docker
uses: actions/upload-artifact@v4
with:
path: build/inst
name: dawplugin-${{ matrix.name }}

- name: Build pull request version
if: github.event_name == 'pull_request'
run: |
cmake --build ./build --config Debug --target six-sines_all --parallel 3

- name: Find all the six sines
build_plugin_docker:
name: Build - Docker Ubuntu 20
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Build in Docker
uses: surge-synthesizer/sst-githubactions/cmake-in-docker@main
with:
image: ghcr.io/surge-synthesizer/sst-dockerimages/ubuntu20_gcc11:main
username: ${{ github.actor }}
token: ${{ secrets.GITHUB_TOKEN }}
cmakeArgs: -DCMAKE_BUILD_TYPE=Release -GNinja -DCOPY_AFTER_BUILD=FALSE -DGITHUB_ACTIONS_BUILD=TRUE
target: six-sines_all


- name: Make linux tgz
run: |
find build -name "Six Sines*" -print
mkdir build/inst
mkdir build/insttmp
mv build/*.clap build/insttmp
mv "build/Six Sines" build/insttmp
mv build/Release/*.vst3 build/insttmp
find build -name "Six Sines*" -print
cd build/insttmp
ls -al
tar cvzf ../inst/six-sines-linux-`date +"%Y-%m-%d"`-`git rev-parse --short HEAD`.tgz .
- name: Show Installer Directory
run: |
ls -l ./build/inst
- name: Upload artifact
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v4
with:
path: build/inst
name: dawplugin-${{ matrix.name }}
name: build-docker-linux

publish-plugin-nightly:
name: Publish Nightlu
name: Publish Nightly
if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'baconpaul' }}
runs-on: ubuntu-latest
needs: [build_plugin]
needs: [build_plugin, build_plugin_docker]
steps:
- name: Upload to Nightly
uses: surge-synthesizer/sst-githubactions/upload-to-release@main
Expand All @@ -154,7 +186,7 @@ jobs:
name: Publish Release
if: startsWith(github.ref, 'refs/tags/v') && github.repository_owner == 'baconpaul'
runs-on: ubuntu-latest
needs: [build_plugin]
needs: [build_plugin, build_plugin_docker]
steps:
- name: Upload to Release
uses: surge-synthesizer/sst-githubactions/upload-to-release@main
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.28)

set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.13 CACHE STRING "Build for 10.15")
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.14 CACHE STRING "Build for 10.14")
set(CMAKE_POSITION_INDEPENDENT_CODE ON)


Expand Down

0 comments on commit 0bc5b34

Please sign in to comment.