-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
c42210e
commit 43b6a02
Showing
13 changed files
with
11 additions
and
675 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -47,3 +47,5 @@ actual.txt | |
test.txt | ||
test/progit | ||
test/benchinput.md | ||
|
||
*.orig |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,6 +1,4 @@ | ||
require "mkmf" | ||
require "rb_sys/mkmf" | ||
|
||
require_relative "_util" | ||
|
||
create_rust_makefile("selma/selma") |
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 |
---|---|---|
@@ -1,69 +1,15 @@ | ||
# frozen_string_literal: true | ||
|
||
require "rake/extensiontask" | ||
require "rb_sys/extensiontask" | ||
|
||
require_relative "extension/cross_rubies" | ||
|
||
Rake::ExtensionTask.new("selma", SELMA_SPEC) do |ext| | ||
ext.source_pattern = "*.{rs,toml}" | ||
|
||
ext.lib_dir = File.join("lib", "selma") | ||
|
||
ext.cross_compile = true | ||
ext.cross_platform = CROSS_PLATFORMS | ||
|
||
ext.config_script = ENV["ALTERNATE_CONFIG_SCRIPT"] || "extconf.rb" | ||
|
||
# remove things not needed for precompiled gems | ||
ext.cross_compiling do |spec| | ||
spec.files.reject! { |file| File.fnmatch?("*.tar.gz", file) } | ||
spec.dependencies.reject! { |dep| dep.name == "rb-sys" } | ||
end | ||
RbSys::ExtensionTask.new("commonmarker", SELMA_SPEC) do |ext| | ||
ext.lib_dir = File.join("lib", "commonmarker") | ||
end | ||
|
||
task :setup do # rubocop:disable Rake/Desc | ||
require "rake_compiler_dock" | ||
RakeCompilerDock.sh(<<~EOT, verbose: true) | ||
gem update --system 3.3.22 && | ||
bundle | ||
EOT | ||
rescue => e | ||
warn(e.message) | ||
desc "Build native extension for a given platform (i.e. `rake 'native[x86_64-linux]'`)" | ||
task :native, [:platform] do |_t, platform:| | ||
sh "bundle", "exec", "rb-sys-dock", "--platform", platform, "--build" | ||
end | ||
|
||
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 && | ||
bundle | ||
EOT | ||
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/#{SELMA_SPEC.full_name}-#{Gem::Platform.new(platform)}.gem"} ..." | ||
|
||
Rake::Task["pkg/#{SELMA_SPEC.full_name}-#{Gem::Platform.new(platform)}.gem"].invoke | ||
end | ||
end | ||
end | ||
|
||
desc "build native gems for windows" | ||
multitask "windows" => CROSS_RUBIES.find_all(&:windows?).map(&:platform).uniq | ||
|
||
desc "build native gems for linux" | ||
multitask "linux" => CROSS_RUBIES.find_all(&:linux?).map(&:platform).uniq | ||
|
||
desc "build native gems for darwin" | ||
multitask "darwin" => CROSS_RUBIES.find_all(&:darwin?).map(&:platform).uniq | ||
end | ||
desc "Compile and build native extension for a given platform (i.e. `rake 'native[x86_64-linux]'`)" | ||
task build: :compile |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/sh | ||
|
||
CHANGELOG_GITHUB_TOKEN="$GITHUB_TOKEN" bundle exec github_changelog_generator -u gjtorikian -p selma | ||
bundle exec github_changelog_generator -u gjtorikian -p selma --token $GITHUB_TOKEN |
Oops, something went wrong.