Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerize #155

Merged
merged 4 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading