Skip to content

Commit

Permalink
CI: Refactor SSL workflow with job matrix (#14899)
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota committed Aug 19, 2024
1 parent 95a761e commit 1237210
Showing 1 changed file with 23 additions and 84 deletions.
107 changes: 23 additions & 84 deletions .github/workflows/openssl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,95 +7,34 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
openssl3_0:
libssl_test:
runs-on: ubuntu-latest
name: "OpenSSL 3.0"
name: "${{ matrix.pkg }}"
container: crystallang/crystal:1.13.1-alpine
strategy:
fail-fast: false
matrix:
include:
- pkg: "openssl1.1-compat-dev=~1.1.1"
repository: http://dl-cdn.alpinelinux.org/alpine/v3.18/community
- pkg: "openssl-dev=~3.0"
repository: http://dl-cdn.alpinelinux.org/alpine/v3.17/main
- pkg: "openssl-dev=~3.3"
repository: http://dl-cdn.alpinelinux.org/alpine/v3.20/main
- pkg: "libressl-dev=~3.4"
repository: http://dl-cdn.alpinelinux.org/alpine/v3.15/community
- pkg: "libressl-dev=~3.5"
repository: http://dl-cdn.alpinelinux.org/alpine/v3.16/community
- pkg: "libressl-dev=~3.8"
repository: http://dl-cdn.alpinelinux.org/alpine/v3.20/community
steps:
- name: Download Crystal source
uses: actions/checkout@v4
- name: Uninstall openssl
run: apk del openssl-dev libxml2-static
- name: Upgrade alpine-keys
run: apk upgrade alpine-keys
- name: Install openssl 3.0
run: apk add "openssl-dev=~3.0" --repository=http://dl-cdn.alpinelinux.org/alpine/v3.17/main
- name: Check LibSSL version
run: bin/crystal eval 'require "openssl"; p! LibSSL::OPENSSL_VERSION, LibSSL::LIBRESSL_VERSION'
- name: Run OpenSSL specs
run: bin/crystal spec --order=random spec/std/openssl/
openssl3_3:
runs-on: ubuntu-latest
name: "OpenSSL 3.3"
container: crystallang/crystal:1.13.1-alpine
steps:
- name: Download Crystal source
uses: actions/checkout@v4
- name: Install openssl 3.3
run: apk add "openssl-dev=~3.3" --repository=http://dl-cdn.alpinelinux.org/alpine/v3.20/community
- name: Check LibSSL version
run: bin/crystal eval 'require "openssl"; p! LibSSL::OPENSSL_VERSION, LibSSL::LIBRESSL_VERSION'
- name: Run OpenSSL specs
run: bin/crystal spec --order=random spec/std/openssl/
openssl111:
runs-on: ubuntu-latest
name: "OpenSSL 1.1.1"
container: crystallang/crystal:1.13.1-alpine
steps:
- name: Download Crystal source
uses: actions/checkout@v4
- name: Uninstall openssl
run: apk del openssl-dev
- name: Install openssl 1.1.1
run: apk add "openssl1.1-compat-dev=~1.1.1" --repository=http://dl-cdn.alpinelinux.org/alpine/v3.18/community
- name: Check LibSSL version
run: bin/crystal eval 'require "openssl"; p! LibSSL::OPENSSL_VERSION, LibSSL::LIBRESSL_VERSION'
- name: Run OpenSSL specs
run: bin/crystal spec --order=random spec/std/openssl/
libressl34:
runs-on: ubuntu-latest
name: "LibreSSL 3.4"
container: crystallang/crystal:1.13.1-alpine
steps:
- name: Download Crystal source
uses: actions/checkout@v4
- name: Uninstall openssl
run: apk del openssl-dev openssl-libs-static
- name: Upgrade alpine-keys
run: apk upgrade alpine-keys
- name: Install libressl 3.4
run: apk add "libressl-dev=~3.4" --repository=http://dl-cdn.alpinelinux.org/alpine/v3.15/community
- name: Check LibSSL version
run: bin/crystal eval 'require "openssl"; p! LibSSL::OPENSSL_VERSION, LibSSL::LIBRESSL_VERSION'
- name: Run OpenSSL specs
run: bin/crystal spec --order=random spec/std/openssl/
libressl35:
runs-on: ubuntu-latest
name: "LibreSSL 3.5"
container: crystallang/crystal:1.13.1-alpine
steps:
- name: Download Crystal source
uses: actions/checkout@v2
- name: Uninstall openssl
run: apk del openssl-dev openssl-libs-static
- name: Install libressl 3.5
run: apk add "libressl-dev=~3.5" --repository=http://dl-cdn.alpinelinux.org/alpine/v3.16/community
- name: Check LibSSL version
run: bin/crystal eval 'require "openssl"; p! LibSSL::OPENSSL_VERSION, LibSSL::LIBRESSL_VERSION'
- name: Run OpenSSL specs
run: bin/crystal spec --order=random spec/std/openssl/
libressl38:
runs-on: ubuntu-latest
name: "LibreSSL 3.5"
container: crystallang/crystal:1.13.1-alpine
steps:
- name: Download Crystal source
uses: actions/checkout@v2
- name: Uninstall openssl
run: apk del openssl-dev openssl-libs-static
- name: Install libressl 3.8
run: apk add "libressl-dev=~3.8" --repository=http://dl-cdn.alpinelinux.org/alpine/v3.20/community
- name: Check LibSSL version
- 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 }}
- name: Print LibSSL version
run: bin/crystal eval 'require "openssl"; p! LibSSL::OPENSSL_VERSION, LibSSL::LIBRESSL_VERSION'
- name: Run OpenSSL specs
run: bin/crystal spec --order=random spec/std/openssl/

0 comments on commit 1237210

Please sign in to comment.