Skip to content

Commit

Permalink
fix(ci): Try to fix MingW build failures.
Browse files Browse the repository at this point in the history
  • Loading branch information
na2axl committed Nov 6, 2024
1 parent c3643a3 commit ff315fa
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
strategy:
fail-fast: false
matrix:
build_type: [ "release", "debug" ]
build_type: ["release", "debug"]
config:
- name: "Windows Latest MSVC"
key: msvc
Expand Down Expand Up @@ -206,7 +206,9 @@ jobs:
if: matrix.build_type == 'debug'
shell: bash
working-directory: ${{ inputs.project-path }}/build/tests
run: ctest -j1 -C debug --output-on-failure
run: |
${{ github.workspace }}/build/bin/${{ matrix.config.target_triplet }}/ampk${{ startsWith(matrix.config.os, 'windows') && '.exe' || '' }} -q -c 0 "${{ github.workspace }}/build/bin/${{ matrix.config.target_triplet }}/samples/assets" "${{ github.workspace }}/build/bin/${{ matrix.config.target_triplet }}/samples/assets.ampk"
ctest -j1 -C debug --output-on-failure
env:
AM_SDK_PATH: "${{ steps.sdk_path.outputs.path }}/sdk"
AM_SDK_PLATFORM: ${{ matrix.config.target_triplet }}
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ project(Amplitude
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

if(UNIT_TESTS AND NOT MSVC)
if(UNIT_TESTS AND NOT WIN32)
include(CodeCoverage)
append_coverage_compiler_flags()

Expand Down Expand Up @@ -557,7 +557,7 @@ if(BUILD_SAMPLES)
endif ()

if(UNIT_TESTS)
if (NOT MSVC)
if (NOT WIN32)
setup_target_for_coverage_lcov(
NAME ss_amplitude_audio_tests_coverage
EXECUTABLE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ss_amplitude_audio_tests
Expand Down
28 changes: 14 additions & 14 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,24 @@ add_executable(${PROJECT_NAME}
audio_buffer.cpp)
target_link_libraries(${PROJECT_NAME} PRIVATE Catch2::Catch2 Static)

add_custom_target(ss_amplitude_audio_test_package
COMMAND $<TARGET_FILE:ampk> -q -c 0 "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/samples/assets" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/samples/assets.ampk"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
#add_custom_target(ss_amplitude_audio_test_package
# COMMAND $<TARGET_FILE:ampk> -q -c 0 "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/samples/assets" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/samples/assets.ampk"
# WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
#)

add_dependencies(ss_amplitude_audio_test_package
ampk
ss_amplitude_audio_sample_project
ss_amplitude_audio_sample_01
ss_amplitude_audio_sample_02
)
#add_dependencies(ss_amplitude_audio_test_package
# ampk
# ss_amplitude_audio_sample_project
# ss_amplitude_audio_sample_01
# ss_amplitude_audio_sample_02
#)

add_dependencies(${PROJECT_NAME}
Static
ss_amplitude_audio_test_package
amac
ampk
amir
# ss_amplitude_audio_test_package
# amac
# ampk
# amir
)

include(Catch)
Expand Down

0 comments on commit ff315fa

Please sign in to comment.