diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7539edc..cd0c8a29 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,6 @@ jobs: matrix: platform: - "x64-mingw32" - - "x86-mingw32" - "x64-mingw-ucrt" name: cross-compile-windows runs-on: ubuntu-22.04 @@ -35,10 +34,10 @@ jobs: uses: actions/cache@v4 with: path: ports - key: cross-compiled-${{ hashFiles('**/.ports_versions') }} + key: cross-compiled-v3-${{ matrix.platform }}-${{ hashFiles('**/.ports_versions') }} restore-keys: | - cross-compiled-${{ hashFiles('**/.ports_versions') }} - cross-compiled-v2- + cross-compiled-v3-${{ matrix.platform }}-${{ hashFiles('**/.ports_versions') }} + cross-compiled-v3-${{ matrix.platform }}- - name: Build gem shell: bash @@ -96,8 +95,11 @@ jobs: strategy: fail-fast: false matrix: + force-encryption: + - false + - true mssql-version: - #- 2017 + - 2017 - 2019 - 2022 ruby-version: @@ -138,12 +140,12 @@ jobs: Copy-Item -Path ".\tmp\tiny_tds-$gemVersion-$rubyArchitecture\ports" -Destination "." -Recurse - name: Setup MSSQL - uses: potatoqualitee/mssqlsuite@v1.7 + uses: rails-sqlserver/setup-mssql@v1 with: - install: sqlengine, sqlclient + components: sqlcmd,sqlengine version: ${{ matrix.mssql-version }} sa-password: c0MplicatedP@ssword - show-log: true + force-encryption: ${{ matrix.force-encryption }} - name: Setup MSSQL database shell: pwsh @@ -217,8 +219,11 @@ jobs: strategy: fail-fast: false matrix: + force-encryption: + - false + - true mssql-version: - #- 2017 + - 2017 - 2019 - 2022 ruby-version: @@ -259,12 +264,12 @@ jobs: Copy-Item -Path ".\tmp\tiny_tds-$gemVersion-$rubyArchitecture\ports" -Destination "." -Recurse - name: Setup MSSQL - uses: potatoqualitee/mssqlsuite@v1.7 + uses: rails-sqlserver/setup-mssql@v1 with: - install: sqlengine, sqlclient + components: sqlcmd,sqlengine version: ${{ matrix.mssql-version }} sa-password: c0MplicatedP@ssword - show-log: true + force-encryption: ${{ matrix.force-encryption }} - name: Setup MSSQL database shell: pwsh @@ -345,10 +350,10 @@ jobs: uses: actions/cache@v4 with: path: ports - key: native-v2-${{ hashFiles('**/.ports_versions') }} + key: native-v3-${{ hashFiles('**/.ports_versions') }} restore-keys: | - native-${{ hashFiles('* */.ports_versions') }} - native-v2- + native-v3-${{ hashFiles('* */.ports_versions') }} + native-v3- - name: Build required libraries run: | @@ -388,7 +393,7 @@ jobs: uses: actions/cache@v4 with: path: ports - key: native-v2-${{ hashFiles('**/.ports_versions') }} + key: native-v3-${{ hashFiles('**/.ports_versions') }} fail-on-cache-miss: true - name: Build gem @@ -396,12 +401,11 @@ jobs: bundle exec rake build - name: Setup MSSQL - uses: potatoqualitee/mssqlsuite@v1.7 + uses: rails-sqlserver/setup-mssql@v1 with: - install: sqlengine, sqlclient + components: sqlcmd,sqlengine version: ${{ matrix.mssql-version }} sa-password: "c0MplicatedP@ssword" - show-log: true - name: Setup MSSQL database run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c7e7ab5..14efc701 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,9 @@ * Drop support for Ruby < 2.7 * Drop support for SQL Server < 2017 * Drop support for FreeTDS < 1.0 +* No longer provide a 32-bit Windows build * Raise error if FreeTDS is unable to sent command buffer to the server +* Use freetds v1.4.23, libiconv v1.17 and OpenSSL v3.4.0 for Windows builds ## 2.1.7 * Add Ruby 3.3 to the cross compile list diff --git a/README.md b/README.md index 4aa68e69..de93787e 100644 --- a/README.md +++ b/README.md @@ -34,9 +34,9 @@ $ apt-get install wget $ apt-get install build-essential $ apt-get install libc6-dev -$ wget http://www.freetds.org/files/stable/freetds-1.4.10.tar.gz -$ tar -xzf freetds-1.4.10.tar.gz -$ cd freetds-1.4.10 +$ wget http://www.freetds.org/files/stable/freetds-1.4.23.tar.gz +$ tar -xzf freetds-1.4.23.tar.gz +$ cd freetds-1.4.23 $ ./configure --prefix=/usr/local --with-tdsver=7.4 $ make $ make install diff --git a/Rakefile b/Rakefile index be8c60e6..f7580918 100644 --- a/Rakefile +++ b/Rakefile @@ -11,10 +11,6 @@ ruby_cc_ucrt_versions = "3.3.0:3.2.0:3.1.0".freeze ruby_cc_mingw32_versions = "3.0.0:2.7.0".freeze GEM_PLATFORM_HOSTS = { - 'x86-mingw32' => { - host: 'i686-w64-mingw32', - ruby_versions: ruby_cc_mingw32_versions - }, 'x64-mingw32' => { host: 'x86_64-w64-mingw32', ruby_versions: ruby_cc_mingw32_versions diff --git a/ext/tiny_tds/extconf.rb b/ext/tiny_tds/extconf.rb index b1beabc4..d0691792 100644 --- a/ext/tiny_tds/extconf.rb +++ b/ext/tiny_tds/extconf.rb @@ -22,7 +22,6 @@ def do_help # Make sure to check the ports path for the configured host architecture = RbConfig::CONFIG['arch'] -architecture = "x86-mingw32" if architecture == "i386-mingw32" project_dir = File.expand_path("../../..", __FILE__) freetds_ports_dir = File.join(project_dir, 'ports', architecture, 'freetds', FREETDS_VERSION) diff --git a/ext/tiny_tds/extconsts.rb b/ext/tiny_tds/extconsts.rb index 0a362fa6..64af1704 100644 --- a/ext/tiny_tds/extconsts.rb +++ b/ext/tiny_tds/extconsts.rb @@ -1,9 +1,9 @@ -ICONV_VERSION = ENV['TINYTDS_ICONV_VERSION'] || "1.15" +ICONV_VERSION = ENV['TINYTDS_ICONV_VERSION'] || "1.17" ICONV_SOURCE_URI = "http://ftp.gnu.org/pub/gnu/libiconv/libiconv-#{ICONV_VERSION}.tar.gz" -OPENSSL_VERSION = ENV['TINYTDS_OPENSSL_VERSION'] || '1.1.1s' +OPENSSL_VERSION = ENV['TINYTDS_OPENSSL_VERSION'] || '3.4.0' OPENSSL_SOURCE_URI = "https://www.openssl.org/source/openssl-#{OPENSSL_VERSION}.tar.gz" -FREETDS_VERSION = ENV['TINYTDS_FREETDS_VERSION'] || '1.1.24' +FREETDS_VERSION = ENV['TINYTDS_FREETDS_VERSION'] || '1.4.23' FREETDS_SOURCE_URI = "http://www.freetds.org/files/stable/freetds-#{FREETDS_VERSION}.tar.bz2" diff --git a/tasks/ports.rake b/tasks/ports.rake index 451267f7..1ab6bf96 100644 --- a/tasks/ports.rake +++ b/tasks/ports.rake @@ -48,10 +48,10 @@ namespace :ports do if libraries_to_compile[:openssl] # freetds doesn't have an option that will provide an rpath # so we do it manually - ENV['OPENSSL_CFLAGS'] = "-Wl,-rpath -Wl,#{libraries_to_compile[:openssl].path}/lib" + ENV['OPENSSL_CFLAGS'] = "-Wl,-rpath -Wl,#{libraries_to_compile[:openssl].path}/lib64" # Add the pkgconfig file with MSYS2'ish path, to prefer our ports build # over MSYS2 system OpenSSL. - ENV['PKG_CONFIG_PATH'] = "#{libraries_to_compile[:openssl].path.gsub(/^(\w):/i) { "/" + $1.downcase }}/lib/pkgconfig:#{ENV['PKG_CONFIG_PATH']}" + ENV['PKG_CONFIG_PATH'] = "#{libraries_to_compile[:openssl].path.gsub(/^(\w):/i) { "/" + $1.downcase }}/lib64/pkgconfig:#{ENV['PKG_CONFIG_PATH']}" libraries_to_compile[:freetds].configure_options << "--with-openssl=#{libraries_to_compile[:openssl].path}" end diff --git a/test/gem_test.rb b/test/gem_test.rb index 48b7a631..b05a8edc 100644 --- a/test/gem_test.rb +++ b/test/gem_test.rb @@ -158,7 +158,6 @@ class GemTest < MiniTest::Spec { 'x64-mingw-ucrt' => 'x64-mingw-ucrt', 'x64-mingw32' => 'x64-mingw32', - 'x86-mingw32' => 'x86-mingw32', 'x86_64-linux' => 'x86_64-linux', }.each do |host,expected| describe "on a #{host} architecture" do