Skip to content

Commit

Permalink
github actions edits
Browse files Browse the repository at this point in the history
  • Loading branch information
ArdenButterfield committed Aug 30, 2024
1 parent edef9fc commit 0f69312
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 15 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/cmake_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ env:
PROJECT_NAME: Maim
BUILD_TYPE: Release
BUILD_DIR: Builds
SOURCE_DIR: Source
LAME_DIR: Source/lib/lame
SOURCE_DIR: source
LAME_DIR: lib/lame
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DISPLAY: :0 # linux pluginval needs this
CMAKE_BUILD_PARALLEL_LEVEL: 3 # Use up to 3 cpus to build juceaide, etc
Expand Down Expand Up @@ -126,25 +126,21 @@ jobs:

- name: Build LAME (windows)
if: ${{ matrix.name == 'Windows' }}
working-directory: Source/lib/lame
working-directory: lib/lame
run: |
cp configMS.h config.h
# nmake clean -f Makefile.MSVC
nmake libmp3lame-static.lib -f Makefile.MSVC comp=msvc asm=no
- name: Build LAME (linux)
if: ${{ matrix.name == 'Linux' }}
shell: bash
working-directory: Source/lib/lame
working-directory: lib/lame
run: |
./configure CFLAGS="-fPIC" --disable-frontend --enable-expopt=full --disable-shared --enable-static
make
- name: Build LAME (mac)
if: ${{ matrix.name == 'macOS' }}
shell: bash
working-directory: Source/lib/lame
working-directory: lib/lame
run: |
./configure CFLAGS="-arch x86_64 -arch arm64 -fPIC" --disable-frontend --enable-expopt=full --disable-shared --enable-static
make
- name: Configure
shell: bash
run: cmake -B ${{ env.BUILD_DIR }} -G Ninja -DLAME_LIB=${{ matrix.lame-lib }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE}} -DCMAKE_C_COMPILER_LAUNCHER=${{ matrix.ccache }} -DCMAKE_CXX_COMPILER_LAUNCHER=${{ matrix.ccache }} -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" .
Expand Down
24 changes: 18 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,25 @@ target_link_libraries(SharedCode
# my_warning_flags
)

add_custom_target(
lame_lib
COMMAND make
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/lib/lame"
)

add_dependencies(SharedCode lame_lib)
if (WIN32)
add_custom_target(
lame_lib
COMMAND nmake libmp3lame-static.lib -f Makefile.MSVC comp=msvc asm=no
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/lib/lame"
)

add_dependencies(SharedCode lame_lib)
else()
add_custom_target(
lame_lib
COMMAND make
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/lib/lame"
)

add_dependencies(SharedCode lame_lib)
endif(WIN32)



# Link the JUCE plugin targets our SharedCode target
Expand Down

0 comments on commit 0f69312

Please sign in to comment.