Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from ged:master #3

Open
wants to merge 571 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
571 commits
Select commit Hold shift + click to select a range
52ce01e
Bump VERSION to 1.5.0
larskanis Mar 28, 2023
5bdc461
Update cross OpenSSL version to 3.1.0
larskanis Mar 28, 2023
33e8fe7
Update History.md
larskanis Mar 28, 2023
61b8bb7
Adjust rdoc options so that encoder files are parsed again
larskanis Mar 28, 2023
924aaa7
Remove the encoding cache
larskanis Mar 28, 2023
1557dd6
Move the default_notice_receiver to connection struct
larskanis Mar 29, 2023
43b80fb
Fix indention
larskanis Mar 29, 2023
113ee1a
Add write barriers to PG::Coder and derivations
larskanis Mar 29, 2023
c6ecc4a
Add write barriers to PG::Tuple
larskanis Mar 29, 2023
5061020
Add write barriers to PG::Result
larskanis Mar 29, 2023
a0a7822
Add write barriers to two buffer classes for sending query data
larskanis Mar 29, 2023
cd4ec86
Add write barriers to PG::TypeMap* classes
larskanis Mar 29, 2023
f22aeb2
Add write barriers to PG::Connection
larskanis Mar 29, 2023
6bc2028
Merge branch 'write-barrier', remote-tracking branches 'larskanis/rm-…
larskanis Mar 29, 2023
6829bde
Make PG::Coder and derivations shareable
larskanis Mar 29, 2023
ee65eac
Make PG::TypeMap and derivations Ractor shareable
larskanis Mar 30, 2023
5eed6fc
Make PG::BasicTypeMap* Ractor shareable
larskanis Mar 30, 2023
e9ab6a1
Make PG::Result and PG::Tuple shareable for Ractor
larskanis Mar 30, 2023
15b84be
Enable Ractor compatibility
larskanis Mar 30, 2023
fff2484
Make PG classes usable in non-main Ractors
larskanis Mar 30, 2023
2919ee1
Remove deprecated PG::BasicTypeRegistry.register_type and co.
larskanis Mar 31, 2023
990dad7
Ensure PG::Connection is not shareable for Ractor
larskanis Mar 31, 2023
c1616ea
Add a chapter about Ractor to the README
larskanis Mar 31, 2023
a99322a
Merge pull request #519 from larskanis/shareable
larskanis Mar 31, 2023
90e47c2
Update History.md for latest changes
larskanis Mar 31, 2023
382536b
Fix indention
larskanis Mar 31, 2023
4a33c63
Add PG::Connection#check_connection as a way to verify the socket is OK
larskanis Mar 31, 2023
e09be90
Remove old compatibily code for ruby-1.8
larskanis Apr 20, 2023
ce8b2cf
Merge pull request #521 from larskanis/check_connection
larskanis Apr 20, 2023
cf1a2e2
Add a recommendation to verify the usability of the connection
larskanis Apr 20, 2023
2e663b3
Add check_connection to History.md
larskanis Apr 20, 2023
d9e08a0
More privacy for our constants!
larskanis Apr 20, 2023
77cc9e6
Add PG::Connection#check_socket as a way to verify the socket is OK
larskanis Mar 31, 2023
0ea7a94
Merge pull request #522 from larskanis/private-const
larskanis Apr 24, 2023
68ac787
Merge branch 'check_connection'
larskanis Apr 24, 2023
8e859ce
Merge branch 'master' of github.com:ged/ruby-pg
larskanis Apr 24, 2023
3db190e
Update release date for pg-1.15.0
larskanis Apr 24, 2023
70460e3
Update History.md
larskanis Apr 24, 2023
77bd5e8
Don't overwrite flags of timestamp coders
larskanis Apr 24, 2023
0e74d2b
Bump VERSION to 1.5.1
larskanis Apr 24, 2023
c9b1660
Merge pull request #525 from larskanis/fix-524
larskanis Apr 24, 2023
1db1eed
Merge branch 'master' of github.com:ged/ruby-pg
larskanis Apr 24, 2023
cc110f5
Update History for pg-1.5.1
larskanis Apr 24, 2023
92810c2
Fix regression in copy_data regarding binary format
larskanis Apr 26, 2023
9dc4796
Merge pull request #527 from larskanis/fix-526
larskanis Apr 26, 2023
c030060
Add better comment, why an additional get_copy_data is done
larskanis Apr 26, 2023
070ab36
Bump VERSION to 1.5.2
larskanis Apr 26, 2023
9d771c0
Update History.md for pg-1.5.2
larskanis Apr 26, 2023
68d2008
Add category to deprecation warnings
wata727 Apr 26, 2023
d1f5aaa
Merge pull request #528 from wata727/add_warn_category
larskanis Apr 27, 2023
9ded3b9
Fix error on warn with category on Truffleruby
larskanis Apr 27, 2023
83990c6
Fix sporadic spec error on Windows
larskanis Apr 27, 2023
f23782f
Merge pull request #529 from larskanis/fir-warn-on-trufferuby
larskanis Apr 27, 2023
2b87db5
Make some PG::Result method definitions static
larskanis Apr 27, 2023
38b4318
Fix possible segfault when creating new PG::Result
larskanis Apr 27, 2023
2238724
Avoid doing complex operations in RB_OBJ_WRITE macro call
larskanis Apr 27, 2023
2b09abb
Remove unnecessary check for NULL pointer
larskanis Apr 27, 2023
4764bc4
Merge pull request #531 from larskanis/fix-530
larskanis Apr 28, 2023
df9211d
Bump VERSION to 1.5.3
larskanis Apr 28, 2023
364e5f8
Add pg-1.5.3 to History.md
larskanis Apr 28, 2023
bfebd30
This PR fixes compiling the pg extension with MSVC 2022 when using ex…
cfis May 21, 2023
207606e
Update Japanese translation
gemmaro May 26, 2023
6629dec
Merge pull request #537 from gemmaro/update/ja
larskanis May 26, 2023
739093b
Call pgconn_set_internal_encoding_index in all branches of pgconn_set…
drdrsh Aug 30, 2023
766c155
Merge pull request #541 from drdrsh/mostafa_set-internal-encoding
larskanis Aug 31, 2023
1f9a52e
Fix declaration order of static and VALUE
larskanis Aug 31, 2023
ab524fa
Make encoding function static
larskanis Aug 31, 2023
b1da152
Don't set the server's client_encoding if it's unnecessary
larskanis Aug 31, 2023
cac1c24
Merge pull request #543 from larskanis/avoid_set_client_encoding
larskanis Aug 31, 2023
d2f231f
Stop test-postgres-server per -m fast
larskanis Sep 1, 2023
46d9dad
CI: Add test with mswin environment
larskanis Sep 1, 2023
a4ed045
Merge branch 'master' of https://github.com/cfis/ruby-pg into cfis-ma…
larskanis Sep 1, 2023
459288a
Merge branch 'cfis-master' into ci-add-mswin
larskanis Sep 1, 2023
d401388
Merge pull request #544 from larskanis/ci-add-mswin
larskanis Sep 1, 2023
84253f2
Update History.md to pg-1.5.4
larskanis Sep 1, 2023
635d29e
Bump VERSION to 1.5.4
larskanis Sep 1, 2023
f09be21
Update OpenSSL and PostgreSQL-Versions for Windows binary gems
larskanis Sep 1, 2023
21c8dbc
Add new x509 cert, used for pg-1.5.4
larskanis Sep 1, 2023
781e1f7
Update error codes to PostgreSQL-16
larskanis Sep 15, 2023
82f66af
Update windows binary build to PostgreSQL-16
larskanis Sep 15, 2023
043add9
Enable english error messages in tests, as some specs depend on them
larskanis Sep 15, 2023
b6b70d6
CI: Uate to PostgreSQL-16
larskanis Sep 15, 2023
9c0e4de
CI: shorter job names for better readablility on github.com
larskanis Sep 15, 2023
110665f
Explicitly retype timespec fields to int64_t to fix compatibility wit…
jackorp Oct 20, 2023
90879fa
Merge pull request #547 from jackorp/fix_timestamp_conversion_for_x86
larskanis Oct 20, 2023
fb3fba9
Fix possible buffer overflows on 32 bit systems
larskanis Oct 19, 2023
dfd5f59
Merge pull request #548 from larskanis/fix-x86
larskanis Oct 20, 2023
99119b1
Don't ship POT files in gem.
jackorp Oct 24, 2023
1c67bbf
Merge pull request #549 from jackorp/dont_ship_po_files
larskanis Oct 25, 2023
babfda4
Work around an logging issue on Windows
larskanis Nov 1, 2023
2218ebf
Print the contant of "setup.log" on failure
larskanis Nov 1, 2023
5c105f2
Update OpenSSL and PostgreSQL versions for Windows binary gem
larskanis Nov 19, 2023
f74a371
Update openssl and postgresql versions for binary gems
larskanis Feb 15, 2024
d99a6b4
Bump VERSION to 1.5.5
larskanis Feb 15, 2024
72cdd6b
Add ruby-3.3 to windows binary gems
larskanis Feb 15, 2024
daec80f
Add release notes for pg-1.5.5
larskanis Feb 15, 2024
5804665
Make bigdecimal an optional dependency
larskanis Feb 15, 2024
21ca5cc
Merge pull request #556 from larskanis/optional-bigdecimal
larskanis Feb 29, 2024
016c17c
libpq resolves the host address while PQreset, but ruby-pg doesn't. T…
larskanis Feb 28, 2024
27d7c2a
Merge pull request #559 from larskanis/reset-with-dns
larskanis Mar 1, 2024
91cdac8
Add release notes for pg-1.5.6
larskanis Mar 1, 2024
caf11ba
Bump VERSION to 1.5.6
larskanis Mar 1, 2024
c59ca8f
Add renewed certificate for x509 signature of gem releases
larskanis Mar 1, 2024
3e9c143
Add PG::RollbackTransaction as an option to exit conn.transaction
larskanis Mar 6, 2024
ebe8b88
Remove deprecated use of fptr->fd
larskanis Mar 20, 2024
9df1395
CI: Add a temprorary fix for truffleruby-24.0.0
larskanis Mar 22, 2024
af6552a
Merge pull request #563 from larskanis/fix-tr2
larskanis Mar 22, 2024
21285ba
Merge pull request #562 from larskanis/fptr-fd
larskanis Mar 22, 2024
cba9951
Avoid compiler warning
larskanis Apr 8, 2024
e3cc7cf
Merge pull request #565 from larskanis/fix-noreturn-warn
larskanis Apr 8, 2024
21a064b
Make `pgconn_connect_poll` close the socket prior to calling
jcalvert Apr 8, 2024
8eec744
Merge pull request #564 from jcalvert/fix_connect_poll_fd_reuse
larskanis Apr 9, 2024
effd4fa
Add LDFLAGS in MAINTAINER_MODE
larskanis Apr 9, 2024
45db2da
Merge branch 'master' of https://github.com/ged/ruby-pg
larskanis Apr 9, 2024
f13b516
Fix typos
kianmeng Apr 26, 2024
897042a
Merge pull request #566 from kianmeng/fix-typos
larskanis Apr 26, 2024
785fbb4
More spelling improvements
larskanis Apr 26, 2024
2918291
Merge pull request #567 from larskanis/more-spelling
larskanis Apr 27, 2024
89066d0
CI: Fix source run on Macos
larskanis May 15, 2024
d072b21
Merge pull request #570 from ged/larskanis-patch-1
larskanis May 15, 2024
ec9bd35
Add a hint to use type maps to Connection#copy_data
larskanis Jul 2, 2024
258fbf0
Remove one skip in specs for Truffleruby and refine the other
larskanis Jul 10, 2024
acb7fae
Relax test of finish to not bother about unrelated connections
larskanis Jul 11, 2024
3baced6
Skip new test on Windows which constantly crashs
larskanis Jul 11, 2024
98069ee
Merge pull request #572 from larskanis/try-truffle
larskanis Jul 11, 2024
0508e25
Merge pull request #560 from larskanis/rollback
larskanis Jul 20, 2024
c16d131
Update libraries for windows binary gems to openssl-3.3.1 and postgre…
larskanis Jul 20, 2024
69551bd
Add release notes for pg-1.5.7
larskanis Jul 20, 2024
3719759
Add ostruct as a development gem as a preparation for ruby-3.5
larskanis Jul 20, 2024
1a94b12
Add comment to Gemfile reg. bigdecimal
larskanis Jul 27, 2024
a629d14
Don't print a warning when bigdecimal is required on ruby-3.4+
larskanis Jul 28, 2024
d17123c
Merge pull request #574 from larskanis/bigdeci
larskanis Jul 28, 2024
8e62c81
Fix ruby warning
larskanis Jul 28, 2024
e5f1630
CI: Fix appveyor build by switching to x64 platform
larskanis Jul 28, 2024
5935b15
Merge pull request #575 from larskanis/appv1
larskanis Jul 28, 2024
cdb5202
Update release notes for pg-1.5.7
larskanis Jul 28, 2024
0ac827c
Bump VERSION to 1.5.7
larskanis Jul 28, 2024
0c850b3
Add missing documentation to some coder classes
larskanis Aug 2, 2024
629ddb9
Link documentation of binary and text CopyRow together
larskanis Aug 2, 2024
f882bc4
Fix spelling mistake
larskanis Aug 10, 2024
764f6d5
CI: Run pipeline only on master branch and pull requests
larskanis Aug 10, 2024
64fe4c1
Add a comment about possible NULL pointer in string encoder
larskanis Aug 11, 2024
f225e98
CI: Fix github yaml file
larskanis Aug 11, 2024
0f387c0
Move format loop out of the type specs
larskanis Aug 11, 2024
cb81279
Adjust tests with dedicated ssl certificate to fetch it from the test…
larskanis Aug 11, 2024
761b272
Add default decoder for anonymous record types to BasicTypeRegistry
larskanis Aug 11, 2024
35510e2
Merge pull request #581 from larskanis/testdir
larskanis Aug 12, 2024
beafa09
Merge pull request #579 from larskanis/add-record-to-btm
larskanis Aug 12, 2024
7ced092
Improve comment about waiting for socket input
larskanis Aug 17, 2024
60f74ff
Fix typo
larskanis Aug 19, 2024
65c5031
Improve code documentation
larskanis Sep 5, 2024
070b72b
Remove unused variable in spec
larskanis Sep 5, 2024
7515aac
CI: Use latest github actions
larskanis Sep 5, 2024
dd060bc
Merge pull request #587 from larskanis/github-v4
larskanis Sep 5, 2024
a2a3e6d
CI: github actions @v4 need distinct artifact names
larskanis Sep 5, 2024
bf7d57f
Save connection options for conn.reset
larskanis Sep 5, 2024
d4c6c61
Merge pull request #589 from larskanis/fix-host-dup-on-reset
larskanis Sep 6, 2024
7af75a4
Bump VERSION to 1.5.8 and add changelog entry
larskanis Sep 6, 2024
cb35e3f
Update to Postgresql-16.4 and OpenSSL-3.3.2 for Windows binary gems
larskanis Sep 6, 2024
ae228ba
Remove raising conect_timeout from 1 to 2 seconds
larskanis Sep 9, 2024
5db4b55
Merge pull request #590 from larskanis/conn_timeout
larskanis Sep 9, 2024
ed234d3
Exclude CI files from built gem
AlexWayfer Sep 18, 2024
6c91802
Ignore `test_trace.out` file for git
AlexWayfer Sep 18, 2024
d13cdc5
Add EditorConfig file
AlexWayfer Sep 18, 2024
da14f8c
Exclude all files (and directories) starting with `.` from built gem
AlexWayfer Sep 18, 2024
aa20ca1
Merge pull request #591 from AlexWayfer/exclude_ci_files_from_built_gem
larskanis Sep 20, 2024
ea55147
Merge pull request #592 from AlexWayfer/ignore_test_trace_for_git
larskanis Sep 20, 2024
7f08ece
Merge pull request #593 from AlexWayfer/add_editorconfig_file
larskanis Sep 20, 2024
f526686
Fix indention of comment
larskanis Oct 15, 2024
251fc4a
Add comment about related ruby version
larskanis Oct 15, 2024
2388e17
Fix binary copy_data in Ractor context
larskanis Oct 23, 2024
8d22de7
Add a test for connect with positional parameters in Ractor context
larskanis Oct 23, 2024
626102e
Merge pull request #596 from larskanis/fix-bin-copy
larskanis Oct 23, 2024
85cbf3b
Fix spec for TypeMapByColumn#inspect on ruby-head
larskanis Oct 23, 2024
a12131d
Merge pull request #597 from larskanis/fix-inspect-on-ruby-head
larskanis Oct 23, 2024
716221a
Enable thread safety in static OpenSSL build
larskanis Oct 24, 2024
94f1d7f
Merge pull request #598 from larskanis/osl-threads
larskanis Oct 24, 2024
86367c6
Update error codes by `rake update_error_codes`
larskanis Oct 24, 2024
d8c3753
Update to postgresql-17.0 and openssl-3.4.0 for Windows binary gems
larskanis Oct 24, 2024
4a52437
CI: Update jobs to postgresql-1.7.0
larskanis Oct 24, 2024
70c02ea
Work around missing dependency to errorcodes.h in PostgreSQL-17.0
larskanis Oct 24, 2024
ca8e69c
Remove skip on Windows since the issue is fixed
larskanis Oct 24, 2024
342bdbb
Merge pull request #599 from larskanis/update-postgres
larskanis Oct 24, 2024
9f8a6c6
Add History entry for pg-1.5.9
larskanis Oct 24, 2024
afe2f20
Bump VERSION to 1.5.9
larskanis Oct 24, 2024
f0a76d9
Remove workarounds for PostgreSQL static build
larskanis Oct 25, 2024
ff27c61
Merge pull request #600 from larskanis/fix-fatbin-build
larskanis Oct 25, 2024
5128597
Shrink the scope of one variable
larskanis Nov 15, 2024
25e584d
Allow type_spec.rb to be run directly by rspec without database server
larskanis Nov 16, 2024
9fecece
Fix tab indention
larskanis Nov 16, 2024
a5a11c6
Avoid "warning: ISO C90 forbids mixed declarations and code [-Wdeclar…
larskanis Nov 18, 2024
6e88753
Add PG::BinaryDecoder::Array
larskanis Nov 15, 2024
73a9e34
BinaryDecoder::Array: Check limits on number of elements
larskanis Nov 16, 2024
560b13e
BinaryDecoder::Array: add tests
larskanis Nov 16, 2024
3999b42
Add PG::BinaryEncoder::Array
larskanis Nov 17, 2024
450e9c4
PG::BinaryEncoder::Array: Add checks for Array uniformity
larskanis Nov 18, 2024
6c43eb5
PG::BinaryDecoder::Array: Add a spec for the maximum supported dimens…
larskanis Nov 18, 2024
766752f
Extend Array specs to use mixed one and two-dimensional array
larskanis Nov 18, 2024
9cee4f9
Add BinaryEncoder::Array and BinaryDecoder::Array to coder matrix in …
larskanis Nov 18, 2024
33db8fd
Merge text and binary specs for COPY decoder selection
larskanis Nov 21, 2024
6bd3130
Drop support for PostgreSQL < 10
larskanis Nov 22, 2024
13569b6
Drop support for Ruby < 2.7
larskanis Nov 22, 2024
5be783f
Merge pull request #606 from larskanis/drop-pg-9.x
larskanis Nov 22, 2024
3df1071
Merge pull request #604 from larskanis/add-bin-array
larskanis Nov 22, 2024
b96ad11
Refine documentation to TcpGateScheduler
larskanis Nov 23, 2024
ba6da79
Fix writing lots of data through the TcpGateScheduler
larskanis Nov 23, 2024
c79eb6f
Merge pull request #607 from larskanis/fix-blocking-scheduler
larskanis Nov 23, 2024
ffe5054
Move short cut for $scheduler_timeout to the same file
larskanis Nov 23, 2024
1393d19
Initialize "intermediate" VALUE for encoding
larskanis Nov 23, 2024
e4e5b8a
Merge pull request #608 from larskanis/init-intermediate
larskanis Nov 23, 2024
042615f
Fix issues on Truffleruby in CI
larskanis Nov 23, 2024
2f8d36f
Merge pull request #609 from larskanis/fix-truffle
larskanis Nov 23, 2024
305539d
Add Connection#set_chunked_rows_mode
larskanis Nov 23, 2024
d334213
Merge pull request #610 from larskanis/chunked-tuples-mode
larskanis Nov 23, 2024
269116d
Improve error message of single_row_mode and chunked_rows_mode
larskanis Nov 24, 2024
be42490
Add PG::Connection#close_prepared and siblings
larskanis Nov 24, 2024
480668f
Add function name to errors raised by PQsend...
larskanis Nov 24, 2024
5d660c2
Remove duplicated C code
larskanis Nov 24, 2024
d583823
Improve documentation of close_prepared/portal
larskanis Nov 24, 2024
df2ef1d
Merge pull request #611 from larskanis/close-prepared
larskanis Nov 24, 2024
6dbb3e6
Add Connection#send_pipeline_sync, async_pipeline_sync and release GV…
larskanis Nov 25, 2024
221af3d
CI: Change PostgreSQL versions to include 14 and 16
larskanis Nov 25, 2024
0d0e5f4
Merge pull request #612 from larskanis/sendpipeline
larskanis Nov 25, 2024
ac16ec5
Remove workaround for Truffleruby < 21.3.0
larskanis Nov 25, 2024
209f345
Merge pull request #613 from larskanis/remove-triffle-21
larskanis Nov 26, 2024
8d41928
Add support for new query cancel functions of PostgreSQL-17
larskanis Nov 26, 2024
4b709f5
Remove duplicated code for (un-)wrapping of socket IO
larskanis Nov 26, 2024
d7bca82
Check result of PQcancelCreate()
larskanis Nov 26, 2024
be9262c
Check CancelConnection#status can raise an error
larskanis Nov 26, 2024
67733e4
Add documentation to PG::CancelConnection
larskanis Nov 26, 2024
36a7b1a
Merge pull request #614 from larskanis/cancon
larskanis Nov 26, 2024
7ac7c37
Add fat binary gem for x86_64-linux
larskanis Jul 28, 2024
bc0eac4
Use rpath instead of fiddle for loading of libpq.so
larskanis Oct 28, 2024
54460a7
CI: Add test run on Fedora and Alpine
larskanis Oct 30, 2024
97d0718
Try to decrease the number of CI failures on Macos
larskanis Nov 27, 2024
66cf3ab
Merge pull request #615 from larskanis/macos
larskanis Nov 27, 2024
53e7e6e
Merge pull request #551 from larskanis/binary-linux
larskanis Nov 28, 2024
c6d1047
Bump VERSION to 1.6.0.rc1 and add release notes
larskanis Nov 28, 2024
fba32e4
Add patch and test job for starvation on bigger SSL records
larskanis Nov 28, 2024
a974f31
Add possibility to define the number of array dimensions to be encoded
larskanis Jan 10, 2025
1ec3e20
Verify array input to PG::TypeMapByColumn
larskanis Jan 10, 2025
15be07d
Update to rcd-1.8.0 and add ruby-3.4 in native gem
larskanis Jan 10, 2025
70a5695
Merge pull request #623 from ged/rcd-1.8
larskanis Jan 10, 2025
e36b00c
Merge pull request #616 from larskanis/ssl-gt-8k
larskanis Jan 10, 2025
ab21474
Merge pull request #621 from ged/fix-620
larskanis Jan 10, 2025
f9d05f5
Merge pull request #622 from ged/add-array-dimensions
larskanis Jan 10, 2025
9afa148
CI: run binary jobs onlky on master and PRs
larskanis Jan 10, 2025
0ee61f1
Merge branch 'master' of github.com:ged/ruby-pg
larskanis Jan 10, 2025
3ac52bb
Add MINGW package dependency which is resolved by RubyInstaller
larskanis Dec 14, 2024
378b7a3
Merge pull request #617 from ged/mingw-deps
larskanis Jan 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: Visual Studio 2019
image: Visual Studio 2022

