Skip to content

Commit

Permalink
Cleanup, unity builds, and CMakeRC (#5)
Browse files Browse the repository at this point in the history
* Cleanup, unity buidls and CMakeRC

* CMake and CI tweaks

* Apply clang-format

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
jatinchowdhury18 and github-actions[bot] authored Mar 5, 2024
1 parent 0c526da commit a4d44ea
Show file tree
Hide file tree
Showing 20 changed files with 763 additions and 2,920 deletions.
5 changes: 0 additions & 5 deletions .github/FUNDING.yml

This file was deleted.

10 changes: 4 additions & 6 deletions .github/workflows/auto-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ jobs:
steps:
- name: Install Linux Deps
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 12
sudo apt-get install clang-format-12
clang-format-12 --version
sudo apt update
sudo apt -y install clang-format-14
clang-format-14 --version
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -34,7 +32,7 @@ jobs:

- name: Run clang-format
shell: bash
run: find src/ -iname *.h -o -iname *.cpp | xargs clang-format-12 -style=file -verbose -i
run: find src/ -iname *.h -o -iname *.cpp | xargs clang-format-14 -style=file -verbose -i

- name: Commit & Push changes
uses: actions-js/push@master
Expand Down
31 changes: 28 additions & 3 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@ jobs:
strategy:
fail-fast: false # show all errors for each platform (vs. cancel jobs on error)
matrix:
os: [ubuntu-latest, windows-2019, macOS-latest]
include:
- os: ubuntu-22.04
cmake_args: "-DCMAKE_CXX_COMPILER=g++-11"
- os: windows-2022
cmake_gen: -G"Ninja Multi-Config"
cmake_args: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
- os: macos-13
cmake_args: "-DCMAKE_BUILD_TYPE=Release"

steps:
- name: Install Linux Deps
Expand All @@ -30,6 +37,24 @@ jobs:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9
- name: Set Xcode version
if: runner.os == 'MacOS'
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.2'

- name: Install Ninja
if: runner.os == 'Windows'
uses: seanmiddleditch/gha-setup-ninja@master

- name: Add msbuild to PATH
if: runner.os == 'Windows'
uses: microsoft/setup-msbuild@v2

- name: Setup MSVC devcmd
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1

- name: Get latest CMake
uses: lukka/get-cmake@latest

Expand All @@ -49,12 +74,12 @@ jobs:
- name: Configure
shell: bash
run: cmake -Bbuild
run: cmake -Bbuild ${{ matrix.cmake_args }} ${{ matrix.cmake_gen }}

- name: Build
shell: bash
run: cmake --build build --config Release --parallel 4

- name: Validate
if: runner.os == 'Windows' || runner.os == 'MacOS'
if: runner.os == 'Windows'
run: bash scripts/validate.sh
22 changes: 1 addition & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,16 @@ set(CMAKE_CXX_STANDARD 20)
set(COMPANY_NAME "chowdsp")
set(PRODUCT_NAME "TempPlugin")

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/modules/cmake")
add_subdirectory(modules)

# juce_set_vst2_sdk_path(C:/SDKs/VST_SDK/VST2_SDK)
# set default plugin formats to build
if(IOS)
set(JUCE_FORMATS Standalone AUv3)
else()
set(JUCE_FORMATS AU VST3 Standalone)
endif()

# Build LV2 only on Linux
if(UNIX AND NOT APPLE)
message(STATUS "Building LV2 plugin format")
list(APPEND JUCE_FORMATS LV2)
endif()

# Build VST2 is SDK set
if(TARGET juce_vst2_sdk)
message(STATUS "Building VST2 plugin format")
list(APPEND JUCE_FORMATS VST)
endif()

juce_add_plugin(TempPlugin
COMPANY_NAME "${COMPANY_NAME}"
PLUGIN_MANUFACTURER_CODE Chow
Expand Down Expand Up @@ -62,11 +50,3 @@ target_compile_definitions(TempPlugin PUBLIC
)

target_link_libraries(TempPlugin PRIVATE juce_plugin_modules)

# we need these flags for notarization on MacOS
option(MACOS_RELEASE "Set build flags for MacOS Release" OFF)
if(MACOS_RELEASE)
message(STATUS "Setting MacOS release flags...")
set_target_properties(TempPlugin_Standalone PROPERTIES
XCODE_ATTRIBUTE_ENABLE_HARDENED_RUNTIME YES)
endif()
1 change: 0 additions & 1 deletion installers/mac/Intro.txt

This file was deleted.

Loading

0 comments on commit a4d44ea

Please sign in to comment.