Skip to content

Commit 720900d

Browse files
authored
Merge pull request #682 from larskanis/ruby-4.0
Update to ruby-4.0
2 parents 2acaf3d + f605b59 commit 720900d

6 files changed

Lines changed: 13 additions & 17 deletions

File tree

.github/workflows/binary-gems.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,14 @@ jobs:
2020
rcd_build:
2121
name: Build
2222
runs-on: ubuntu-latest
23-
env:
24-
RCD_IMAGE_VERSION: snapshot
23+
# env:
24+
# RCD_IMAGE_VERSION: snapshot
2525
strategy:
2626
fail-fast: false
2727
matrix:
2828
include:
2929
- platform: "x64-mingw-ucrt"
3030
- platform: "x64-mingw32"
31-
- platform: "x86-mingw32"
3231
- platform: "x86_64-linux"
3332
- platform: "x86_64-linux-musl"
3433
- platform: "aarch64-linux"
@@ -67,12 +66,8 @@ jobs:
6766
matrix:
6867
include:
6968
- os: windows-latest
70-
ruby: "3.4"
69+
ruby: "4.0"
7170
platform: "x64-mingw-ucrt"
72-
- os: windows-latest
73-
ruby: "3.2.9-1"
74-
platform: "x86-mingw32"
75-
PGVERSION: 10.20-1-windows
7671
- os: windows-latest
7772
ruby: "3.2"
7873
platform: "x64-mingw-ucrt"
@@ -81,10 +76,10 @@ jobs:
8176
ruby: "3.2"
8277
platform: "x86_64-linux"
8378
- os: ubuntu-24.04-arm
84-
ruby: "3.4"
79+
ruby: "4.0"
8580
platform: "aarch64-linux"
8681
- os: macos-latest
87-
ruby: "3.4"
82+
ruby: "4.0"
8883
platform: "arm64-darwin"
8984
- os: macos-15-intel
9085
ruby: "3.4"

Gemfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- ruby -*-
22

3-
# Specify your gem's runtime dependencies in pg.gemspec
4-
gemspec
3+
# No pg gem, since "bundle package" fails on bundler-2.7+, if the extension isn't built
4+
# gemspec
55

66
source "https://rubygems.org/"
77

@@ -13,7 +13,7 @@ end
1313
group :test do
1414
gem "bundler", ">= 1.16", "< 5.0"
1515
gem "rake-compiler", "~> 1.0"
16-
gem "rake-compiler-dock", "~> 1.10.0", git: "https://github.com/rake-compiler/rake-compiler-dock"
16+
gem "rake-compiler-dock", "~> 1.11.0" #, git: "https://github.com/rake-compiler/rake-compiler-dock"
1717
gem "rspec", "~> 3.5"
1818
# "bigdecimal" is a gem on ruby-3.4+ and it's optional for ruby-pg.
1919
# Specs should succeed without it, but 4 examples are then excluded.

Rakefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ task 'gem:native:prepare' do
106106
# Copy gem signing key and certs to be accessible from the docker container
107107
mkdir_p 'build/gem'
108108
sh "cp ~/.gem/gem-*.pem build/gem/ || true"
109-
sh "bundle package --all"
109+
sh "bundle config set cache_all false"
110+
sh "bundle package"
110111
begin
111112
OpenSSL::PKey.read(File.read(File.expand_path("~/.gem/gem-private_key.pem")), ENV["GEM_PRIVATE_KEY_PASSPHRASE"] || "")
112113
rescue OpenSSL::PKey::PKeyError
@@ -126,7 +127,7 @@ CrossLibraries.each do |xlib|
126127
sudo apt-get update && sudo apt-get install -y bison flex &&
127128
(cp build/gem/gem-*.pem ~/.gem/ || true) &&
128129
bundle install --local &&
129-
rake native:#{platform} pkg/#{$gem_spec.full_name}-#{platform}.gem MAKEFLAGS="-j`nproc` V=1" RUBY_CC_VERSION=#{RakeCompilerDock.ruby_cc_version("~>2.7", "~>3.0")}
130+
rake native:#{platform} pkg/#{$gem_spec.full_name}-#{platform}.gem MAKEFLAGS="-j`nproc` V=1" RUBY_CC_VERSION=#{RakeCompilerDock.ruby_cc_version("~>4.0", "~>3.0")}
130131
EOT
131132
end
132133
desc "Build the native binary gems"

ext/extconf.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727
gem 'mini_portile2', '~>2.1'
2828
require 'mini_portile2'
2929

30-
OPENSSL_VERSION = ENV['OPENSSL_VERSION'] || '3.5.2'
30+
OPENSSL_VERSION = ENV['OPENSSL_VERSION'] || '3.6.0'
3131
OPENSSL_SOURCE_URI = "http://www.openssl.org/source/openssl-#{OPENSSL_VERSION}.tar.gz"
3232

3333
KRB5_VERSION = ENV['KRB5_VERSION'] || '1.22.1'
3434
KRB5_SOURCE_URI = "http://kerberos.org/dist/krb5/#{KRB5_VERSION[/^(\d+\.\d+)/]}/krb5-#{KRB5_VERSION}.tar.gz"
3535

36-
POSTGRESQL_VERSION = ENV['POSTGRESQL_VERSION'] || '17.6'
36+
POSTGRESQL_VERSION = ENV['POSTGRESQL_VERSION'] || '18.1'
3737
POSTGRESQL_SOURCE_URI = "http://ftp.postgresql.org/pub/source/v#{POSTGRESQL_VERSION}/postgresql-#{POSTGRESQL_VERSION}.tar.bz2"
3838

3939
class BuildRecipe < MiniPortile

ports/patches/postgresql/17.6/0001-Use-workaround-of-__builtin_setjmp-only-on-MINGW-on-.patch renamed to ports/patches/postgresql/18.1/0001-Use-workaround-of-__builtin_setjmp-only-on-MINGW-on-.patch

File renamed without changes.

ports/patches/postgresql/17.6/0001-libpq-Process-buffered-SSL-read-bytes-to-support-rec.patch renamed to ports/patches/postgresql/18.1/0001-libpq-Process-buffered-SSL-read-bytes-to-support-rec.patch

File renamed without changes.

0 commit comments

Comments
 (0)