init:
- set PATH=C:/Ruby%ruby_version%/bin;c:/Program Files/Git/cmd;c:/Windows/system32;C:/Windows/System32/WindowsPowerShell/v1.0;C:/Program Files/Mercurial
Expand All @@ -7,8 +7,11 @@ install:
- ps: |
if ($env:RUBYDOWNLOAD -ne $null) {
$(new-object net.webclient).DownloadFile("https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-head/rubyinstaller-head-$env:RUBYDOWNLOAD.exe", "$pwd/ruby-setup.exe")
cmd /c ruby-setup.exe /verysilent /dir=C:/Ruby$env:ruby_version
cmd /c ruby-setup.exe /currentuser /verysilent /dir=C:/Ruby$env:ruby_version
}
- cmd: |
ridk enable
c:/msys64/usr/bin/bash -lc "pacman -S --noconfirm --needed ${MINGW_PACKAGE_PREFIX}-pkgconf ${MINGW_PACKAGE_PREFIX}-libyaml ${MINGW_PACKAGE_PREFIX}-gcc"
- ruby --version
- gem --version
- gem install bundler --conservative
Expand All @@ -18,19 +21,20 @@ install:
{
$(new-object net.webclient).DownloadFile('http://get.enterprisedb.com/postgresql/postgresql-' + $env:PGVERSION + '.exe', 'C:/postgresql-setup.exe')
cmd /c "C:/postgresql-setup.exe" --mode unattended --extract-only 1

$env:PATH = 'C:/Program Files/PostgreSQL/' + $env:PGVER + '/bin;' + $env:PATH
$env:PATH = 'C:/Program Files (x86)/PostgreSQL/' + $env:PGVER + '/bin;' + $env:PATH
}
$env:PATH = 'C:/Program Files/PostgreSQL/' + $env:PGVER + '/bin;' + $env:PATH
$env:PATH = 'C:/Program Files (x86)/PostgreSQL/' + $env:PGVER + '/bin;' + $env:PATH
- echo %PATH%
- pg_config
build_script:
- bundle exec rake -rdevkit compile --trace
test_script:
- bundle exec rake test PG_DEBUG=0
on_failure:
- find -name mkmf.log | xargs cat
environment:
matrix:
- ruby_version: "head"
RUBYDOWNLOAD: x86
PGVERSION: 10.16-1-windows
PGVER: 10
- ruby_version: "25"
PGVERSION: 9.3.25-1-windows
PGVER: 9.3
RUBYDOWNLOAD: x64
- ruby_version: "30-x64"
25 changes: 25 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
root = true

