Skip to content

Commit e0e73bb

Browse files
committed
Update native_gem.rake according to example of rake-compiler-dock.
https://github.com/rake-compiler/rake-compiler-dock#add-to-your-rakefile
1 parent 3c9d9e6 commit e0e73bb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tasks/native_gem.rake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ task 'gem:windows' => ['ports:cross'] do
55
require 'rake_compiler_dock'
66

77
# make sure to install our bundle
8-
build = ['bundle']
8+
sh "bundle package --all" # Avoid repeated downloads of gems by using gem files from the host.
99

1010
# and finally build the native gem
11-
build << 'rake cross native gem RUBY_CC_VERSION=2.7.0:2.6.0:2.5.0:2.4.0 CFLAGS="-Wall" MAKE="make -j`nproc`"'
12-
13-
RakeCompilerDock.sh build.join(' && ')
11+
GEM_PLATFORM_HOSTS.keys.each do |plat|
12+
RakeCompilerDock.sh "bundle --local && RUBY_CC_VERSION='2.7.0:2.6.0:2.5.0:2.4.0' CFLAGS='-Wall' MAKE='make -j`nproc`' rake native:#{plat} gem", platform: plat
13+
end
1414
end

0 commit comments

Comments
 (0)