Giter Site home page Giter Site logo

msp-greg / ruby-loco Goto Github PK

View Code? Open in Web Editor NEW
16.0 4.0 5.0 1.2 MB

Fully tested Ruby Windows Mingw, ucrt & mswin builds, built and saved on GitHub

Home Page: https://github.com/MSP-Greg/ruby-loco

License: MIT License

Ruby 34.57% PowerShell 64.59% Shell 0.84%
ruby mingw mswin ucrt windows

ruby-loco's Introduction

ruby-loco

ucrt mswin mingw

General

This repo creates self-contained Windows Ruby master builds (mingw, ucrt and mswin), and saves them to the one release in the repo. This is done three times a day.

The links for the build 7z files are:

mingw: https://github.com/MSP-Greg/ruby-loco/releases/download/ruby-master/ruby-mingw.7z

ucrt: https://github.com/MSP-Greg/ruby-loco/releases/download/ruby-master/ruby-ucrt.7z

mswin: https://github.com/MSP-Greg/ruby-loco/releases/download/ruby-master/ruby-mswin.7z

Note that if any of the Ruby test suites fail, the build will not be uploaded. Hence, the links will provide the most recent build that passed.

The builds can be used in GitHub Actions CI by using the ruby/setup-ruby action or the ruby/setup-ruby-pkgs action, which also helps with cross-platform package installation.

The repo can be used to build Ruby locally. See (WIP) Local Use.

Differences from Ruby CI

  • Patches allow the test suites to run from the install folder, as opposed to the build folder. 'make' is not used to run any tests.

  • A simple CLI test is run on all bin files to verify they work. Both Windows & Bash shells are checked.

Brief History

I started working with building and testing MSYS2/MinGW Ruby in 2016, and what could be considered the start of ruby-loco happened in early 2017.

At first, its main purpose was to run full testing on MinGW master builds, as at the time, that was not done in ruby/ruby. The code was updated to create a full binary build and moved to AppVeyor.

Today, mingw, ucrt and mswin builds are done, and are available for use with GitHUb Actions.

ruby-loco's People

Contributors

msp-greg avatar xrxr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ruby-loco's Issues

Make commands in PKGBUILD

@hsbt

First of all, I'm not sure if you're using any of this, or what you use for MinGW builds. I haven't updated this for a while.

Secondly, seems travis and appveyor have some issues today. Copy openssl library finder for ext/digest from OpenSSL extention built fine for me. Test results and build on BinTray.

I'm reviewing the make commands in the PKGBUILD file. Since I'm not a ctype, all I can do is compare the mswin appveyor.yml file and the .travis.yml file, as (I assume) a MinGW build is somewhat between the two.

Both files have make commands before the configure command. My current 'build command order' is:

autoreconf -fi
configure...
make -l update-unicode
make -j3 BASERUBY=${RUBY} UNICODE_FILES=. all

I may be integrating my work on Ruby specific packages, patches and repeatable testing back into RI2. Additionally, I and others are interested in getting more RI2 style versions available for use on Appveyor. Maybe builds back to 2.3.4, trunk/head, and even stable branches. With so many users staying on Ruby 2.3.x, there should be RI2 versions available. FYI, I'm using my trunk build in the daily appveyor_ruby log. I also use it when updating my doc site.

My builds are testing and working fine. Since I'm trying to get builds more Appveyor friendly (and move them there), I'm wondering why my test-all assertions are over double the amount shown on travis and appveyor...

Sorry for the message. You, nobu, usa, and others I thank for all your work. I'm just trying to apply the skills that I do have to improve ruby on windows. I do get frustrated, and I do have my 'stupid' moments...

[enhancement request] Add a static build

Would it be possible to add a mswin build with --disable-shared --enable-static --with-static-linked-ext --enable-load-relative options?

I've tried on a fork (and locally), can't seem to be make it work exactly, though it's close. It builds and all, but ruby -v does nothing unless I do use the manifest with the dlls provided by vcpkg (ruby_builtin_dlls).

I'm guessing there's a way to statically link those as well.


Should maybe try using pkgconf on windows instead of manually symlinking the DLLs to the ruby repo?

> C:\vcpkg\vcpkg.exe install --triplet=x64-windows pkgconf 
> $env:PKG_CONFIG_PATH="C:\vcpkg\installed\x64-windows\lib\pkgconfig"
> C:\vcpkg\installed\x64-windows\tools\pkgconf\pkgconf.exe --libs openssl --msvc-syntax
/libpath:C:/vcpkg/installed/x64-windows/lib libssl.lib libcrypto.lib

I've got a patch (for several versions, here is 3.2.2): https://github.com/jmarrec/conan-recipes/blob/main/recipes/ruby/all/patches/0005-fix-pkg-config-on-windows-3.2.2.patch and an upstream PR to support pkgconf on windows: ruby/ruby#9815

Tag releases by version instead of using always master

Hey, I am using this to build MetaCall in a portable way for Windows. I just realized that you always overwrite the same release and you rename it to master. This makes difficult to have a stable CI/CD because as versions aren't tagged, I have to modify the build script each time to update the version and it fails unexpectedly: https://github.com/metacall/distributable-windows/runs/7369013925?check_suite_focus=true

Can you create different releases for each version? This would be very helpful.

If you need the code for creating releases you can use the one I have for MetaCall: https://github.com/metacall/core/blob/fe109a5e86673d59d588bd2bc23a1cc364ee88b7/.github/workflows/release.yml#L41

It is implemented for Linux but it can be migrated easily for Windows, the tool being used is cross-platform and it is written in Go, so it is portable.

Thanks for your time.

[Documentation] Simple/Simplistic setup?

Hey Greg,

Do you think you could add a brief installation instruction to the main README at https://github.com/MSP-Greg/ruby-loco/blob/master/README.md ?

Nothing complicated, just really a simple/simplistic work flow, one that may work for you when you are on a fresh windows machine (no matter which windows variant, though I guess it does matter what windows variant; I am more interested in like the most simple installation scenario, ideally something that could be copy/pasted :D). Thanks!

ruby-loco misc

@ioquatix

Here is ruby-loco, because it's not part of Ruby, every change to Ruby has to be added as a patch file.

Normally it's just building from trunk, so that isn't an issue. For native fiber, it might get tedious...

Patches needed for the build are placed in the patches folder, test patches get placed their own folders.

If you look at a build's artifacts page (example https://ci.appveyor.com/project/MSP-Greg/ruby-loco/builds/20448680/artifacts), you'll see the files saved. One is a self contained build, one is the build files saved from one of the build folders (-ext or ext ?), and zlogs is all the test info.

If you look in the patches folder, you'll see all the 'cont.c' patches I added from your PR. If you want to use it locally, it is setup to be used that way, you need ruby and two other repos for a complete build.

There's a file local.ps1.sample', it needs to be corrected for your system, and renamed local.ps1. Other than that, four symlinks/junctions are needed with the repo for git, ruby, and the two other repos.

FYI, I kind of tore ruby-loco apart and put it back together recently, and I never updated the README (how to use locally) info.

Rust executables which link Ruby recently broke

As of a couple days ago, I noticed that Magnus' CI started failing on Windows. The test suite runs cargo test, which depends on linking libruby. The error code is a bit mysterious to me:

`D:\a\magnus\magnus\target\debug\deps\magnus-bbc43cc68a670100.exe` (exit code: 0xc0000142, STATUS_DLL_INIT_FAILED)

So compilation works properly, but when executing the tests some type of DLL cannot be initialized. When trying to fix the issue, I noticed that everything works for ruby-head, but 2.7, 3.0, and 3.1 have the same error.

I'm wondering if anything may have changed recently, or if you can help me figure out what's happening. Thank you ๐Ÿ™

Make `mswin` tag use a stable release

Testing against ruby-head is hard because it can introduce subtle changes that break CI. Overall, it can cause a lot of toil for developers.

I propose that mswin reference on GitHub actions reference the latest stable ruby release, and we introduce a mswin-head tag for testing against Ruby head.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.