Skip to content

Commit

Permalink
Ignore errors and validate installed version
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota committed Nov 11, 2024
1 parent 88c9116 commit ea9328d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/openssl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,18 @@ jobs:
- name: Uninstall openssl and conflicts
run: apk del openssl-dev openssl-libs-static libxml2-static
- name: Install ${{ matrix.pkg }}
run: apk add "${{ matrix.pkg }}" --repository=${{ matrix.repository }}
# `apk add` may exit with a failure status due to some file incompatibilities,
# but still install all the necessary parts for our purposes. So we ignore failure.
# Reason: ERROR: libressl2.7-libcrypto-2.7.5-r0: trying to overwrite etc/ssl/openssl.cnf owned by libcrypto3-3.3.2-r0.
run: apk add "${{ matrix.pkg }}" --repository=${{ matrix.repository }} || true
- name: Print LibSSL version
run: bin/crystal eval 'require "openssl"; p! LibSSL::OPENSSL_VERSION, LibSSL::LIBRESSL_VERSION'
run: |
bin/crystal eval <<CRYSTAL
require "openssl"
p! LibSSL::OPENSSL_VERSION, LibSSL::LIBRESSL_VERSION
restriction = "${{ matrix.pkg}}".partition("=~")[2]
version = "${{ matrix.pkg }}".starts_with?("openssl") ?LibSSL::OPENSSL_VERSION : LibSSL::LIBRE_VERSION
exit version.starts_with?(restriction) ? 0 : 1
CRYSTAL
- name: Run OpenSSL specs
run: bin/crystal spec --order=random spec/std/openssl/

0 comments on commit ea9328d

Please sign in to comment.