8
8
with :
9
9
engine : cruby-truffleruby
10
10
min_version : 2.7
11
+
11
12
test :
12
13
needs : ruby-versions
13
14
name : >-
20
21
os : [ ubuntu-22.04, ubuntu-20.04, macos-latest, windows-latest ]
21
22
ruby : ${{ fromJson(needs.ruby-versions.outputs.versions) }}
22
23
exclude :
23
- # uses non-standard MSYS2 OpenSSL 3 package
24
- - { os: windows-latest, ruby: head }
25
24
- { os: windows-latest, ruby: truffleruby }
26
25
- { os: windows-latest, ruby: truffleruby-head }
27
- - { os: macos-latest, ruby: truffleruby }
28
- - { os: ubuntu-20.04, ruby: truffleruby }
29
26
include :
30
27
- { os: windows-latest, ruby: ucrt }
31
28
- { os: windows-latest, ruby: mswin }
@@ -38,44 +35,43 @@ jobs:
38
35
uses : ruby/setup-ruby@v1
39
36
with :
40
37
ruby-version : ${{ matrix.ruby }}
41
-
42
- - name : depends
43
- run : bundle install
38
+ bundler-cache : true # `bundle install` and cache
44
39
45
40
# Enable the verbose option in mkmf.rb to print the compiling commands.
46
41
- name : enable mkmf verbose
47
42
run : echo "MAKEFLAGS=V=1" >> $GITHUB_ENV
48
43
if : runner.os == 'Linux' || runner.os == 'macOS'
49
44
50
- - name : set flags to check compiler warnings.
45
+ - name : set flags to check compiler warnings
51
46
run : echo "RUBY_OPENSSL_EXTCFLAGS=-Werror" >> $GITHUB_ENV
52
47
if : ${{ !matrix.skip-warnings }}
53
48
54
- - name : compile
55
- run : rake compile
49
+ - name : rake compile
50
+ run : bundle exec rake compile
56
51
57
- - name : test
58
- run : rake test TESTOPTS="-v --no-show-detail-immediately"
52
+ - name : rake test
53
+ run : bundle exec rake test TESTOPTS="-v --no-show-detail-immediately"
59
54
timeout-minutes : 5
60
55
61
56
test-openssls :
62
57
name : >-
63
- ${{ matrix.openssl }} ${{ matrix.name-extra || '' }}
64
- runs-on : ${{ matrix.os }}
58
+ ${{ matrix.openssl }} ${{ matrix.name-extra }}
59
+ runs-on : ubuntu-latest
65
60
strategy :
66
61
fail-fast : false
67
62
matrix :
68
- os : [ ubuntu-latest ]
69
- ruby : [ "3.0" ]
63
+ name-extra : [ '' ]
70
64
openssl :
71
- # https://www. openssl.org/source/
65
+ # https://openssl-library .org/source/
72
66
- openssl-1.0.2u # EOL
73
67
- openssl-1.1.0l # EOL
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
68
+ - openssl-1.1.1w # EOL 2023-09-11, still used by RHEL 8 and Ubuntu 20.04
69
+ - openssl-3.0.15 # Supported until 2026-09-07
70
+ - openssl-3.1.7 # Supported until 2025-03-14
71
+ - openssl-3.2.3 # Supported until 2025-11-23
72
+ - openssl-3.3.2 # Supported until 2026-04-09
73
+ - openssl-3.4.0 # Supported until 2026-10-22
74
+ - openssl-master
79
75
# http://www.libressl.org/releases.html
80
76
- libressl-3.1.5 # EOL
81
77
- libressl-3.2.7 # EOL
@@ -84,93 +80,89 @@ jobs:
84
80
- libressl-3.5.3 # EOL
85
81
- libressl-3.6.3 # EOL
86
82
- libressl-3.7.3 # EOL
87
- - libressl-3.8.4
88
- - libressl-3.9.1
89
- fips-enabled : [ false ]
83
+ - libressl-3.8.4 # EOL 2024-10-16
84
+ - libressl-3.9.2 # Supported until 2025-04-05
85
+ - libressl-4.0.0
90
86
include :
91
- - { os: ubuntu-latest, ruby: "3.0", openssl: openssl-3.0.10, fips-enabled: true, append-configure: 'enable-fips', name-extra: 'fips' }
92
- - { os: ubuntu-latest, ruby: "3.0", openssl: openssl-3.1.2, fips-enabled: true, append-configure: 'enable-fips', name-extra: 'fips' }
93
- - { os: ubuntu-latest, ruby: "3.0", openssl: openssl-head, git: 'https://github.com/openssl/openssl.git', branch: 'master' }
94
- - { os: ubuntu-latest, ruby: "3.0", openssl: openssl-head, git: 'https://github.com/openssl/openssl.git', branch: 'master', fips-enabled: true, append-configure: 'enable-fips', name-extra: 'fips' }
87
+ - { name-extra: 'with fips provider', openssl: openssl-3.0.15, fips-enabled: true }
88
+ - { name-extra: 'with fips provider', openssl: openssl-3.1.7, fips-enabled: true }
89
+ - { name-extra: 'with fips provider', openssl: openssl-3.2.3, fips-enabled: true }
90
+ - { name-extra: 'with fips provider', openssl: openssl-3.3.2, fips-enabled: true }
91
+ - { name-extra: 'without legacy provider', openssl: openssl-3.4.0, append-configure: 'no-legacy' }
95
92
steps :
96
93
- name : repo checkout
97
94
uses : actions/checkout@v4
98
95
99
- - name : prepare openssl
96
+ - id : cache-openssl
97
+ uses : actions/cache@v4
98
+ with :
99
+ path : ~/openssl
100
+ key : openssl-${{ runner.os }}-${{ matrix.openssl }}-${{ matrix.append-configure || 'default' }}
101
+ if : matrix.openssl != 'openssl-master' && matrix.openssl != 'libressl-master'
102
+
103
+ - name : Compile OpenSSL library
104
+ if : steps.cache-openssl.outputs.cache-hit != 'true'
100
105
run : |
101
106
# Enable Bash debugging option temporarily for debugging use.
102
107
set -x
103
108
mkdir -p tmp/build-openssl && cd tmp/build-openssl
104
109
case ${{ matrix.openssl }} in
105
- openssl-*)
106
- if [ -z "${{ matrix.git }}" ]; then
107
- curl -OL https://openssl.org/source/${{ matrix.openssl }}.tar.gz
108
- tar xf ${{ matrix.openssl }}.tar.gz && cd ${{ matrix.openssl }}
109
- else
110
- git clone -b ${{ matrix.branch }} --depth 1 ${{ matrix.git }} ${{ matrix.openssl }}
111
- cd ${{ matrix.openssl }}
112
- # Log the commit hash.
113
- echo "Git commit: $(git rev-parse HEAD)"
114
- fi
110
+ openssl-1.*)
111
+ OPENSSL_COMMIT=$(echo ${{ matrix.openssl }} | sed -e 's/^openssl-/OpenSSL_/' | sed -e 's/\./_/g')
112
+ git clone -b $OPENSSL_COMMIT --depth 1 https://github.com/openssl/openssl.git .
113
+ echo "Git commit: $(git rev-parse HEAD)"
115
114
# shared is required for 1.0.x.
116
- ./Configure --prefix=$HOME/.openssl/${{ matrix.openssl }} --libdir=lib \
117
- shared linux-x86_64 ${{ matrix.append-configure }}
118
- make depend
115
+ ./Configure --prefix=$HOME/openssl --libdir=lib shared linux-x86_64
116
+ make depend && make -j4 && make install_sw
117
+ ;;
118
+ openssl-*)
119
+ OPENSSL_COMMIT=${{ matrix.openssl == 'openssl-master' && 'master' || matrix.openssl }}
120
+ git clone -b $OPENSSL_COMMIT --depth 1 https://github.com/openssl/openssl.git .
121
+ echo "Git commit: $(git rev-parse HEAD)"
122
+ ./Configure --prefix=$HOME/openssl --libdir=lib enable-fips ${{ matrix.append-configure }}
123
+ make -j4 && make install_sw && make install_fips
119
124
;;
120
125
libressl-*)
121
- curl -OL https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/${{ matrix.openssl }}.tar.gz
122
- tar xf ${{ matrix.openssl }}.tar.gz && cd ${{ matrix.openssl }}
123
- ./configure --prefix=$HOME/.openssl/${{ matrix.openssl }}
126
+ curl -L https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/${{ matrix.openssl }}.tar.gz | \
127
+ tar xzf - --strip-components=1
128
+ ./configure --prefix=$HOME/openssl
129
+ make -j4 && make install
124
130
;;
125
131
*)
126
132
false
127
133
;;
128
134
esac
129
- make -j4
130
- make install_sw
131
-
132
- - name : prepare openssl fips
133
- run : make install_fips
134
- working-directory : tmp/build-openssl/${{ matrix.openssl }}
135
- if : matrix.fips-enabled
136
-
137
- - name : set the open installed directory
138
- run : >
139
- sed -e "s|OPENSSL_DIR|$HOME/.openssl/${{ matrix.openssl }}|"
140
- tool/openssl_fips.cnf.tmpl > tmp/openssl_fips.cnf
141
- if : matrix.fips-enabled
142
-
143
- - name : set openssl config file path for fips.
144
- run : echo "OPENSSL_CONF=$(pwd)/tmp/openssl_fips.cnf" >> $GITHUB_ENV
145
- if : matrix.fips-enabled
146
135
147
136
- name : load ruby
148
137
uses : ruby/setup-ruby@v1
149
138
with :
150
- ruby-version : ${{ matrix.ruby }}
151
-
152
- - name : depends
153
- run : bundle install
139
+ ruby-version : ' 3.0'
140
+ bundler-cache : true
154
141
155
142
- name : enable mkmf verbose
156
143
run : echo "MAKEFLAGS=V=1" >> $GITHUB_ENV
157
- if : runner.os == 'Linux' || runner.os == 'macOS'
158
144
159
- - name : set flags to check compiler warnings.
145
+ - name : set flags to check compiler warnings
160
146
run : echo "RUBY_OPENSSL_EXTCFLAGS=-Werror" >> $GITHUB_ENV
161
147
if : ${{ !matrix.skip-warnings }}
162
148
163
- - name : compile
164
- run : rake compile -- --with-openssl-dir=$HOME/. openssl/${{ matrix.openssl }}
149
+ - name : rake compile
150
+ run : bundle exec rake compile -- --with-openssl-dir=$HOME/openssl
165
151
166
- - name : test
167
- run : rake test TESTOPTS="-v --no-show-detail-immediately"
152
+ - name : setup OpenSSL config file for fips
153
+ run : |
154
+ sed -e "s|OPENSSL_DIR|$HOME/openssl|" tool/openssl_fips.cnf.tmpl > tmp/openssl_fips.cnf
155
+ echo "OPENSSL_CONF=$(pwd)/tmp/openssl_fips.cnf" >> $GITHUB_ENV
156
+ if : matrix.fips-enabled
157
+
158
+ - name : rake test
159
+ run : bundle exec rake test TESTOPTS="-v --no-show-detail-immediately"
168
160
timeout-minutes : 5
169
161
if : ${{ !matrix.fips-enabled }}
170
162
171
163
# Run only the passing tests on the FIPS module as a temporary workaround.
172
164
# TODO Fix other tests, and run all the tests on FIPS module.
173
- - name : test on fips module
174
- run : |
175
- rake test_fips TESTOPTS="-v --no-show-detail-immediately"
165
+ - name : rake test_fips
166
+ run : bundle exec rake test_fips TESTOPTS="-v --no-show-detail-immediately"
167
+ timeout-minutes : 5
176
168
if : matrix.fips-enabled
0 commit comments