Skip to content

Commit d94efe6

Browse files
authored
Merge pull request #567 from andyundso/update-dependencies
Update dependencies for Windows build and drop 32-bit support
2 parents bb1d8ae + 681301c commit d94efe6

File tree

8 files changed

+33
-33
lines changed

8 files changed

+33
-33
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ jobs:
1212
matrix:
1313
platform:
1414
- "x64-mingw32"
15-
- "x86-mingw32"
1615
- "x64-mingw-ucrt"
1716
name: cross-compile-windows
1817
runs-on: ubuntu-22.04
@@ -35,10 +34,10 @@ jobs:
3534
uses: actions/cache@v4
3635
with:
3736
path: ports
38-
key: cross-compiled-${{ hashFiles('**/.ports_versions') }}
37+
key: cross-compiled-v3-${{ matrix.platform }}-${{ hashFiles('**/.ports_versions') }}
3938
restore-keys: |
40-
cross-compiled-${{ hashFiles('**/.ports_versions') }}
41-
cross-compiled-v2-
39+
cross-compiled-v3-${{ matrix.platform }}-${{ hashFiles('**/.ports_versions') }}
40+
cross-compiled-v3-${{ matrix.platform }}-
4241
4342
- name: Build gem
4443
shell: bash
@@ -96,8 +95,11 @@ jobs:
9695
strategy:
9796
fail-fast: false
9897
matrix:
98+
force-encryption:
99+
- false
100+
- true
99101
mssql-version:
100-
#- 2017
102+
- 2017
101103
- 2019
102104
- 2022
103105
ruby-version:
@@ -138,12 +140,12 @@ jobs:
138140
Copy-Item -Path ".\tmp\tiny_tds-$gemVersion-$rubyArchitecture\ports" -Destination "." -Recurse
139141
140142
- name: Setup MSSQL
141-
uses: potatoqualitee/mssqlsuite@v1.7
143+
uses: rails-sqlserver/setup-mssql@v1
142144
with:
143-
install: sqlengine, sqlclient
145+
components: sqlcmd,sqlengine
144146
version: ${{ matrix.mssql-version }}
145147
sa-password: c0MplicatedP@ssword
146-
show-log: true
148+
force-encryption: ${{ matrix.force-encryption }}
147149

148150
- name: Setup MSSQL database
149151
shell: pwsh
@@ -217,8 +219,11 @@ jobs:
217219
strategy:
218220
fail-fast: false
219221
matrix:
222+
force-encryption:
223+
- false
224+
- true
220225
mssql-version:
221-
#- 2017
226+
- 2017
222227
- 2019
223228
- 2022
224229
ruby-version:
@@ -259,12 +264,12 @@ jobs:
259264
Copy-Item -Path ".\tmp\tiny_tds-$gemVersion-$rubyArchitecture\ports" -Destination "." -Recurse
260265
261266
- name: Setup MSSQL
262-
uses: potatoqualitee/mssqlsuite@v1.7
267+
uses: rails-sqlserver/setup-mssql@v1
263268
with:
264-
install: sqlengine, sqlclient
269+
components: sqlcmd,sqlengine
265270
version: ${{ matrix.mssql-version }}
266271
sa-password: c0MplicatedP@ssword
267-
show-log: true
272+
force-encryption: ${{ matrix.force-encryption }}
268273

269274
- name: Setup MSSQL database
270275
shell: pwsh
@@ -345,10 +350,10 @@ jobs:
345350
uses: actions/cache@v4
346351
with:
347352
path: ports
348-
key: native-v2-${{ hashFiles('**/.ports_versions') }}
353+
key: native-v3-${{ hashFiles('**/.ports_versions') }}
349354
restore-keys: |
350-
native-${{ hashFiles('* */.ports_versions') }}
351-
native-v2-
355+
native-v3-${{ hashFiles('* */.ports_versions') }}
356+
native-v3-
352357
353358
- name: Build required libraries
354359
run: |
@@ -388,20 +393,19 @@ jobs:
388393
uses: actions/cache@v4
389394
with:
390395
path: ports
391-
key: native-v2-${{ hashFiles('**/.ports_versions') }}
396+
key: native-v3-${{ hashFiles('**/.ports_versions') }}
392397
fail-on-cache-miss: true
393398

394399
- name: Build gem
395400
run: |
396401
bundle exec rake build
397402
398403
- name: Setup MSSQL
399-
uses: potatoqualitee/mssqlsuite@v1.7
404+
uses: rails-sqlserver/setup-mssql@v1
400405
with:
401-
install: sqlengine, sqlclient
406+
components: sqlcmd,sqlengine
402407
version: ${{ matrix.mssql-version }}
403408
sa-password: "c0MplicatedP@ssword"
404-
show-log: true
405409

