Skip to content
Permalink
Browse files

Building

* update dependencies
* clean build scripts
* single rake task to build all
* clean extension placement, names
  • Loading branch information...
pitr-ch committed Jul 16, 2018
1 parent 986e020 commit e6819d4b37e8f40c7494f7d387bbcec354178099
Showing with 278 additions and 443 deletions.
  1. +16 −16 .gitignore
  2. +5 −35 BUILDING.md
  3. +19 −19 Gemfile
  4. +86 −215 Rakefile
  5. +2 −2 concurrent-ruby-edge.gemspec
  6. +3 −3 concurrent-ruby-ext.gemspec
  7. +6 −3 concurrent-ruby.gemspec
  8. 0 ext/{concurrent → concurrent-ruby-ext}/atomic_boolean.c
  9. 0 ext/{concurrent → concurrent-ruby-ext}/atomic_boolean.h
  10. 0 ext/{concurrent → concurrent-ruby-ext}/atomic_fixnum.c
  11. 0 ext/{concurrent → concurrent-ruby-ext}/atomic_fixnum.h
  12. 0 ext/{concurrent → concurrent-ruby-ext}/atomic_reference.c
  13. 0 ext/{concurrent → concurrent-ruby-ext}/atomic_reference.h
  14. +22 −0 ext/concurrent-ruby-ext/extconf.rb
  15. +1 −1 ext/{concurrent → concurrent-ruby-ext}/rb_concurrent.c
  16. 0 ext/{concurrent → concurrent-ruby-ext}/ruby_193_compatible.h
  17. +4 −3 ext/{ConcurrentRubyExtService.java → concurrent-ruby/ConcurrentRubyService.java}
  18. 0 ext/{ → concurrent-ruby}/com/concurrent_ruby/ext/AtomicReferenceLibrary.java
  19. 0 ext/{ → concurrent-ruby}/com/concurrent_ruby/ext/JRubyMapBackendLibrary.java
  20. +5 −4 ext/{ → concurrent-ruby}/com/concurrent_ruby/ext/JavaAtomicBooleanLibrary.java
  21. 0 ext/{ → concurrent-ruby}/com/concurrent_ruby/ext/JavaAtomicFixnumLibrary.java
  22. 0 ext/{ → concurrent-ruby}/com/concurrent_ruby/ext/JavaSemaphoreLibrary.java
  23. 0 ext/{ → concurrent-ruby}/com/concurrent_ruby/ext/SynchronizationLibrary.java
  24. 0 ext/{ → concurrent-ruby}/com/concurrent_ruby/ext/jsr166e/ConcurrentHashMap.java
  25. 0 ext/{ → concurrent-ruby}/com/concurrent_ruby/ext/jsr166e/ConcurrentHashMapV8.java
  26. 0 ext/{ → concurrent-ruby}/com/concurrent_ruby/ext/jsr166e/LongAdder.java
  27. 0 ext/{ → concurrent-ruby}/com/concurrent_ruby/ext/jsr166e/Striped64.java
  28. 0 ext/{ → concurrent-ruby}/com/concurrent_ruby/ext/jsr166e/nounsafe/ConcurrentHashMapV8.java
  29. 0 ext/{ → concurrent-ruby}/com/concurrent_ruby/ext/jsr166e/nounsafe/LongAdder.java
  30. 0 ext/{ → concurrent-ruby}/com/concurrent_ruby/ext/jsr166e/nounsafe/Striped64.java
  31. 0 ext/{ → concurrent-ruby}/com/concurrent_ruby/ext/jsr166y/ThreadLocalRandom.java
  32. +0 −51 ext/concurrent/extconf.rb
  33. +1 −1 lib/concurrent/atomic/cyclic_barrier.rb
  34. +30 −32 lib/concurrent/utility/native_extension_loader.rb
  35. +1 −1 spec/concurrent/synchronization_spec.rb
  36. +15 −1 spec/spec_helper.rb
  37. +14 −0 support/cross_building.sh
  38. +36 −47 support/release.sh
  39. +12 −9 support/yard_full_types.rb
@@ -1,34 +1,34 @@
# Project
Gemfile.lock
.bundle
tmp/*
coverage
pkg
/Gemfile.lock
/.bundle
/tmp/*
/coverage
/pkg

# Yard documentation
.yardoc
yardoc
/.yardoc
/yardoc

# IDEs' files
*.iml
*.tmproj
.idea
tmtags

# Local Ruby settings
.rspec-local
.rvmrc
.ruby-version
.ruby-gemset
/.rspec-local
/.rvmrc
/.ruby-version
/.ruby-gemset
/vendor

# junk
.DS_Store
.githubtoken

# Rspec created files
spec/examples.txt
/spec/examples.txt

# Compiled files
lib/concurrent_ruby_ext.jar
lib/concurrent/extension.so
lib/concurrent/extension.bundle
/lib/concurrent/concurrent_ruby.jar
/lib/concurrent/**/concurrent_ruby_ext.*
/lib/concurrent/concurrent_ruby_ext.*
@@ -1,34 +1,9 @@
# Building