[*]
indent_style = tab
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120

[{*.gemspec,rakelib/**.rb}]
indent_style = space
indent_size = 2

[*.def]
indent_style = space
indent_size = 2

[*.yml]
indent_style = space
indent_size = 2

[*.{md,rdoc}]
indent_style = space
indent_size = 4
172 changes: 144 additions & 28 deletions .github/workflows/binary-gems.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,39 @@
name: Build and test binary gems
name: Binary gems

on: [push, pull_request]
on:
workflow_dispatch:
schedule:
- cron: "0 5 * * 3" # At 05:00 on Wednesday # https://crontab.guru/#0_5_*_*_3
push:
branches:
- master
tags:
- "*.*.*"
pull_request:
types: [opened, synchronize]
branches:
- "*"
permissions:
contents: read

jobs:
job_build_x64:
name: build
rcd_build:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- platform: "x64-mingw-ucrt"
- platform: "x64-mingw32"
- platform: "x86-mingw32"
- platform: "x86_64-linux"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.0"
ruby-version: "3.3"
- run: bundle install

- name: Create a dummy cert to satisfy the build
Expand All @@ -22,59 +44,153 @@ jobs:
cp gem-public_cert.pem ~/.gem/gem-public_cert.pem

- name: Build binary gem
run: bundle exec rake gem:windows:x64-mingw32
run: bundle exec rake gem:native:${{ matrix.platform }}

- name: Upload binary gem
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: binary-gem
name: binary-gem-${{ matrix.platform }}
path: pkg/*.gem

job_test_binary:
name: Test on Windows
needs: job_build_x64
name: Test
needs: rcd_build
strategy:
fail-fast: false
matrix:
include:
- ruby: "3.0"
PGVERSION: 14.0-1-windows-x64
PGVER: "14"
- ruby: "2.5"
PGVERSION: 10.16-1-windows
PGVER: "10"

runs-on: windows-latest
- os: windows-latest
ruby: "3.3"
platform: "x64-mingw-ucrt"
- os: windows-latest
ruby: "3.1.4-1"
platform: "x86-mingw32"
PGVERSION: 10.20-1-windows
- os: windows-latest
ruby: "2.7"
platform: "x64-mingw32"
PGVERSION: 16.6-1-windows-x64
- os: ubuntu-latest
ruby: "3.2"
platform: "x86_64-linux"

runs-on: ${{ matrix.os }}
env:
PGVERSION: ${{ matrix.PGVERSION }}
PGVER: ${{ matrix.PGVER }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
if: matrix.platform != 'x86-mingw32'
uses: ruby/setup-ruby-pkgs@v1
with:
ruby-version: ${{ matrix.ruby }}
apt-get: "postgresql" # Ubuntu
brew: "postgresql" # macOS
mingw: "postgresql" # Windows mingw / mswin /ucrt

- name: Set up 32 bit x86 Ruby
if: matrix.platform == 'x86-mingw32'
run: |
$(new-object net.webclient).DownloadFile("https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-${{ matrix.ruby }}/rubyinstaller-${{ matrix.ruby }}-x86.exe", "$pwd/ruby-setup.exe")
cmd /c ruby-setup.exe /currentuser /verysilent /dir=C:/Ruby-${{ matrix.ruby }}
echo "c:/ruby-${{ matrix.ruby }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

c:/ruby-${{ matrix.ruby }}/bin/ridk enable
c:/msys64/usr/bin/bash -lc "pacman -S --noconfirm --needed make `${MINGW_PACKAGE_PREFIX}-pkgconf `${MINGW_PACKAGE_PREFIX}-libyaml `${MINGW_PACKAGE_PREFIX}-gcc `${MINGW_PACKAGE_PREFIX}-make"
echo "C:/msys64/$env:MSYSTEM_PREFIX/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: Download gem from build job
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: binary-gem
name: binary-gem-${{ matrix.platform }}

- name: Download PostgreSQL
- name: Download PostgreSQL 32-bit
if: ${{ matrix.os == 'windows-latest' && matrix.PGVERSION }}
run: |
Add-Type -AssemblyName System.IO.Compression.FileSystem
function Unzip {
param([string]$zipfile, [string]$outpath)
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath)
}

$(new-object net.webclient).DownloadFile("http://get.enterprisedb.com/postgresql/postgresql-$env:PGVERSION-binaries.zip", "postgresql-binaries.zip")
Unzip "postgresql-binaries.zip" "."
echo "$pwd/pgsql/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: set PGUSER
if: ${{ matrix.os == 'windows-latest' }}
run: |
echo "PGUSER=$env:USERNAME" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "PGPASSWORD=" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- run: echo $env:PATH
- run: gem update --system 3.3.26
- run: bundle install
- run: gem install --local *.gem --verbose
- run: gem install --local pg-*${{ matrix.platform }}.gem --verbose
- name: Run specs
if: ${{ matrix.os != 'windows-latest' }}
run: ruby -rpg -S rspec -fd spec/**/*_spec.rb
- name: Run specs
run: ruby -rpg -S rspec spec/**/*_spec.rb
if: ${{ matrix.os == 'windows-latest' }}
run: |
ridk enable
ruby -rpg -S rspec -fd spec/**/*_spec.rb

- name: Print logs if job failed
if: ${{ failure() && matrix.os == 'windows-latest' }}
run: |
ridk enable
find "$(ruby -e"puts RbConfig::CONFIG[%q[libdir]]")" -name mkmf.log -print0 | xargs -0 cat
find -name setup.log -print0 | xargs -0 cat


job_binary_multiarch:
name: multiarch (${{matrix.platform}} on ${{matrix.from_image}} ${{matrix.image_platform}})
needs: rcd_build
strategy:
fail-fast: false
matrix:
include:
- from_image: fedora:39
image_platform: linux/x86_64
gem_platform: x86_64-linux
dockerfile: centos
- from_image: alpine
image_platform: linux/x86_64
gem_platform: x86_64-linux
dockerfile: alpine

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download gem-${{ matrix.gem_platform }}
uses: actions/download-artifact@v4
with:
name: binary-gem-${{ matrix.gem_platform }}
- name: Build image and Run tests
run: |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker build --rm --platform ${{matrix.image_platform}} --build-arg from_image=${{matrix.from_image}} -t ruby-test -f spec/env/Dockerfile.${{matrix.dockerfile}} .
docker run --rm -t --network=host -v `pwd`:/build ruby-test

job_binary_yugabyte:
name: yugabyte (${{matrix.gem_platform}}
needs: rcd_build
strategy:
fail-fast: false
matrix:
include:
- gem_platform: x86_64-linux

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download gem-${{ matrix.gem_platform }}
uses: actions/download-artifact@v4
with:
name: binary-gem-${{ matrix.gem_platform }}
- name: Build image and Run tests
run: |
sudo apt-get install -y docker-compose
cp -v pg-*.gem misc/yugabyte/
cd misc/yugabyte
docker-compose up --abort-on-container-exit --exit-code-from pg
Loading