mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 08:25:07 +03:00
Enable YJIT; Fixes #3538
This commit is contained in:
parent
c2b37c4509
commit
341d7803aa
2 changed files with 55 additions and 38 deletions
3
.github/workflows/pkg-platform.yml
vendored
3
.github/workflows/pkg-platform.yml
vendored
|
@ -218,7 +218,7 @@ jobs:
|
||||||
if: ${{ ! inputs.dry-run }}
|
if: ${{ ! inputs.dry-run }}
|
||||||
|
|
||||||
complain:
|
complain:
|
||||||
needs: [build, test, bottle]
|
needs: bottle
|
||||||
if: failure() && !inputs.dry-run
|
if: failure() && !inputs.dry-run
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
|
@ -228,4 +228,3 @@ jobs:
|
||||||
- uses: ./.github/actions/complain
|
- uses: ./.github/actions/complain
|
||||||
with:
|
with:
|
||||||
pkg: ${{ fromJSON(inputs.pkg).project }}=${{ fromJSON(inputs.pkg).version.value }}
|
pkg: ${{ fromJSON(inputs.pkg).project }}=${{ fromJSON(inputs.pkg).version.value }}
|
||||||
platform: ${{ inputs.name }}
|
|
||||||
|
|
|
@ -19,26 +19,15 @@ build:
|
||||||
gnu.org/patch: '*'
|
gnu.org/patch: '*'
|
||||||
gnu.org/bison: ^3
|
gnu.org/bison: ^3
|
||||||
gnu.org/autoconf: '*'
|
gnu.org/autoconf: '*'
|
||||||
|
rust-lang.org: ^1 # required to build YJIT
|
||||||
linux:
|
linux:
|
||||||
ruby-lang.org: '*' # ruby requires ruby to build
|
ruby-lang.org: ^3 # ruby requires ruby to build
|
||||||
# ^^ only linux because we got issues on darwin currently and darwin provides ruby (for now)
|
# ^^ only linux because we got issues on darwin currently and darwin provides ruby (for now)
|
||||||
env:
|
|
||||||
ARGS:
|
|
||||||
- --prefix="{{prefix}}"
|
|
||||||
- --enable-load-relative # makes us relocatable
|
|
||||||
- --without-gmp
|
|
||||||
- --with-rubyarchprefix={{prefix}}/lib/ruby # no need for architecture specific crap
|
|
||||||
- --with-rubyhdrdir={{prefix}}/include # ^^
|
|
||||||
- --with-rubyarchhdrdir={{prefix}}/include # ^^
|
|
||||||
- --disable-multiarch # ^^
|
|
||||||
- --with-vendordir=no # is empty so don’t pollute
|
|
||||||
- --with-vendorarchdir=no # ^^
|
|
||||||
- --with-sitedir=no # ^^
|
|
||||||
- --with-sitearchdir=no # ^^
|
|
||||||
script:
|
script:
|
||||||
- patch -p1 < props/mkconfig.rb.diff
|
- patch -p1 < props/mkconfig.rb.diff
|
||||||
|
|
||||||
- ./configure $ARGS
|
- ./configure $ARGS
|
||||||
|
|
||||||
- make --jobs {{hw.concurrency}} install
|
- make --jobs {{hw.concurrency}} install
|
||||||
|
|
||||||
# we provide these as `rubygems.org`
|
# we provide these as `rubygems.org`
|
||||||
|
@ -83,36 +72,65 @@ build:
|
||||||
-e 's|CONFIG\["topdir"\] = .*|CONFIG\["topdir"\] = TOPDIR|g'
|
-e 's|CONFIG\["topdir"\] = .*|CONFIG\["topdir"\] = TOPDIR|g'
|
||||||
rbconfig.rb
|
rbconfig.rb
|
||||||
working-directory: ${{prefix}}/lib/ruby/{{version.marketing}}.0
|
working-directory: ${{prefix}}/lib/ruby/{{version.marketing}}.0
|
||||||
|
env:
|
||||||
|
ARGS:
|
||||||
|
- --prefix="{{prefix}}"
|
||||||
|
- --enable-load-relative # makes us relocatable
|
||||||
|
- --without-gmp
|
||||||
|
- --with-rubyarchprefix={{prefix}}/lib/ruby # no need for architecture specific crap
|
||||||
|
- --with-rubyhdrdir={{prefix}}/include # ^^
|
||||||
|
- --with-rubyarchhdrdir={{prefix}}/include # ^^
|
||||||
|
- --disable-multiarch # ^^
|
||||||
|
- --with-vendordir=no # is empty so don’t pollute
|
||||||
|
- --with-vendorarchdir=no # ^^
|
||||||
|
- --with-sitedir=no # ^^
|
||||||
|
- --with-sitearchdir=no # ^^
|
||||||
|
- --enable-yjit # https://github.com/pkgxdev/pantry/issues/3538
|
||||||
|
|
||||||
test:
|
test:
|
||||||
dependencies:
|
dependencies:
|
||||||
rubygems.org: '*' # is a companion __however__ brewkit doesn’t add companions to the env automatically
|
rubygems.org: '*' # is a companion __however__ brewkit doesn’t add companions to the test env automatically
|
||||||
script:
|
script:
|
||||||
- |
|
- ruby -e 'puts "Hello World!"'
|
||||||
ruby -e 'puts "Hello World!"'
|
|
||||||
# echo 'puts 1' | irb
|
# “The terminfo database could not be found.”
|
||||||
# ^^ FIXME `The terminfo database could not be found`
|
# all platforms but only happens in the test harness
|
||||||
|
# ie. you can run this locally and it will work
|
||||||
|
# - echo 'puts 1' | irb
|
||||||
|
|
||||||
# tests the libraries that come with Ruby can be utilized
|
# tests the libraries that come with Ruby can be utilized
|
||||||
- run: |
|
- run:
|
||||||
mv $FIXTURE a.rb
|
ruby $FIXTURE
|
||||||
ruby a.rb
|
fixture:
|
||||||
fixture: |
|
content: |
|
||||||
require 'date'
|
require 'date'
|
||||||
puts Date.today
|
puts Date.today
|
||||||
|
extname: rb
|
||||||
|
|
||||||
# tests the gems that come with Ruby can be utilized
|
# tests the gems that come with Ruby can be utilized
|
||||||
- run: |
|
- run:
|
||||||
mv $FIXTURE a.rb
|
ruby $FIXTURE
|
||||||
ruby a.rb
|
fixture:
|
||||||
fixture: |
|
content: |
|
||||||
require 'matrix'
|
require 'matrix'
|
||||||
matrix = Matrix[[1, 2], [3, 4]]
|
matrix = Matrix[[1, 2], [3, 4]]
|
||||||
transpose_matrix = matrix.transpose
|
transpose_matrix = matrix.transpose
|
||||||
determinant = matrix.determinant
|
determinant = matrix.determinant
|
||||||
puts "Original matrix:\n#{matrix}"
|
puts "Original matrix:\n#{matrix}"
|
||||||
puts "Transposed matrix:\n#{transpose_matrix}"
|
puts "Transposed matrix:\n#{transpose_matrix}"
|
||||||
puts "Determinant of the matrix: #{determinant}"
|
puts "Determinant of the matrix: #{determinant}"
|
||||||
|
extname: rb
|
||||||
|
|
||||||
|
- run:
|
||||||
|
ruby --yjit $FIXTURE
|
||||||
|
fixture:
|
||||||
|
content: |
|
||||||
|
def fib(n)
|
||||||
|
return n if n <= 1
|
||||||
|
fib(n-1) + fib(n-2)
|
||||||
|
end
|
||||||
|
puts fib(35)
|
||||||
|
extname: rb
|
||||||
|
|
||||||
provides:
|
provides:
|
||||||
- bin/erb
|
- bin/erb
|
||||||
|
|
Loading…
Reference in a new issue