Skip to content

Commit b8ee7b2

Browse files
authored
Merge pull request #651 from larskanis/fixci
CI: Remove ruby < 3.2 from test matrix on Windows
2 parents d425e20 + fcf68c8 commit b8ee7b2

File tree

2 files changed

+27
-15
lines changed

2 files changed

+27
-15
lines changed

.github/workflows/binary-gems.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ jobs:
6363
matrix:
6464
include:
6565
- os: windows-latest
66-
ruby: "3.3"
66+
ruby: "3.4"
6767
platform: "x64-mingw-ucrt"
6868
- os: windows-latest
69-
ruby: "3.1.4-1"
69+
ruby: "3.2.9-1"
7070
platform: "x86-mingw32"
7171
PGVERSION: 10.20-1-windows
7272
- os: windows-latest
73-
ruby: "2.7"
74-
platform: "x64-mingw32"
73+
ruby: "3.2"
74+
platform: "x64-mingw-ucrt"
7575
PGVERSION: 16.6-1-windows-x64
7676
- os: ubuntu-latest
7777
ruby: "3.2"
@@ -116,7 +116,10 @@ jobs:
116116
with:
117117
name: binary-gem-${{ matrix.platform }}
118118

119-
- name: Download PostgreSQL 32-bit
119+
- run: bundle install
120+
- run: gem install --local pg-*${{ matrix.platform }}.gem --verbose
121+
122+
- name: Download PostgreSQL
120123
if: ${{ matrix.os == 'windows-latest' && matrix.PGVERSION }}
121124
run: |
122125
Add-Type -AssemblyName System.IO.Compression.FileSystem
@@ -135,9 +138,6 @@ jobs:
135138
echo "PGPASSWORD=" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
136139
137140
- run: echo $env:PATH
138-
- run: gem update --system 3.3.26
139-
- run: bundle install
140-
- run: gem install --local pg-*${{ matrix.platform }}.gem --verbose
141141
- name: Run specs
142142
if: ${{ matrix.os != 'windows-latest' }}
143143
run: ruby -rpg -S rspec -fd spec/**/*_spec.rb

.github/workflows/source-gem.yml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
PGVERSION: 17.0-1-windows-x64
4848
PGVER: "17"
4949
- os: windows
50-
ruby: "2.7"
50+
ruby: "3.2"
5151
PGVERSION: 10.20-1-windows-x64
5252
PGVER: "10"
5353
- os: windows
@@ -88,6 +88,12 @@ jobs:
8888
with:
8989
ruby-version: ${{ matrix.ruby }}
9090

91+
- name: Print tool versions
92+
run: |
93+
ruby -v
94+
gem env
95+
gcc -v
96+
9197
- name: Download gem from build job
9298
uses: actions/download-artifact@v4
9399
with:
@@ -98,6 +104,8 @@ jobs:
98104
shell: cmd
99105
run: ridk exec sh -c "pacman --sync --needed --noconfirm ${MINGW_PACKAGE_PREFIX}-gcc"
100106

107+
- run: bundle install
108+
101109
- name: Download PostgreSQL Windows
102110
if: matrix.os == 'windows'
103111
run: |
@@ -109,7 +117,7 @@ jobs:
109117
110118
$(new-object net.webclient).DownloadFile("http://get.enterprisedb.com/postgresql/postgresql-$env:PGVERSION-binaries.zip", "postgresql-binaries.zip")
111119
Unzip "postgresql-binaries.zip" "."
112-
echo "$pwd/pgsql/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
120+
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
113121
echo "PGUSER=$env:USERNAME" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
114122
echo "PGPASSWORD=" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
115123
@@ -131,9 +139,7 @@ jobs:
131139
sudo mv /Library/PostgreSQL/$PGVER/pgsql/* /Library/PostgreSQL/$PGVER/ && \
132140
echo /Library/PostgreSQL/$PGVER/bin >> $GITHUB_PATH
133141
134-
- run: gem update --system 3.3.26
135-
- run: bundle install
136-
142+
- run: echo $env:PATH
137143
- run: gem install --local *.gem --verbose
138144

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

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

150-
- name: Print logs if job failed
156+
- name: Print db logs if job failed
151157
if: ${{ failure() && matrix.os != 'windows' }}
152158
run: cat tmp_test_specs/*.log
159+
160+
- name: Print mkmf logs if job failed on Windows-head
161+
if: ${{ failure() && matrix.os == 'windows' && matrix.ruby == 'head' }}
162+
run: |
163+
ridk exec cat c:/rubyinstaller-head-*/lib/ruby/gems/*/extensions/*/*/*/mkmf.log || ridk exec cat d:/rubyinstaller-head-*/lib/ruby/gems/*/extensions/*/*/*/mkmf.log
164+
ridk exec gcc -v

0 commit comments

Comments
 (0)