Skip to content

Commit

Permalink
tremendously sure this needs fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
gjtorikian committed Feb 7, 2023
1 parent 0bed113 commit 3d14d7a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 33 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/generic-build-and-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ jobs:
generic-package:
name: "generic-package"
runs-on: ubuntu-latest
strategy:
# fail-fast: false
matrix:
platform:
- x86_64-linux

steps:
- uses: actions/checkout@v3
Expand All @@ -31,10 +36,11 @@ jobs:
- uses: oxidize-rb/actions/cross-gem@v1
id: cross-gem
with:
platform: x86_64-linux
platform: ${{ matrix.platform }}
ruby-versions: "3.1, 3.2" # SUPPORTED_RUBY_VERSIONS

- run: ./script/test-gem-build gems ruby
- name: "Test gem build"
run: ./script/test-gem-build gems ruby

- uses: actions/upload-artifact@v3
with:
Expand Down
23 changes: 5 additions & 18 deletions rakelib/extension.rake
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,14 @@ namespace "gem" do
CROSS_RUBIES.find_all { |cr| cr.windows? || cr.linux? || cr.darwin? }.map(&:platform).uniq.each do |platform|
desc "build native gem for #{platform} platform"
task platform do
puts "Invoking RakeCompilerDock for #{platform} ..."
require "rake_compiler_dock"
RakeCompilerDock.sh(<<~EOT, verbose: true)
gem update --system 3.3.22 --no-document &&
bundle
EOT
args = ["--platform", platform, "--ruby-versions", "3.2", "--build"]
puts "Invoking rb-sys-dock with args: #{args.join(" ")}"
stdout, stderr, status = Open3.capture3("rb-sys-dock", *args)
puts stdout
puts stderr unless status.success?
rescue => e
warn(e.message)
end

namespace platform do
desc "build native gem for #{platform} platform (guest container)"
task "builder" do
puts "Invoking native:#{platform} ..."
# use Task#invoke because the pkg/*gem task is defined at runtime
Rake::Task["native:#{platform}"].invoke
puts "Invoking #{"pkg/#{COMMONMARKER_SPEC.full_name}-#{Gem::Platform.new(platform)}.gem"} ..."

Rake::Task["pkg/#{COMMONMARKER_SPEC.full_name}-#{Gem::Platform.new(platform)}.gem"].invoke
end
end
end

desc "build native gems for windows"
Expand Down
13 changes: 0 additions & 13 deletions script/test-gem-build
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,6 @@ gem update --system --no-document
ruby --version
bundler -v

export BUNDLE_WITHOUT=lint:benchmark:debug:test
bundle

bundle exec rake set-version-to-timestamp

if [[ "${BUILD_NATIVE_GEM}" == "ruby" ]] ; then
echo "Building ruby gem..."
bundle exec rake gem
else
echo "Building native gem..."
bundle exec rake gem:${BUILD_NATIVE_GEM}
fi

gem install minitest
gem install minitest-reporters
./script/test-gem-file-contents pkg/commonmarker*.gem
Expand Down

0 comments on commit 3d14d7a

Please sign in to comment.