Sample appveyor.yml for Ruby C extension

peter's Avatar

peter

04 May, 2017 02:38 AM

I am trying to set up an appveyor.yml for a Ruby C extension. I haven't been able to figure out how to get the compile started. I've tried the build_script option but make does not seem to exist. Has anyone done this before and if so do you have an example?

  1. Support Staff 1 Posted by Ilya Finkelshte... on 04 May, 2017 03:41 AM

    Ilya Finkelshteyn's Avatar

    Hi Peter,

    Please try C:\Ruby23\DevKit\bin or C:\Ruby23-x64\DevKit\bin folders.

    Note that you can check software installed on build worker here and also connect to build worker with RDP to look closer.

    Ilya.

  2. 2 Posted by peter on 04 May, 2017 03:37 PM

    peter's Avatar

    Thanks, that got me further but no success on the compiler. If you are willing to offer more advice here is what I have so far for https://ci.appveyor.com/project/ohler55/oj.

    version: 1.0.{build}-{branch}

    image: Visual Studio 2015

    environment:
      APPVEYOR_RDP_PASSWORD: fixm3-wtf
      RUBY_VERSION: 23-x64
      PATH: C:\Ruby%RUBY_VERSION%\bin;C:\Ruby23-x64\DevKit\bin;C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1;%PATH%
     
    build: off

    before_build:
      - ruby -v
      - make -v

    build_script:
      - cd C:\projects\oj\ext\oj
      - ruby extconf.rb
      - make

  3. Support Staff 3 Posted by Ilya Finkelshte... on 04 May, 2017 11:42 PM

    Ilya Finkelshteyn's Avatar

    I was able to make it work with this path in my fork:

    PATH: c:\Ruby%RUBY_VERSION%\DevKit\mingw\bin;C:\Ruby%RUBY_VERSION%\bin;C:\Ruby%RUBY_VERSION%\DevKit\bin;C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1;%PATH%
    
    adding mingw\bin helps it to find way to x86_64-w64-mingw32-gcc.exe

    Thanks!

  4. 4 Posted by peter on 05 May, 2017 02:24 PM

    peter's Avatar

    Awesome! It works. Time to get the AppVeyor badge set up.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac