Skip to content

Commit

Permalink
ci: ensure we call the cross_compiling block for linux native gem
Browse files Browse the repository at this point in the history
and comment the two places we now have this code with the original
github issue rake-compiler/rake-compiler#171

[skip ci]
  • Loading branch information
flavorjones committed Mar 31, 2020
1 parent 5719161 commit cebf400
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions concourse/tasks/gem-test/gem-build.sh
Expand Up @@ -27,6 +27,12 @@ cp -f ../ci/tasks/set-version-to-timestamp.rb tasks/set-version-to-timestamp.rb
bundle exec rake -f tasks/set-version-to-timestamp.rb set-version-to-timestamp

if [ -n "${BUILD_NATIVE_GEM:-}" ] ; then
# TODO remove after https://github.com/rake-compiler/rake-compiler/pull/171 is shipped
find /usr/local/rvm/gems -name extensiontask.rb | while read f ; do
echo "rewriting $f"
sudo sed -i 's/callback.call(spec) if callback/@cross_compiling.call(spec) if @cross_compiling/' $f
done

bundle exec rake gem:x86_64-linux:guest
else
# TODO we're only compiling so that we retrieve libxml2/libxslt
Expand Down
1 change: 1 addition & 0 deletions tasks/cross-ruby.rb
Expand Up @@ -165,6 +165,7 @@ def verify_dll(dll, cross_ruby)

desc "build native gem for #{plat} platform\nthis trampolines into the rake-compiler-dock guest"
task plat do
# TODO remove `find` after https://github.com/rake-compiler/rake-compiler/pull/171 is shipped
RakeCompilerDock.sh <<-EOT, platform: plat
gem install bundler --no-document &&
bundle &&
Expand Down

0 comments on commit cebf400

Please sign in to comment.