Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AppVeyor trying to compile hum2mid #110

Open
craigsapp opened this issue Apr 22, 2024 · 1 comment
Open

AppVeyor trying to compile hum2mid #110

craigsapp opened this issue Apr 22, 2024 · 1 comment

Comments

@craigsapp
Copy link
Owner

https://ci.appveyor.com/project/craigsapp/midifile/builds/49663630/job/hi372xvt4y2xw3ki

       (ClCompile target) -> 
         C:\projects\midifile\tools\mid2hum.cpp(47): fatal error C1083: Cannot open include file: 'Convert.h': No such file or directory [C:\projects\midifile\build\mid2hum.vcxproj]
    9 Warning(s)
    1 Error(s)
Time Elapsed 00:03:54.11

CMakeLists.txt excludes mid2hum:

# The following programs require headers from humextra repository.
# <https://github.com/humdrum-tools/humextra>
if(HAVE_HUMDRUM_H)
    add_executable(henonfile tools/henonfile.cpp)
    add_executable(mid2hum tools/mid2hum.cpp)
    add_executable(midiexcerpt tools/midiexcerpt.cpp)
    add_executable(peep2midi tools/peep2midi.cpp)

    target_link_libraries(henonfile midifile)
    target_link_libraries(mid2hum midifile)
    target_link_libraries(midiexcerpt midifile)
    target_link_libraries(peep2midi midifile)
endif()
@craigsapp
Copy link
Owner Author

ChatGPT recommends this adjustment to appveyor.yml:

version: 1.0.{build}

image: Visual Studio 2017

cache:
  - C:\tools\vcpkg\installed

environment:
  matrix:
    - generator: "Visual Studio 15"
      config: Release
      arch: vs2017-x86

    - generator: "Visual Studio 15 Win64"
      config: Release
      arch: vs2017-x64

    - generator: "Visual Studio 14"
      config: Release
      arch: vs2015-x86

    - generator: "Visual Studio 14 Win64"
      config: Release
      arch: vs2015-x64

init:
  - git config --global core.autocrlf input

build_script:
  - cmake -G"%generator%" -DINCLUDE_MID2HUM=OFF -H. -Bbuild
  - msbuild build\midifile.sln /t:build /p:Configuration="%config%" /m /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"

after_build:
  - ps: $env:git_hash = $env:appveyor_repo_commit.Substring(0, 8)
  - ps: $env:my_version = "$env:appveyor_build_version-$env:git_hash"
  - set package_name=midifile-%my_version%-%arch%
  - mkdir lib
  - copy "build\%config%\midifile.lib" lib
  - 7z a %package_name%.zip include lib README.md LICENSE.txt

artifacts:
  - path: $(package_name).zip
    name: $(arch)

Currently:

version: 1.0.{build}

image: Visual Studio 2017

environment:
  matrix:
  - generator: "Visual Studio 15"
    config: Release
    arch: vs2017-x86
    APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017

  - generator: "Visual Studio 15 Win64"
    config: Release
    arch: vs2017-x64
    APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017

  - generator: "Visual Studio 14"
    config: Release
    arch: vs2015-x86
    APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015

  - generator: "Visual Studio 14 Win64"
    config: Release
    arch: vs2015-x64
    APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015

init:
  - git config --global core.autocrlf input

build_script:
  - cmake -G"%generator%" -H. -Bbuild
  #- cmake --build build --config "%config%"
  - msbuild build\midifile.sln /t:build /p:Configuration="%config%" /m /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"

after_build:
  - ps: $env:git_hash = $env:appveyor_repo_commit.Substring(0, 8)
  - ps: $env:my_version = "$env:appveyor_build_version-$env:git_hash"
  - set package_name=midifile-%my_version%-%arch%
  - mkdir lib
  - copy "build\%config%\midifile.lib" lib
  - 7z a %package_name%.zip include lib README.md LICENSE.txt

artifacts:
  - path: $(package_name).zip
    name: $(arch)

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

No branches or pull requests

1 participant