diff --git a/.circleci/config.yml b/.circleci/config.yml index eaf03ccd..041848a6 100755 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -112,7 +112,7 @@ jobs: command: | $Env:PATH = "C:\\Ruby<< parameters.ruby_version >>-x64\\bin;$Env:PATH" ridk install 2 - gem install bundler + gem install bundler -v 2.3.26 - checkout @@ -173,6 +173,7 @@ workflows: - '2.5' - '2.6' - '2.7' + - '3.0' - test_windows: matrix: @@ -181,3 +182,4 @@ workflows: - '2.5' - '2.6' - '2.7' + - '3.0' diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a063108..8b2aaac0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## (unreleased) +* Add Ruby 3.0 to the cross compile list. + ## 2.1.5 * Fix compilation errors for Amazon Linux 1. Fixes #495. diff --git a/Gemfile b/Gemfile index 313a64f0..851fabc2 100644 --- a/Gemfile +++ b/Gemfile @@ -1,9 +1,2 @@ source 'https://rubygems.org' gemspec - -group :development do -end - -group :test do - gem 'minitest' -end diff --git a/Rakefile b/Rakefile index 3150afdc..c3de60ee 100644 --- a/Rakefile +++ b/Rakefile @@ -10,6 +10,7 @@ GEM_PLATFORM_HOSTS = { 'x86-mingw32' => 'i686-w64-mingw32', 'x64-mingw32' => 'x86_64-w64-mingw32' } +RUBY_CC_VERSION='3.0.0:2.7.0:2.6.0:2.5.0:2.4.0'.freeze # Add our project specific files to clean for a rebuild CLEAN.include FileList["{ext,lib}/**/*.{so,#{RbConfig::CONFIG['DLEXT']},o}"], diff --git a/ext/tiny_tds/extconsts.rb b/ext/tiny_tds/extconsts.rb index 1e1c1bf2..f3c5e249 100644 --- a/ext/tiny_tds/extconsts.rb +++ b/ext/tiny_tds/extconsts.rb @@ -2,7 +2,7 @@ ICONV_VERSION = ENV['TINYTDS_ICONV_VERSION'] || "1.15" ICONV_SOURCE_URI = "http://ftp.gnu.org/pub/gnu/libiconv/libiconv-#{ICONV_VERSION}.tar.gz" -OPENSSL_VERSION = ENV['TINYTDS_OPENSSL_VERSION'] || '1.1.1d' +OPENSSL_VERSION = ENV['TINYTDS_OPENSSL_VERSION'] || '1.1.1s' OPENSSL_SOURCE_URI = "https://www.openssl.org/source/openssl-#{OPENSSL_VERSION}.tar.gz" FREETDS_VERSION = ENV['TINYTDS_FREETDS_VERSION'] || "1.1.24" diff --git a/tasks/native_gem.rake b/tasks/native_gem.rake index d19cdb85..353c238b 100644 --- a/tasks/native_gem.rake +++ b/tasks/native_gem.rake @@ -5,10 +5,10 @@ task 'gem:windows' => ['ports:cross'] do require 'rake_compiler_dock' # make sure to install our bundle - build = ['bundle'] + sh "bundle package --all" # Avoid repeated downloads of gems by using gem files from the host. # and finally build the native gem - build << 'rake cross native gem RUBY_CC_VERSION=2.7.0:2.6.0:2.5.0:2.4.0 CFLAGS="-Wall" MAKE="make -j`nproc`"' - - RakeCompilerDock.sh build.join(' && ') + GEM_PLATFORM_HOSTS.keys.each do |plat| + RakeCompilerDock.sh "bundle --local && RUBY_CC_VERSION=#{RUBY_CC_VERSION} CFLAGS='-Wall' MAKE='make -j`nproc`' rake native:#{plat} gem", platform: plat + end end diff --git a/tasks/ports.rake b/tasks/ports.rake index 86ee1e91..866891f7 100644 --- a/tasks/ports.rake +++ b/tasks/ports.rake @@ -75,7 +75,7 @@ namespace :ports do GEM_PLATFORM_HOSTS.each do |gem_platform, host| # make sure to install our bundle build = ['bundle'] - build << "rake ports:compile[#{host}] MAKE='make -j`nproc`'" + build << "RUBY_CC_VERSION=#{RUBY_CC_VERSION} rake ports:compile[#{host}] MAKE='make -j`nproc`'" RakeCompilerDock.sh build.join(' && '), platform: gem_platform end end