All published versions of this gem (core, extension, and several platform-specific packages) are compiled,
packaged, tested, and published using an open, automated process.
This process can also be used to create pre-compiled binaries of the extension gem for virtually
any platform. *Documentation is forthcoming...*

```
*MRI only*
bundle exec rake build:native # Build concurrent-ruby-ext-<version>-<platform>.gem into the pkg dir
bundle exec rake compile:extension # Compile extension
*JRuby only*
bundle exec rake build # Build JRuby-specific core gem (alias for `build:core`)
bundle exec rake build:core # Build concurrent-ruby-<version>-java.gem into the pkg directory
*All except JRuby*
bundle exec rake build:core # Build concurrent-ruby-<version>.gem into the pkg directory
bundle exec rake build:ext # Build concurrent-ruby-ext-<version>.gem into the pkg directory
*When Docker IS installed*
bundle exec rake build:windows # Build the windows binary <version> gems per rake-compiler-dock
bundle exec rake build # Build core, extension, and edge gems, including Windows binaries
*When Docker is NOT installed*
bundle exec rake build # Build core, extension, and edge gems (excluding Windows binaries)
*All*
bundle exec rake clean # Remove any temporary products
bundle exec rake clobber # Remove any generated file
bundle exec rake compile # Compile all the extensions
bundle exec rake clobber # clean
bundle exec rake repackage # all 3 gems without windows builds
bundle exec rake repackage:all # all 3 gems with the fat windows builds (requires docker)
```

## Publishing the Gem
@@ -38,13 +13,8 @@ To create the build you'll need to have both MRI and JRuby installed and configu
* Update`version.rb`
* Update the CHANGELOG
* Switch to MRI
- Make sure docker is running (otherwise the windows build task will not be available)
- Run `bundle exec rake clean` to get rid of old artifacts
- Run `bundle exec rake build` to build core, ext, ext-windows, and edge into the *pkg* directory
* Switch to JRuby
- Delete *Gemfile.lock* and run `bundle install` (this isn't always necessary, but our multi-gem setup sometimes confuses bundler)
- Run `bundle exec rake clean` to get rid of old artifacts
- Run `bundle exec rake build` to build core-java into the *pkg* directory
- Run `bundle exec rake clobber` to get rid of old artifacts
- Run `bundle exec rake repackage:all` to build core, ext, ext-windows, and edge into the *pkg* directory
* If everything looks good, update git
- Commit the changes
- Tag the master branch with the version number
38 Gemfile
@@ -1,24 +1,25 @@
source 'https://rubygems.org'

gem 'concurrent-ruby', path: '.'
gem 'concurrent-ruby-edge', path: '.'
gem 'concurrent-ruby-ext', path: '.', platform: :mri
require_relative 'lib/concurrent/version'

no_path = ENV['NO_PATH']
options = no_path ? {} : { path: '.' }

gem 'concurrent-ruby', Concurrent::VERSION, options
gem 'concurrent-ruby-edge', Concurrent::EDGE_VERSION, options
gem 'concurrent-ruby-ext', Concurrent::VERSION, options.merge(platform: :mri)

group :development do
gem 'rake', '~> 11.0'
gem 'rake-compiler', '~> 1.0.0'
gem 'rake', '~> 12.0'
gem 'rake-compiler', '~> 1.0'
gem 'rake-compiler-dock', '~> 0.6.0'
gem 'gem-compiler', '~> 0.3.0'
gem 'benchmark-ips', '~> 2.7'
gem 'pry', '~> 0.11'
end

group :documentation do
gem 'countloc', '~> 0.4.0', :platforms => :mri, :require => false
# TODO (pitr-ch 04-May-2018): update to remove: [DEPRECATION] `last_comment` is deprecated. Please use `last_description` instead.
gem 'yard', '~> 0.8.0', :require => false
gem 'redcarpet', '~> 3.3', platforms: :mri # understands github markdown
group :documentation, optional: true do
gem 'yard', '~> 0.9.0', :require => false
gem 'redcarpet', '~> 3.0', platforms: :mri # understands github markdown
gem 'md-ruby-eval'
gem 'pry' # needed by md-ruby-eval
end

group :testing do
@@ -27,13 +28,12 @@ group :testing do
end

# made opt-in since it will not install on jruby 1.7
if ENV['COVERAGE']
group :coverage do
gem 'simplecov', '~> 0.10.0', :require => false
gem 'coveralls', '~> 0.8.2', :require => false
end
group :coverage, optional: !ENV['COVERAGE'] do
gem 'simplecov', '~> 0.10.0', :require => false
gem 'coveralls', '~> 0.8.2', :require => false
end

group :benchmarks do
group :benchmarks, optional: true do
gem 'benchmark-ips', '~> 2.7'
gem 'bench9000'
end
Oops, something went wrong.

0 comments on commit e6819d4

Please sign in to comment.
You can’t perform that action at this time.