Because this is the default install location and pg/libpq prints an error message when not there:
<internal:/Users/runner/.rubies/ruby-head/lib/ruby/3.2.0+2/rubygems/core_ext/kernel_require.rb>:85:in `require': dlopen(/Users/runner/.rubies/ruby-head/lib/ruby/gems/3.2.0+2/gems/pg-1.4.4/lib/pg_ext.bundle, 9): Library not loaded: /Library/PostgreSQL/14/lib/libpq.5.dylib (LoadError)
Referenced from: /Users/runner/.rubies/ruby-head/lib/ruby/gems/3.2.0+2/gems/pg-1.4.4/lib/pg_ext.bundle
Reason: image not found - /Users/runner/.rubies/ruby-head/lib/ruby/gems/3.2.0+2/gems/pg-1.4.4/lib/pg_ext.bundle
from <internal:/Users/runner/.rubies/ruby-head/lib/ruby/3.2.0+2/rubygems/core_ext/kernel_require.rb>:85:in `require'
from /Users/runner/.rubies/ruby-head/lib/ruby/gems/3.2.0+2/gems/pg-1.4.4/lib/pg.rb:49:in `block in <module:PG>'
from /Users/runner/.rubies/ruby-head/lib/ruby/gems/3.2.0+2/gems/pg-1.4.4/lib/pg.rb:37:in `block in <module:PG>'
from /Users/runner/.rubies/ruby-head/lib/ruby/gems/3.2.0+2/gems/pg-1.4.4/lib/pg.rb:42:in `<module:PG>'
from /Users/runner/.rubies/ruby-head/lib/ruby/gems/3.2.0+2/gems/pg-1.4.4/lib/pg.rb:6:in `<top (required)>'
from <internal:/Users/runner/.rubies/ruby-head/lib/ruby/3.2.0+2/rubygems/core_ext/kernel_require.rb>:160:in `require'
from <internal:/Users/runner/.rubies/ruby-head/lib/ruby/3.2.0+2/rubygems/core_ext/kernel_require.rb>:160:in `rescue in require'
from <internal:/Users/runner/.rubies/ruby-head/lib/ruby/3.2.0+2/rubygems/core_ext/kernel_require.rb>:149:in `require'
<internal:/Users/runner/.rubies/ruby-head/lib/ruby/3.2.0+2/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- pg (LoadError)
from <internal:/Users/runner/.rubies/ruby-head/lib/ruby/3.2.0+2/rubygems/core_ext/kernel_require.rb>:85:in `require'
Error: Process completed with exit code 1.
Error was:
ERROR: While executing gem ... (ArgumentError)
wrong number of arguments (given 4, expected 1)
Error: Process completed with exit code 1.
Upstream issue is:
https://github.com/rubygems/rubygems/issues/4976
The system installed libpq on Github Actions seems to be from PostgreSQL-14, so that the pipeline tests can run.
This reverts commit 39b9a3ba8f4394f7188dfe6470f0aed330b11708.
Although our custom libpq of PostgreSQL-14 is regisered per rpath, the system library is loaded instead.
The error looks like so:
dyld: lazy symbol binding failed: Symbol not found: _PQpipelineStatus
Referenced from: /Users/runner/.rubies/ruby-head/lib/ruby/gems/3.1.0/gems/pg-1.2.3/lib/pg_ext.bundle
Expected in: /usr/local/lib/libpq.5.dylib
Truffleruby-21.1.0 currently fails on Github Actions like here: https://github.com/larskanis/ruby-pg/runs/3766520041?check_suite_focus=true
However it works with the same version on my local laptop, on travis-ci and with the current truffleruby-head version on Github.
Since it looks like some issue that's already fixed, this commit allows truffleruby to fail on github for now.
RubyInstaller-head is now UCRT-based, so that the correct gcc should be used to build the C extension.
The MSVCRT based gcc indeed worked for pg's specs, but it could fails due to memory issues when using the wrong CRT.
That way we can finally test if our binary windows gems run properly and if gem packaging works.
And this adds a run on Macos.
Also remove no longer necessary jobs from Appveyor and Travis-CI.
Fixes#362