Ruby 3.2.2 YJIT on Travis CI

85 views Asked by At

I'm trying to build Ruby 3.2.2 with YJIT support on Travis CI, but Travis doesn't seem to allow this.

I'm using the following inside of the .travis.yml:

language: ruby
dist: focal
rvm:
 - 3.2.2
env:
  - RUBY_CONFIGURE_OPTS="--enable-yjit"
  - RUBY_YJIT_ENABLE=1
  - RUBYOPT="--enable-yjit"
cache:
  npm: true
  bundler: true
sudo: false
services:
  - mysql
  - redis-server
before_script:
  - sudo apt install -y curl build-essential gcc make
  - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
  - source "$HOME/.cargo/env"
  - rustc --version
stages:
  - ruby
jobs:
  include:
    - stage: ruby
      name: "Ruby Version Info"
      script:
      - ruby --yjit -v

(I tried using before_install and that also didn't work.)

The output from this stage is as follows:

0.32s$ sudo apt install -y curl build-essential gcc make
before_script.5
14.65s$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
before_script.6
0.00s$ source "$HOME/.cargo/env"
before_script.7
0.05s$ rustc --version
rustc 1.73.0 (cc66ad468 2023-10-03)
0.02s$ ruby --yjit -v
ruby: warning: Ruby was built without YJIT support. You may need to install rustc to build Ruby with YJIT.
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]
The command "ruby --yjit -v" exited with 0.
1

There are 1 answers

0
Paul Danelli On

Travis Support found the solution for me:

before_install:
  - curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable
  - source "$HOME/.cargo/env"
  - rustc --version
  - RUBYCONFIGUREOPTS=--enable-yjit rvm reinstall --disable-binary 3.2.2