diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2020-02-26 10:35:26 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2020-02-26 11:26:44 +0900 |
commit | bda78decdcd3a08c334adabec071f79528203c52 (patch) | |
tree | 68f5ec2faf83500f1c9ad5ed67bd2aae55483521 /.github | |
parent | 2123c6ac0772b83005d50768784d47c515768b09 (diff) | |
download | ruby-openssl-bda78decdcd3a08c334adabec071f79528203c52.tar.gz |
.github/workflows: test against different OpenSSL versions
Compile OpenSSL and LibreSSL on-the-fly and run our test suite against
the OpenSSL installation.
Compiling OpenSSL or LibreSSL takes about 1.5 - 2 minutes on a GitHub-
hosted runner.
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/test.yml | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6d72e4d2..c8d24472 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -71,3 +71,67 @@ jobs: - name: test run: rake test TESTOPTS="-v --no-show-detail-immediately" OSSL_MDEBUG=1 + + test-openssls: + name: >- + ${{ matrix.openssl }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest ] + ruby: [ 2.7 ] + openssl: + - openssl-1.0.1u # EOL + - openssl-1.0.2u # EOL + - openssl-1.1.0l # EOL + - openssl-1.1.1d + # - libressl-2.3.7 # EOL + # - libressl-2.4.5 # EOL + # - libressl-2.5.5 # EOL + # - libressl-2.6.5 # EOL + - libressl-2.7.5 # EOL + - libressl-2.8.3 # EOL + - libressl-2.9.2 + - libressl-3.0.2 + steps: + - name: repo checkout + uses: actions/checkout@v2 + + - name: prepare openssl + run: | + mkdir -p tmp/build-openssl && cd tmp/build-openssl + case ${{ matrix.openssl }} in + openssl-*) + curl -OL https://ftp.openssl.org/source/${{ matrix.openssl }}.tar.gz + tar xf ${{ matrix.openssl }}.tar.gz && cd ${{ matrix.openssl }} + # shared is required for 1.0.x. + ./Configure --prefix=$HOME/.openssl/${{ matrix.openssl }} \ + shared linux-x86_64 + make depend + ;; + libressl-*) + curl -OL https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/${{ matrix.openssl }}.tar.gz + tar xf ${{ matrix.openssl }}.tar.gz && cd ${{ matrix.openssl }} + ./configure --prefix=$HOME/.openssl/${{ matrix.openssl }} + ;; + *) + false + ;; + esac + make -j4 + make install_sw + + - name: load ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + + - name: depends + run: rake install_dependencies + + - name: compile + run: rake compile -- --enable-debug --with-openssl-dir=$HOME/.openssl/${{ matrix.openssl }} + + - name: test + run: rake test TESTOPTS="-v --no-show-detail-immediately" OSSL_MDEBUG=1 |