406410
- name: Setup MSSQL database
407411
run: |

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
* Drop support for Ruby < 2.7
44
* Drop support for SQL Server < 2017
55
* Drop support for FreeTDS < 1.0
6+
* No longer provide a 32-bit Windows build
67
* Raise error if FreeTDS is unable to sent command buffer to the server
8+
* Use freetds v1.4.23, libiconv v1.17 and OpenSSL v3.4.0 for Windows builds
79

810
## 2.1.7
911
* Add Ruby 3.3 to the cross compile list

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ $ apt-get install wget
3434
$ apt-get install build-essential
3535
$ apt-get install libc6-dev
3636

37-
$ wget http://www.freetds.org/files/stable/freetds-1.4.10.tar.gz
38-
$ tar -xzf freetds-1.4.10.tar.gz
39-
$ cd freetds-1.4.10
37+
$ wget http://www.freetds.org/files/stable/freetds-1.4.23.tar.gz
38+
$ tar -xzf freetds-1.4.23.tar.gz
39+
$ cd freetds-1.4.23
4040
$ ./configure --prefix=/usr/local --with-tdsver=7.4
4141
$ make
4242
$ make install

Rakefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ ruby_cc_ucrt_versions = "3.3.0:3.2.0:3.1.0".freeze
1111
ruby_cc_mingw32_versions = "3.0.0:2.7.0".freeze
1212

1313
GEM_PLATFORM_HOSTS = {
14-
'x86-mingw32' => {
15-
host: 'i686-w64-mingw32',
16-
ruby_versions: ruby_cc_mingw32_versions
17-
},
1814
'x64-mingw32' => {
1915
host: 'x86_64-w64-mingw32',
2016
ruby_versions: ruby_cc_mingw32_versions

ext/tiny_tds/extconf.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ def do_help
2222

2323
# Make sure to check the ports path for the configured host
2424
architecture = RbConfig::CONFIG['arch']
25-
architecture = "x86-mingw32" if architecture == "i386-mingw32"
2625

2726
project_dir = File.expand_path("../../..", __FILE__)
2827
freetds_ports_dir = File.join(project_dir, 'ports', architecture, 'freetds', FREETDS_VERSION)

ext/tiny_tds/extconsts.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

2-
ICONV_VERSION = ENV['TINYTDS_ICONV_VERSION'] || "1.15"
2+
ICONV_VERSION = ENV['TINYTDS_ICONV_VERSION'] || "1.17"
33
ICONV_SOURCE_URI = "http://ftp.gnu.org/pub/gnu/libiconv/libiconv-#{ICONV_VERSION}.tar.gz"
44

5-
OPENSSL_VERSION = ENV['TINYTDS_OPENSSL_VERSION'] || '1.1.1s'
5+
OPENSSL_VERSION = ENV['TINYTDS_OPENSSL_VERSION'] || '3.4.0'
66
OPENSSL_SOURCE_URI = "https://www.openssl.org/source/openssl-#{OPENSSL_VERSION}.tar.gz"
77

8-
FREETDS_VERSION = ENV['TINYTDS_FREETDS_VERSION'] || '1.1.24'
8+
FREETDS_VERSION = ENV['TINYTDS_FREETDS_VERSION'] || '1.4.23'
99
FREETDS_SOURCE_URI = "http://www.freetds.org/files/stable/freetds-#{FREETDS_VERSION}.tar.bz2"

tasks/ports.rake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ namespace :ports do
4848
if libraries_to_compile[:openssl]
4949
# freetds doesn't have an option that will provide an rpath
5050
# so we do it manually
51-
ENV['OPENSSL_CFLAGS'] = "-Wl,-rpath -Wl,#{libraries_to_compile[:openssl].path}/lib"
51+
ENV['OPENSSL_CFLAGS'] = "-Wl,-rpath -Wl,#{libraries_to_compile[:openssl].path}/lib64"
5252
# Add the pkgconfig file with MSYS2'ish path, to prefer our ports build
5353
# over MSYS2 system OpenSSL.
54-
ENV['PKG_CONFIG_PATH'] = "#{libraries_to_compile[:openssl].path.gsub(/^(\w):/i) { "/" + $1.downcase }}/lib/pkgconfig:#{ENV['PKG_CONFIG_PATH']}"
54+
ENV['PKG_CONFIG_PATH'] = "#{libraries_to_compile[:openssl].path.gsub(/^(\w):/i) { "/" + $1.downcase }}/lib64/pkgconfig:#{ENV['PKG_CONFIG_PATH']}"
5555
libraries_to_compile[:freetds].configure_options << "--with-openssl=#{libraries_to_compile[:openssl].path}"
5656
end
5757

test/gem_test.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ class GemTest < MiniTest::Spec
158158
{
159159
'x64-mingw-ucrt' => 'x64-mingw-ucrt',
160160
'x64-mingw32' => 'x64-mingw32',
161-
'x86-mingw32' => 'x86-mingw32',
162161
'x86_64-linux' => 'x86_64-linux',
163162
}.each do |host,expected|
164163
describe "on a #{host} architecture" do

0 commit comments

Comments
 (0)