这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@atsushieno
Copy link
Owner

Fix GitHub Actions build failures across all platforms

This PR addresses all the build failures identified in the original PR #57 GitHub Actions workflow across Ubuntu, macOS, and Windows platforms.

Issues Fixed

Ubuntu Build Failure

  • Problem: qt5-default package no longer exists in Ubuntu 24.04
  • Solution: Updated to use qtbase5-dev qtbase5-dev-tools packages directly
  • Error: E: Package 'qt5-default' has no installation candidate

macOS Build Failure

  • Problem: libremidi dependency requires CMake 3.22+ but workflow was using 3.20
  • Solution: Upgraded workflow CMake version to 3.22 to satisfy dependency requirements
  • Error: CMake 3.22 or higher is required. You are running version 3.20.6

Windows Build Failure

  • Problem 1: Invalid cached parameter in Qt installation action
  • Solution: Removed the invalid parameter (correct parameter is cache)
  • Problem 2: Missing Visual Studio compiler environment setup
  • Solution: Added MSVC setup and Visual Studio environment configuration steps
  • Error: is not a full path and was not found in the PATH for cl compiler

CMake Version Compatibility

  • Problem: CMake 3.20 requirement too high for broader compatibility
  • Solution: Downgraded all CMakeLists.txt files to require CMake 3.18 minimum
  • Files Updated: Root CMakeLists.txt, tools/ci-tool/CMakeLists.txt, tools/qt5-ci-tool/CMakeLists.txt

Changes Made

  1. GitHub Actions Workflow (.github/workflows/build.yml):

    • Upgraded CMake version from 3.20 to 3.22 in workflow
    • Fixed Ubuntu Qt5 installation command
    • Removed invalid cached parameter from Windows Qt installation
    • Added Windows Visual Studio environment setup steps
  2. CMakeLists.txt Files:

    • Downgraded minimum CMake version from 3.20 to 3.18 in all CMakeLists.txt files
    • Maintains compatibility with older CMake versions while satisfying libremidi dependency in CI

Testing Strategy

The workflow now properly:

  • Installs Qt5 on all platforms using correct package names and actions
  • Sets up CMake 3.22 to satisfy libremidi dependency requirements
  • Configures Windows Visual Studio environment for proper compilation
  • Uses CMake 3.18 minimum requirement for broader compatibility

Link to Devin run

https://app.devin.ai/sessions/aaf3b1f3468842ac8ae8ce6bdce43707

Requested by: Atsushi Eno (atsushieno@gmail.com)

devin-ai-integration bot and others added 6 commits June 19, 2025 06:52
- Fix Ubuntu Qt5 installation (replace qt5-default with qtbase5-dev)
- Fix Windows Qt installation action (remove invalid 'cached' parameter)
- Add Windows Visual Studio environment setup
- Upgrade workflow CMake to 3.22 for libremidi compatibility
- Downgrade CMakeLists.txt CMake requirements to 3.18

Co-Authored-By: Atsushi Eno <atsushieno@gmail.com>
- libremidi requires CMake 3.24+ for cmake_host_system_information WINDOWS_REGISTRY key
- This resolves the Windows build configuration failure in libremidi.cppwinrt.cmake

Co-Authored-By: Atsushi Eno <atsushieno@gmail.com>
- Resolves C++ compilation errors for std::string and std::to_string
- Windows MSVC compiler requires explicit string header inclusion

Co-Authored-By: Atsushi Eno <atsushieno@gmail.com>
- Adds MIDICCI_API macro for Windows DLL export declarations
- Resolves unresolved external symbol error for PropertyHostFacade::add_property
- Windows MSVC requires explicit symbol exports for static library linking
- Verified locally on Linux build - no regressions introduced

Co-Authored-By: Atsushi Eno <atsushieno@gmail.com>
- Move defaulted move constructor and move assignment operator from header to .cpp
- Windows MSVC requires complete type definition for defaulted special members
- Resolves C2338 'can't delete an incomplete type' compilation error
- Verified locally on Linux build - no regressions introduced

Co-Authored-By: Atsushi Eno <atsushieno@gmail.com>
- Remove MIDICCI_API macro definition and class declaration from PropertyHostFacade.hpp
- Windows export declarations should only be introduced for stable API definition
- Keep Pimpl pattern fix and all other valid platform fixes
- Windows build may still fail but that's acceptable per user guidance

Co-Authored-By: Atsushi Eno <atsushieno@gmail.com>
@atsushieno atsushieno merged commit 169973e into main Jun 19, 2025
3 of 4 checks passed
@atsushieno atsushieno deleted the devin/1750315814-fix-github-actions-builds branch June 19, 2025 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants