ruby / psych

A libyaml wrapper for Ruby
MIT License
566 stars 206 forks source link

CI: Ruby 2.5 runs on macos-13 (amd64) #677

Closed olleolleolle closed 3 months ago

olleolleolle commented 4 months ago

Run old Ruby on a version of macOS which is for amd64.

This gets macOS tests for Ruby 2.5 to green. 🟢

``` Error: CRuby < 2.6 does not support macos-arm64. Either use a newer Ruby version or use a macOS image running on amd64, e.g., macos-13 or macos-12. Note that GitHub changed the meaning of macos-latest from macos-12 (amd64) to macos-14 (arm64): https://github.blog/changelog/2024-04-01-macos-14-sonoma-is-generally-available-and-the-latest-macos-runner-image/ If you are using a matrix of Ruby versions, a good solution is to run only < 2.6 on amd64, like so: matrix: ruby: ['2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3'] os: [ ubuntu-latest, macos-latest ] # CRuby < 2.6 does not support macos-arm64, so test those on amd64 instead exclude: - { os: macos-latest, ruby: '2.4' } - { os: macos-latest, ruby: '2.5' } include: - { os: macos-13, ruby: '2.4' } - { os: macos-13, ruby: '2.5' } But of course you should consider dropping support for these long-EOL Rubies, which cannot even be built on recent macOS machines. ```
olleolleolle commented 4 months ago

The failing JRuby test has a warning note, in addition to its OOM failure:

Pass '--add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED' to enable.


On Windows, this didn't pan out so well, perhaps due to some sort of quoting?

``` bundle install --jobs 1 shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'" env: TMPDIR: D:\a\_temp CI: true HOME: C:\Users\runneradmin MSYS2_PATH_TYPE: inherit Path: C:\Program Files\MongoDB\Server\5.0\bin;C:\aliyun-cli;C:\vcpkg;C:\Program Files (x86)\NSIS\;C:\tools\zstd;C:\Program Files\Mercurial\;C:\hostedtoolcache\windows\stack\2.15.7\x64;C:\cabal\bin;C:\\ghcup\bin;C:\mingw64\bin;C:\Program Files\dotnet;C:\Program Files\MySQL\MySQL Server 8.0\bin;C:\Program Files\R\R-4.4.1\bin\x64;C:\SeleniumWebDrivers\GeckoDriver;C:\SeleniumWebDrivers\EdgeDriver\;C:\SeleniumWebDrivers\ChromeDriver;C:\Program Files (x86)\sbt\bin;C:\Program Files (x86)\GitHub CLI;C:\Program Files\Git\bin;C:\Program Files (x86)\pipx_bin;C:\npm\prefix;C:\hostedtoolcache\windows\go\1.21.12\x64\bin;C:\hostedtoolcache\windows\Python\3.9.13\x64\Scripts;C:\hostedtoolcache\windows\Python\3.9.13\x64;C:\Program Files\OpenSSL\bin;C:\tools\kotlinc\bin;C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\8.0.412-8\x64\bin;C:\Program Files\ImageMagick-7.1.1-Q16-HDRI;C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin;C:\ProgramData\kind;C:\ProgramData\docker-compose;C:\ProgramData\Chocolatey\bin;C:\Windows\system3 JAVA_OPTS: --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED JRUBY_OPTS: -J-Xmx1g Unrecognized option: --add-opens ```

After a lot of edits, I learned that all I had to do was to ask for a little memory.