Skip to content

Commit

Permalink
fix macos tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bramtayl committed Oct 18, 2024
1 parent c2cf9a2 commit d16cf5d
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 49 deletions.
37 changes: 8 additions & 29 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
continue-on-error: true
strategy:
matrix:
os: [ubuntu-24.04, macos-latest, macos-13, windows-latest]
os: [ubuntu-24.04, macos-latest, windows-latest]
runs-on: ${{matrix.os}}
steps:
- name: Download
Expand All @@ -32,7 +32,7 @@ jobs:
run: pipx install gcovr

- name: Install dependencies on MacOS
if: matrix.os == 'macos-latest' || matrix.os == 'macos-13'
if: matrix.os == 'macos-latest'
run: brew install fluid-synth ninja qt

- name: Add MSVC to path on Windows
Expand Down Expand Up @@ -93,29 +93,18 @@ jobs:
-DBUILD_TESTS=ON
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake
-DNO_WARN_AUDIO=ON
-DNO_REALTIME_AUDIO=ON
-DTRACK_COVERAGE=ON
-DVCPKG_OVERLAY_PORTS=$(pwd)/overlays/fluidsynth
- name: Configure with tests on MacOS 13
if: matrix.os == 'macos-13'
run: >
cmake -S . -B with_tests
-DBUILD_TESTS=ON
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake
-DNO_WARN_AUDIO=ON
-DVCPKG_OVERLAY_PORTS=$(pwd)/overlays/fluidsynth
- name: Configure with tests on MacOS latest
- name: Configure with tests on MacOS
if: matrix.os == 'macos-latest'
run: >
cmake -S . -B with_tests
-DBUILD_TESTS=ON
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake
-DNO_REALTIME_AUDIO=ON
-DNO_WARN_AUDIO=ON
-DVCPKG_OVERLAY_PORTS=$(pwd)/overlays/fluidsynth
- name: Configure with tests on Windows
Expand All @@ -125,13 +114,13 @@ jobs:
-DBUILD_TESTS=ON
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake
-DNO_WARN_AUDIO=ON
-DNO_REALTIME_AUDIO=ON
- name: Build with tests
run: cmake --build with_tests --config Release

- name: Test on Unix (TODO test on MacOS)
if: matrix.os == 'ubuntu-24.04'
- name: Test on Unix
if: matrix.os != 'windows-latest'
run: cd with_tests; QT_QPA_PLATFORM=offscreen ctest --build-config Release --verbose

- name: Test on Windows
Expand All @@ -149,7 +138,7 @@ jobs:
files: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}

- name: Configure without tests on MacOS latest
- name: Configure without tests on MacOS
if: matrix.os == 'macos-latest'
run: >
cmake -S . -B without_tests
Expand All @@ -159,16 +148,6 @@ jobs:
-DCPACK_PACKAGE_FILE_NAME=Justly-MacOS-arm64
-DVCPKG_OVERLAY_PORTS=$(pwd)/overlays/fluidsynth
- name: Configure without tests on MacOS 13
if: matrix.os == 'macos-13'
run: >
cmake -S . -B without_tests
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake
-DCPACK_GENERATOR=ZIP
-DCPACK_PACKAGE_FILE_NAME=Justly-MacOS-x64
-DVCPKG_OVERLAY_PORTS=$(pwd)/overlays/fluidsynth
- name: Configure without tests on Ubuntu
if: matrix.os == 'ubuntu-24.04'
run: >
Expand Down
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ include(InstallRequiredSystemLibraries)

option(BUILD_TESTS "Build tests" OFF)
option(NO_REALTIME_AUDIO "Do not start realtime audio" OFF)
option(NO_WARN_AUDIO "No warnings when realtime audio isn't available" OFF)
option(INCLUDE_WHAT_YOU_USE "Run include-what-you-use" OFF)
option(TRACK_COVERAGE "Track coverage" OFF)

Expand Down Expand Up @@ -64,10 +63,6 @@ if (NO_REALTIME_AUDIO)
target_compile_definitions(JustlyLibrary PRIVATE "NO_REALTIME_AUDIO")
endif()

if (NO_WARN_AUDIO)
target_compile_definitions(JustlyLibrary PRIVATE "NO_WARN_AUDIO")
endif()

add_subdirectory(include)
add_subdirectory(src)

Expand Down
Loading

0 comments on commit d16cf5d

Please sign in to comment.