Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 8 additions & 8 deletions .github/workflows/binary-gems.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ jobs:
matrix:
include:
- os: windows-latest
ruby: "3.3"
ruby: "3.4"
platform: "x64-mingw-ucrt"
- os: windows-latest
ruby: "3.1.4-1"
ruby: "3.2.9-1"
platform: "x86-mingw32"
PGVERSION: 10.20-1-windows
- os: windows-latest
ruby: "2.7"
platform: "x64-mingw32"
ruby: "3.2"
platform: "x64-mingw-ucrt"
PGVERSION: 16.6-1-windows-x64
- os: ubuntu-latest
ruby: "3.2"
Expand Down Expand Up @@ -116,7 +116,10 @@ jobs:
with:
name: binary-gem-${{ matrix.platform }}

- name: Download PostgreSQL 32-bit
- run: bundle install
- run: gem install --local pg-*${{ matrix.platform }}.gem --verbose

- name: Download PostgreSQL
if: ${{ matrix.os == 'windows-latest' && matrix.PGVERSION }}
run: |
Add-Type -AssemblyName System.IO.Compression.FileSystem
Expand All @@ -135,9 +138,6 @@ jobs:
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 pg-*${{ matrix.platform }}.gem --verbose
- name: Run specs
if: ${{ matrix.os != 'windows-latest' }}
run: ruby -rpg -S rspec -fd spec/**/*_spec.rb
Expand Down
26 changes: 19 additions & 7 deletions .github/workflows/source-gem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
PGVERSION: 17.0-1-windows-x64
PGVER: "17"
- os: windows
ruby: "2.7"
ruby: "3.2"
PGVERSION: 10.20-1-windows-x64
PGVER: "10"
- os: windows
Expand Down Expand Up @@ -88,6 +88,12 @@ jobs:
with:
ruby-version: ${{ matrix.ruby }}

- name: Print tool versions
run: |
ruby -v
gem env
gcc -v

- name: Download gem from build job
uses: actions/download-artifact@v4
with:
Expand All @@ -98,6 +104,8 @@ jobs:
shell: cmd
run: ridk exec sh -c "pacman --sync --needed --noconfirm ${MINGW_PACKAGE_PREFIX}-gcc"

- run: bundle install

- name: Download PostgreSQL Windows
if: matrix.os == 'windows'
run: |
Expand All @@ -109,7 +117,7 @@ jobs:

$(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
echo "$env:RI_DEVKIT$env:MINGW_PREFIX/bin;$env:RI_DEVKIT/usr/bin;$pwd/pgsql/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "PGUSER=$env:USERNAME" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "PGPASSWORD=" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

Expand All @@ -131,9 +139,7 @@ jobs:
sudo mv /Library/PostgreSQL/$PGVER/pgsql/* /Library/PostgreSQL/$PGVER/ && \
echo /Library/PostgreSQL/$PGVER/bin >> $GITHUB_PATH

- run: gem update --system 3.3.26
- run: bundle install

- run: echo $env:PATH
- run: gem install --local *.gem --verbose

- name: Run specs
Expand All @@ -143,10 +149,16 @@ jobs:
TRUFFLERUBYOPT: --experimental-options --keep-handles-alive
run: ruby -rpg -S rspec spec/**/*_spec.rb -cfdoc

- name: Print logs if job failed
- name: Print db logs if job failed
if: ${{ failure() && matrix.os == 'windows' }}
run: ridk exec cat tmp_test_specs/*.log

- name: Print logs if job failed
- name: Print db logs if job failed
if: ${{ failure() && matrix.os != 'windows' }}
run: cat tmp_test_specs/*.log

- name: Print mkmf logs if job failed on Windows-head
if: ${{ failure() && matrix.os == 'windows' && matrix.ruby == 'head' }}
run: |
ridk exec cat c:/rubyinstaller-head-*/lib/ruby/gems/*/extensions/*/*/*/mkmf.log || ridk exec cat d:/rubyinstaller-head-*/lib/ruby/gems/*/extensions/*/*/*/mkmf.log
ridk exec gcc -v
Loading