-
Notifications
You must be signed in to change notification settings - Fork 289
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bea68c7
commit 6ab7aaa
Showing
38 changed files
with
2,761 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,165 @@ | ||
package: | ||
name: ruby-3.4 | ||
version: 3.4.0 | ||
epoch: 0 | ||
description: "the Ruby programming language" | ||
copyright: | ||
- license: Ruby | ||
- license: BSD-2-Clause | ||
dependencies: | ||
provides: | ||
- ruby=${{package.full-version}} | ||
# These are bundled gems | ||
- ruby3.4-csv | ||
- ruby3.4-base64 | ||
- ruby3.4-drb | ||
runtime: | ||
- glibc | ||
- gmp | ||
- libgcc | ||
- openssl | ||
- yaml | ||
- zlib | ||
|
||
environment: | ||
contents: | ||
packages: | ||
- autoconf | ||
- build-base | ||
- busybox | ||
- coreutils | ||
- gdbm-dev | ||
- glibc-dev | ||
- gmp-dev | ||
- graphviz | ||
- libffi-dev | ||
- libxcrypt-dev | ||
- linux-headers | ||
- openssf-compiler-options | ||
- openssl-dev | ||
- pkgconf | ||
- readline-dev | ||
- ruby-3.3 | ||
- rust | ||
- tk-dev | ||
- yaml-dev | ||
- zlib-dev | ||
|
||
vars: | ||
prefix: /usr | ||
|
||
var-transforms: | ||
- from: ${{package.version}} | ||
match: \. | ||
replace: _ | ||
to: underscore-package-version | ||
|
||
pipeline: | ||
- uses: git-checkout | ||
with: | ||
repository: https://github.com/ruby/ruby | ||
tag: v${{vars.underscore-package-version}}_preview2 | ||
expected-commit: 32c733f57bb91e22972319ee63eac9521d954ebc | ||
|
||
- name: Generate and Configure | ||
runs: | | ||
./autogen.sh | ||
./configure \ | ||
--host=${{host.triplet.gnu}} \ | ||
--build=${{host.triplet.gnu}} \ | ||
--target=${{host.triplet.gnu}} \ | ||
--prefix=${{vars.prefix}} \ | ||
--enable-shared \ | ||
--disable-rpath \ | ||
--sysconfdir=/etc \ | ||
--enable-mkmf-verbose \ | ||
--enable-yjit | ||
- uses: autoconf/make | ||
|
||
# Update and Extract bundled gems | ||
- uses: autoconf/make | ||
with: | ||
opts: update-gems extract-gems | ||
|
||
# Build documentation | ||
- uses: autoconf/make | ||
with: | ||
opts: rdoc capi | ||
|
||
- uses: autoconf/make-install | ||
|
||
- runs: | | ||
# Ignore the patch version of ruby since ruby will install under the | ||
# version of the latest standard library. Should produce the string 3.4.* | ||
RUBYWILD="$(echo ${{package.version}} | cut -d. -f-2).*" | ||
RUBYDIR=${{targets.destdir}}${{vars.prefix}}/lib/ruby/$RUBYWILD | ||
rm -rf ${RUBYDIR}/bundler | ||
rm -f ${RUBYDIR}/bundler.rb | ||
GEMDIR=${{targets.destdir}}${{vars.prefix}}/lib/ruby/gems/$RUBYWILD | ||
rm -rf ${GEMDIR}/gems/bundler-* | ||
rm -f ${GEMDIR}/specifications/default/bundler-*.gemspec | ||
rm -f ${{targets.destdir}}/usr/bin/bundle \ | ||
${{targets.destdir}}/usr/bin/bundler | ||
- runs: | | ||
find ${{targets.destdir}} -name 'mkmf.log' -exec rm {} \; | ||
subpackages: | ||
- name: "ruby-3.4-doc" | ||
description: "ruby documentation" | ||
pipeline: | ||
- uses: split/manpages | ||
- runs: | | ||
mkdir -p "${{targets.subpkgdir}}"/usr/share | ||
mv "${{targets.destdir}}"/usr/share/doc "${{targets.subpkgdir}}"/usr/share/ | ||
mv "${{targets.destdir}}"/usr/share/ri "${{targets.subpkgdir}}"/usr/share/ | ||
- name: "ruby-3.4-dev" | ||
description: "ruby development headers" | ||
pipeline: | ||
- uses: split/dev | ||
test: | ||
pipeline: | ||
- uses: test/pkgconf | ||
|
||
update: | ||
enabled: true | ||
version-transform: | ||
- match: "_" | ||
replace: . | ||
github: | ||
identifier: ruby/ruby | ||
strip-prefix: v | ||
use-tag: true | ||
tag-filter-prefix: v3_4_ | ||
|
||
test: | ||
pipeline: | ||
- runs: | | ||
ruby --version | grep ${{package.version}} | ||
cat <<EOF >> /tmp/hello.rb | ||
puts("Hello Wolfi!") | ||
EOF | ||
ruby /tmp/hello.rb | ||
erb --version | ||
gem --version | ||
gem --help | ||
irb --version | ||
irb --help | ||
racc --version | ||
rake --version | ||
rake --help | ||
rdbg --version | ||
rdbg --help | ||
rdoc --version | ||
rdoc --help | ||
ri --version | ||
ri --help | ||
ruby --help |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
package: | ||
name: ruby3.4-async-io | ||
version: 1.43.2 | ||
epoch: 0 | ||
description: Provides support for asynchonous TCP, UDP, UNIX and SSL sockets. | ||
copyright: | ||
- license: MIT | ||
dependencies: | ||
runtime: | ||
- ruby${{vars.rubyMM}}-async | ||
- ruby-${{vars.rubyMM}} | ||
|
||
environment: | ||
contents: | ||
packages: | ||
- build-base | ||
- busybox | ||
- ca-certificates-bundle | ||
- git | ||
- ruby-${{vars.rubyMM}} | ||
- ruby-${{vars.rubyMM}}-dev | ||
|
||
vars: | ||
gem: async-io | ||
|
||
pipeline: | ||
- uses: git-checkout | ||
with: | ||
expected-commit: 268c0b564e9904ad49a4d8d1435279003721c297 | ||
repository: https://github.com/socketry/async-io | ||
tag: v${{package.version}} | ||
|
||
- uses: ruby/build | ||
with: | ||
gem: ${{vars.gem}} | ||
|
||
- uses: ruby/install | ||
with: | ||
gem: ${{vars.gem}} | ||
version: ${{package.version}} | ||
|
||
- uses: ruby/clean | ||
|
||
test: | ||
environment: | ||
contents: | ||
packages: | ||
- ruby-${{vars.rubyMM}} | ||
- ruby${{vars.rubyMM}}-async | ||
pipeline: | ||
- runs: | | ||
ruby <<-EOF | ||
require 'async' | ||
require 'async/io' | ||
require 'test/unit' | ||
include Test::Unit::Assertions | ||
class TestAsyncIO < Test::Unit::TestCase | ||
def test_basic_tcp_connection | ||
host = "127.0.0.1" | ||
port = 9090 | ||
Async do |task| | ||
# Server task: responds with a message | ||
server_task = task.async do | ||
server = Async::IO::TCPServer.new(host, port) | ||
client = server.accept | ||
client.write("Hello, Async!") | ||
client.close | ||
server.close | ||
end | ||
# Allow server to start | ||
task.sleep(0.1) | ||
# Client task: connects and reads message | ||
client_task = task.async do | ||
client = Async::IO::TCPSocket.new(host, port) | ||
message = client.read | ||
assert_equal "Hello, Async!", message, "Expected message from server" | ||
client.close | ||
end | ||
client_task.wait | ||
server_task.stop | ||
end | ||
puts "Basic TCP connection test passed." | ||
end | ||
end | ||
EOF | ||
update: | ||
enabled: true | ||
github: | ||
identifier: socketry/async-io | ||
strip-prefix: v | ||
use-tag: true | ||
|
||
var-transforms: | ||
- from: ${{package.name}} | ||
match: ^ruby(\d\.\d+)-.* | ||
replace: $1 | ||
to: rubyMM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
package: | ||
name: ruby3.4-async-pool | ||
version: 0.10.2 | ||
epoch: 0 | ||
description: A singleplex and multiplex resource pool for implementing robust clients. | ||
copyright: | ||
- license: MIT | ||
dependencies: | ||
runtime: | ||
- ruby${{vars.rubyMM}}-async | ||
- ruby${{vars.rubyMM}}-metrics | ||
- ruby${{vars.rubyMM}}-traces | ||
- ruby-${{vars.rubyMM}} | ||
|
||
environment: | ||
contents: | ||
packages: | ||
- build-base | ||
- busybox | ||
- ca-certificates-bundle | ||
- git | ||
- ruby-${{vars.rubyMM}} | ||
- ruby-${{vars.rubyMM}}-dev | ||
|
||
vars: | ||
gem: async-pool | ||
|
||
pipeline: | ||
- uses: git-checkout | ||
with: | ||
expected-commit: 538d46c45f603d85d87680e06df8f032c14ecdca | ||
repository: https://github.com/socketry/async-pool | ||
tag: v${{package.version}} | ||
|
||
- runs: sed -i '/signing_key/d' ${{vars.gem}}.gemspec | ||
|
||
- uses: ruby/build | ||
with: | ||
gem: ${{vars.gem}} | ||
|
||
- uses: ruby/install | ||
with: | ||
gem: ${{vars.gem}} | ||
version: ${{package.version}} | ||
|
||
- uses: ruby/clean | ||
|
||
update: | ||
enabled: true | ||
github: | ||
identifier: socketry/async-pool | ||
strip-prefix: v | ||
use-tag: true | ||
|
||
test: | ||
environment: | ||
contents: | ||
packages: | ||
- ruby-${{vars.rubyMM}} | ||
- ruby${{vars.rubyMM}}-async | ||
pipeline: | ||
- runs: | | ||
ruby <<-EOF | ||
require 'async' | ||
require 'async/pool' | ||
require 'test/unit' | ||
include Test::Unit::Assertions | ||
class TestAsyncPool < Test::Unit::TestCase | ||
def test_pool_limit | ||
Async do | ||
pool = Async::Pool::Controller.new(limit: 2) | ||
tasks = [] | ||
3.times do | ||
tasks << pool.async { sleep(0.1) } # Simulate task work | ||
end | ||
# Ensure only 2 tasks run concurrently | ||
assert tasks.count { |task| task.running? } <= 2, "Expected limit of 2 concurrent tasks" | ||
puts "Pool limit test passed." | ||
end | ||
end | ||
end | ||
EOF | ||
var-transforms: | ||
- from: ${{package.name}} | ||
match: ^ruby(\d\.\d+)-.* | ||
replace: $1 | ||
to: rubyMM |
Oops, something went wrong.