Skip to content

Commit

Permalink
Merge pull request #544 from larskanis/ci-add-mswin
Browse files Browse the repository at this point in the history
CI: Add test with mswin environment
  • Loading branch information
larskanis authored Sep 1, 2023
2 parents d2f231f + 459288a commit d401388
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/source-gem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ jobs:
ruby: "2.5"
PGVERSION: 9.4.26-1-windows-x64
PGVER: "9.4"
- os: windows
ruby: "mswin"
PGVERSION: 15.1-1-windows-x64
PGVER: "15"
- os: ubuntu
ruby: "head"
PGVER: "15"
Expand Down Expand Up @@ -82,7 +86,7 @@ jobs:
name: source-gem

- name: Install required packages Windows
if: matrix.os == 'windows'
if: matrix.os == 'windows' && matrix.ruby != 'mswin'
shell: cmd
run: ridk exec sh -c "pacman --sync --needed --noconfirm ${MINGW_PACKAGE_PREFIX}-gcc"

Expand Down
4 changes: 4 additions & 0 deletions ext/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@
if dlldir && RbConfig::CONFIG["RPATHFLAG"].to_s.empty?
append_ldflags "-Wl,-rpath,#{dlldir.quote}"
end

if /mswin/ =~ RUBY_PLATFORM
$libs = append_library($libs, 'ws2_32')
end
end

$stderr.puts "Using libpq from #{dlldir}"
Expand Down

0 comments on commit d401388

Please sign in to comment.