Skip to content

Commit e6819d4

Browse files
committed
Building
* update dependencies * clean build scripts * single rake task to build all * clean extension placement, names
1 parent 986e020 commit e6819d4

39 files changed

+278
-443
lines changed

.gitignore

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
# Project
2-
Gemfile.lock
3-
.bundle
4-
tmp/*
5-
coverage
6-
pkg
2+
/Gemfile.lock
3+
/.bundle
4+
/tmp/*
5+
/coverage
6+
/pkg
77

88
# Yard documentation
9-
.yardoc
10-
yardoc
9+
/.yardoc
10+
/yardoc
1111

1212
# IDEs' files
1313
*.iml
1414
*.tmproj
1515
.idea
16-
tmtags
1716

1817
# Local Ruby settings
19-
.rspec-local
20-
.rvmrc
21-
.ruby-version
22-
.ruby-gemset
18+
/.rspec-local
19+
/.rvmrc
20+
/.ruby-version
21+
/.ruby-gemset
22+
/vendor
2323

2424
# junk
2525
.DS_Store
2626
.githubtoken
2727

2828
# Rspec created files
29-
spec/examples.txt
29+
/spec/examples.txt
3030

3131
# Compiled files
32-
lib/concurrent_ruby_ext.jar
33-
lib/concurrent/extension.so
34-
lib/concurrent/extension.bundle
32+
/lib/concurrent/concurrent_ruby.jar
33+
/lib/concurrent/**/concurrent_ruby_ext.*
34+
/lib/concurrent/concurrent_ruby_ext.*

BUILDING.md

Lines changed: 5 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,9 @@
11
# Building
22

3-
All published versions of this gem (core, extension, and several platform-specific packages) are compiled,
4-
packaged, tested, and published using an open, automated process.
5-
This process can also be used to create pre-compiled binaries of the extension gem for virtually
6-
any platform. *Documentation is forthcoming...*
7-
83
```
9-
*MRI only*
10-
bundle exec rake build:native # Build concurrent-ruby-ext-<version>-<platform>.gem into the pkg dir
11-
bundle exec rake compile:extension # Compile extension
12-
13-
*JRuby only*
14-
bundle exec rake build # Build JRuby-specific core gem (alias for `build:core`)
15-
bundle exec rake build:core # Build concurrent-ruby-<version>-java.gem into the pkg directory
16-
17-
*All except JRuby*
18-
bundle exec rake build:core # Build concurrent-ruby-<version>.gem into the pkg directory
19-
bundle exec rake build:ext # Build concurrent-ruby-ext-<version>.gem into the pkg directory
20-
21-
*When Docker IS installed*
22-
bundle exec rake build:windows # Build the windows binary <version> gems per rake-compiler-dock
23-
bundle exec rake build # Build core, extension, and edge gems, including Windows binaries
24-
25-
*When Docker is NOT installed*
26-
bundle exec rake build # Build core, extension, and edge gems (excluding Windows binaries)
27-
28-
*All*
29-
bundle exec rake clean # Remove any temporary products
30-
bundle exec rake clobber # Remove any generated file
31-
bundle exec rake compile # Compile all the extensions
4+
bundle exec rake clobber # clean
5+
bundle exec rake repackage # all 3 gems without windows builds
6+
bundle exec rake repackage:all # all 3 gems with the fat windows builds (requires docker)
327
```
338

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

Gemfile

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
source 'https://rubygems.org'
22

3-
gem 'concurrent-ruby', path: '.'
4-
gem 'concurrent-ruby-edge', path: '.'
5-
gem 'concurrent-ruby-ext', path: '.', platform: :mri
3+
require_relative 'lib/concurrent/version'
4+
5+
no_path = ENV['NO_PATH']
6+
options = no_path ? {} : { path: '.' }
7+
8+
gem 'concurrent-ruby', Concurrent::VERSION, options
9+
gem 'concurrent-ruby-edge', Concurrent::EDGE_VERSION, options
10+
gem 'concurrent-ruby-ext', Concurrent::VERSION, options.merge(platform: :mri)
611

712
group :development do
8-
gem 'rake', '~> 11.0'
9-
gem 'rake-compiler', '~> 1.0.0'
13+
gem 'rake', '~> 12.0'
14+
gem 'rake-compiler', '~> 1.0'
1015
gem 'rake-compiler-dock', '~> 0.6.0'
11-
gem 'gem-compiler', '~> 0.3.0'
12-
gem 'benchmark-ips', '~> 2.7'
16+
gem 'pry', '~> 0.11'
1317
end
1418

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

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

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

37-
group :benchmarks do
36+
group :benchmarks, optional: true do
37+
gem 'benchmark-ips', '~> 2.7'
3838
gem 'bench9000'
3939
end

0 commit comments

Comments
 (0)