Skip to content

Commit ee9e162

Browse files
committed
.github/workflows/test.yml: synchronize with master
[ This is a backport to the 3.0 branch. ] Backport changes made to .github/workflows/test.yml in master branch, except: - Minimum version is Ruby 2.6 - FIPS-mode related changes are excluded (as it's not supported) This includes the following commits: fcf53d5 CI: Remove workaround for Ruby-3.2 and 3.3 on Windows 567b412 CI: Upgrade OpenSSL and LibreSSL versions. 405f1ee CI: Add OpenSSL no-legacy case. 9a99583 CI: Upgrade OpenSSL and LibreSSL versions. 6feeeb8 CI: Add the rubyinstaller2 issue link that legacy provider is not loaded. 7aed35a Windows Ruby 3.3: Workaround: Set OPENSSL_MODULES to find providers. adfb6bb CI: Add OpenSSL 3.2.0. fafe1af CI: Change the openssl_fips.cnf.tmpl and openssl_fips.cnf directories. f07e6f5 CI: Upgrade OpenSSL and LibreSSL versions. 0dda88d Merge pull request ruby#682 from ruby/dependabot/github_actions/actions/checkout-4 0b83eed Rakefile: Add test_fips task for convenience. b94314f Bump actions/checkout from 3 to 4 8c7a6a1 Remove OSSL_DEBUG compile-time option e35f190 CI: Replace "mode" in "FIPS mode" with "module". 61434f6 Rakefile: Print FIPS information in the `rake debug`. 7ec8024 CI: Add OpenSSL master branch head non-FIPS and FIPS cases. 24d8add CI: Upgrade OpenSSL versions. fddfc55 CI: Add OpenSSL 3.1 FIPS case. 58ce7fa .github/workflows/test.yml: add provider load path for Windows f6e57e1 CI: Fix a typo in the comment. [ci skip] 52402f6 CI: Check compiler warnings. f6ba75e Drop support for Ruby 2.6 3456770 CI: Upgrade OpenSSL and LibreSSL versions. 79786ca CI: Rename the key name "foo_bar" (underscore) to "foo-bar" (hyphen). 8149cdf CI: Add the test/openssl/test_pkey.rb on the FIPS mode case. 08e1981 CI: Enable the verbose mode in the mkmf.rb by env MAKEFLAGS. 121b3b2 Revert "CI: Enable the verbose mode in the mkmf.rb." a832f5c CI: Enable the verbose mode in the mkmf.rb. 18b0172 CI: Add OpenSSL FIPS mode case. af27f50 .github/workflows/test.yml: Update OpenSSL versions d277123 skip failing test with truffleruby and ubuntu-22.04 25352f4 Exclude truffleruby with macos-latest d7f90c7 Fix missing needs call 0640664 Try to run with TruffleRuby aeee125 Use ruby/actions/.github/workflows/ruby_versions.yml@master fd40742 .github/workflows/test.yml: update LibreSSL versions ff2fe4b Strip trailing spaces [ci skip] 9c24dcc Actions - Use Ubuntu 20.04 for 1.1.1 CI, misc fixes cc876f5 [CI] test.yml - test-openssls - use 1.1.1q, 3.0.5 0fb8d1b [CI] add Ubuntu-22.04 and update mswin, all are OpenSSL 3 1588686 Merge pull request ruby#505 from ruby/update-actions 9f901dc Test on LibreSSL 3.4 and 3.5 f2d072c Use actions/checkout@v3 699e274 Added 3.1 b28df90 Install openssl with vcpkg on mswin
1 parent cf229f5 commit ee9e162

File tree

1 file changed

+71
-47
lines changed

1 file changed

+71
-47
lines changed

.github/workflows/test.yml

Lines changed: 71 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,36 @@ name: CI
33
on: [push, pull_request]
44

55
jobs:
6+
ruby-versions:
7+
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
8+
with:
9+
engine: cruby-truffleruby
10+
min_version: 2.6
611
test:
12+
needs: ruby-versions
713
name: >-
814
${{ matrix.os }} ${{ matrix.ruby }}
915
runs-on: ${{ matrix.os }}
1016
strategy:
1117
fail-fast: false
1218
matrix:
13-
# ubuntu-latest is 22.04, uses OpenSSL 3
14-
os: [ ubuntu-20.04, macos-latest ]
15-
ruby: [ head, "3.0", "2.7", "2.6" ]
19+
# ubuntu-22.04 uses OpenSSL 3.0, ubuntu-20.04 uses OpenSSL 1.1.1
20+
os: [ ubuntu-22.04, ubuntu-20.04, macos-latest, windows-latest ]
21+
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
22+
exclude:
23+
# uses non-standard MSYS2 OpenSSL 3 package
24+
- { os: windows-latest, ruby: head }
25+
- { os: windows-latest, ruby: truffleruby }
26+
- { os: windows-latest, ruby: truffleruby-head }
27+
- { os: macos-latest, ruby: truffleruby }
28+
- { os: ubuntu-20.04, ruby: truffleruby }
29+
include:
30+
- { os: windows-latest, ruby: ucrt }
31+
- { os: windows-latest, ruby: mswin }
32+
1633
steps:
1734
- name: repo checkout
18-
uses: actions/checkout@v3
35+
uses: actions/checkout@v4
1936

2037
- name: load ruby
2138
uses: ruby/setup-ruby@v1
@@ -25,75 +42,73 @@ jobs:
2542
- name: depends
2643
run: bundle install
2744

28-
- name: compile
29-
run: rake compile -- --enable-debug
45+
# Enable the verbose option in mkmf.rb to print the compiling commands.
46+
- name: enable mkmf verbose
47+
run: echo "MAKEFLAGS=V=1" >> $GITHUB_ENV
48+
if: runner.os == 'Linux' || runner.os == 'macOS'
3049

31-
- name: test
32-
run: rake test TESTOPTS="-v --no-show-detail-immediately" OSSL_MDEBUG=1
50+
- name: set flags to check compiler warnings.
51+
run: echo "RUBY_OPENSSL_EXTCFLAGS=-Werror" >> $GITHUB_ENV
52+
if: ${{ !matrix.skip-warnings }}
3353

34-
test-windows:
35-
name: >-
36-
${{ matrix.os }} ${{ matrix.ruby }}
37-
runs-on: ${{ matrix.os }}
38-
strategy:
39-
fail-fast: false
40-
matrix:
41-
os: [ windows-latest ]
42-
# current mswin build uses OpenSSL 3
43-
ruby: [ mingw, "3.0", "2.7", "2.6" ]
44-
steps:
45-
- name: repo checkout
46-
uses: actions/checkout@v3
47-
48-
- name: load ruby, install/update gcc, install openssl
49-
uses: MSP-Greg/setup-ruby-pkgs@v1
50-
with:
51-
ruby-version: ${{ matrix.ruby }}
52-
mingw: _upgrade_ openssl
53-
54-
- name: depends
55-
run: bundle install
56-
57-
# pkg-config is disabled because it can pick up the different OpenSSL installation
58-
# SSL_DIR is set as needed by MSP-Greg/setup-ruby-pkgs
59-
# only used with mswin
6054
- name: compile
61-
run: rake compile -- --enable-debug --without-pkg-config $env:SSL_DIR
55+
run: rake compile
6256

6357
- name: test
64-
run: rake test TESTOPTS="-v --no-show-detail-immediately" OSSL_MDEBUG=1
58+
run: rake test TESTOPTS="-v --no-show-detail-immediately"
59+
timeout-minutes: 5
6560

6661
test-openssls:
6762
name: >-
68-
${{ matrix.openssl }}
63+
${{ matrix.openssl }} ${{ matrix.name-extra || '' }}
6964
runs-on: ${{ matrix.os }}
7065
strategy:
7166
fail-fast: false
7267
matrix:
7368
os: [ ubuntu-latest ]
7469
ruby: [ "3.0" ]
7570
openssl:
71+
# https://www.openssl.org/source/
7672
- openssl-1.0.2u # EOL
7773
- openssl-1.1.0l # EOL
78-
- openssl-1.1.1l
79-
- openssl-3.0.1
74+
- openssl-1.1.1w # EOL
75+
- openssl-3.0.13
76+
- openssl-3.1.5
77+
- openssl-3.2.1
78+
- openssl-3.3.0
79+
# http://www.libressl.org/releases.html
8080
- libressl-3.1.5 # EOL
81-
- libressl-3.2.6
82-
- libressl-3.3.4
81+
- libressl-3.2.7 # EOL
82+
- libressl-3.3.6 # EOL
83+
- libressl-3.4.3 # EOL
84+
- libressl-3.5.3 # EOL
85+
- libressl-3.6.3 # EOL
86+
- libressl-3.7.3 # EOL
87+
- libressl-3.8.4
88+
- libressl-3.9.1
8389
steps:
8490
- name: repo checkout
85-
uses: actions/checkout@v3
91+
uses: actions/checkout@v4
8692

8793
- name: prepare openssl
8894
run: |
95+
# Enable Bash debugging option temporarily for debugging use.
96+
set -x
8997
mkdir -p tmp/build-openssl && cd tmp/build-openssl
9098
case ${{ matrix.openssl }} in
9199
openssl-*)
92-
curl -OL https://ftp.openssl.org/source/${{ matrix.openssl }}.tar.gz
93-
tar xf ${{ matrix.openssl }}.tar.gz && cd ${{ matrix.openssl }}
100+
if [ -z "${{ matrix.git }}" ]; then
101+
curl -OL https://ftp.openssl.org/source/${{ matrix.openssl }}.tar.gz
102+
tar xf ${{ matrix.openssl }}.tar.gz && cd ${{ matrix.openssl }}
103+
else
104+
git clone -b ${{ matrix.branch }} --depth 1 ${{ matrix.git }} ${{ matrix.openssl }}
105+
cd ${{ matrix.openssl }}
106+
# Log the commit hash.
107+
echo "Git commit: $(git rev-parse HEAD)"
108+
fi
94109
# shared is required for 1.0.x.
95110
./Configure --prefix=$HOME/.openssl/${{ matrix.openssl }} --libdir=lib \
96-
shared linux-x86_64
111+
shared linux-x86_64 ${{ matrix.append-configure }}
97112
make depend
98113
;;
99114
libressl-*)
@@ -116,8 +131,17 @@ jobs:
116131
- name: depends
117132
run: bundle install
118133

134+
- name: enable mkmf verbose
135+
run: echo "MAKEFLAGS=V=1" >> $GITHUB_ENV
136+
if: runner.os == 'Linux' || runner.os == 'macOS'
137+
138+
- name: set flags to check compiler warnings.
139+
run: echo "RUBY_OPENSSL_EXTCFLAGS=-Werror" >> $GITHUB_ENV
140+
if: ${{ !matrix.skip-warnings }}
141+
119142
- name: compile
120-
run: rake compile -- --enable-debug --with-openssl-dir=$HOME/.openssl/${{ matrix.openssl }}
143+
run: rake compile -- --with-openssl-dir=$HOME/.openssl/${{ matrix.openssl }}
121144

122145
- name: test
123-
run: rake test TESTOPTS="-v --no-show-detail-immediately" OSSL_MDEBUG=1
146+
run: rake test TESTOPTS="-v --no-show-detail-immediately"
147+
timeout-minutes: 5

0 commit comments

Comments
 (0)