Skip to content

Commit b87a8c0

Browse files
Build and publish ruby-wasm-wasi on CI
The CI job was accidentally removed while I was working on the RubyGems support.
1 parent 9770bbe commit b87a8c0

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Rakefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ NPM_PACKAGES = [
4141
ruby_version: "3.2",
4242
gemfile: "packages/npm-packages/ruby-wasm-wasi/Gemfile",
4343
target: "wasm32-unknown-wasi"
44+
},
45+
{
46+
name: "ruby-wasm-wasi",
47+
target: "wasm32-unknown-wasi"
4448
}
4549
]
4650

rakelib/packaging.rake

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ tools = {
66
}
77

88
def npm_pkg_build_command(pkg)
9+
# Skip if the package does not require building ruby
10+
return nil unless pkg[:ruby_version] && pkg[:target]
911
[
1012
"bundle",
1113
"exec",
@@ -22,6 +24,7 @@ end
2224

2325
def npm_pkg_rubies_cache_key(pkg)
2426
build_command = npm_pkg_build_command(pkg)
27+
return nil unless build_command
2528
require "open3"
2629
cmd = build_command + ["--print-ruby-cache-key"]
2730
stdout, status = Open3.capture2(*cmd)
@@ -38,10 +41,13 @@ namespace :npm do
3841
pkg_dir = "#{Dir.pwd}/packages/npm-packages/#{pkg[:name]}"
3942

4043
namespace pkg[:name] do
41-
build_command = npm_pkg_build_command(pkg)
4244

4345
desc "Build ruby for npm package #{pkg[:name]}"
4446
task "ruby" do
47+
build_command = npm_pkg_build_command(pkg)
48+
# Skip if the package does not require building ruby
49+
next unless build_command
50+
4551
env = {
4652
# Share ./build and ./rubies in the same workspace
4753
"RUBY_WASM_ROOT" => base_dir

0 commit comments

Comments
 (0)