Skip to content

Commit

Permalink
get version string from OpenSSL in GitHub Actions
Browse files Browse the repository at this point in the history
Signed-off-by: Fs <[email protected]>
  • Loading branch information
Fsu0413 committed Dec 12, 2023
1 parent 6287da0 commit a6d46af
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .github/Scripts-For-Actions/get-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

REALP="$(cd "$(dirname "$0")" ; pwd)"
. "${REALP}/../../openssl/VERSION.dat"
echo "OPENSSL_VERSION=${MAJOR}.${MINOR}.${PATCH}"
31 changes: 28 additions & 3 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,21 @@ name: CMake

on: [push]

env:
FS_OPENSSL_VERSION_STR: "3.1.4"

jobs:
get-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
path: openssl-externalCMake
- name: Get the version of OpenSSL
id: getversion
run: |
"${{ github.workspace }}/openssl-externalCMake/.github/Scripts-For-Actions/get-version.sh" >> "$GITHUB_OUTPUT"
outputs:
openssl_version: ${{ steps.getversion.outputs.OPENSSL_VERSION }}

build-ubuntu:
strategy:
fail-fast: false
Expand All @@ -17,8 +28,10 @@ jobs:
continue-on-error: true
runs-on: ubuntu-${{ matrix.runner }}
name: "build-ubuntu-${{ matrix.runner }} (ASM: ${{ matrix.asm }}, Zlib: ${{ matrix.zlib }}), Threads: ${{ matrix.threads }}"
needs: get-version
env:
FS_OPENSSL_PACKAGE_STR: Ubuntu${{ matrix.runner }}-x86_64-ASM${{ matrix.asm }}-Zlib${{ matrix.zlib }}-Threads${{ matrix.threads }}
FS_OPENSSL_VERSION_STR: ${{ needs.get-version.outputs.openssl_version }}
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -60,8 +73,10 @@ jobs:
continue-on-error: true
runs-on: macos-${{ matrix.runner }}
name: "build-macOS${{ matrix.runner }}-x86_64 (ASM: ${{ matrix.asm }}, Zlib: ${{ matrix.zlib }}, Threads: ${{ matrix.threads }}"
needs: get-version
env:
FS_OPENSSL_PACKAGE_STR: macOS${{ matrix.runner }}-x86_64-ASM${{ matrix.asm }}-Zlib${{ matrix.zlib }}-Threads${{ matrix.threads }}
FS_OPENSSL_VERSION_STR: ${{ needs.get-version.outputs.openssl_version }}
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -101,8 +116,10 @@ jobs:
continue-on-error: true
runs-on: macos-${{ matrix.runner }}
name: "build-macOS${{ matrix.runner }}-aarch64 (ASM: ${{ matrix.asm }}, Zlib: ${{ matrix.zlib }}, Threads: ${{ matrix.threads }}"
needs: get-version
env:
FS_OPENSSL_PACKAGE_STR: macOS${{ matrix.runner }}-aarch64-ASM${{ matrix.asm }}-Zlib${{ matrix.zlib }}-Threads${{ matrix.threads }}
FS_OPENSSL_VERSION_STR: ${{ needs.get-version.outputs.openssl_version }}
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -139,8 +156,10 @@ jobs:
continue-on-error: true
runs-on: macos-${{ matrix.runner }}
name: "build-macOS${{ matrix.runner }}-unified (Zlib: ${{ matrix.zlib }}, Threads: ${{ matrix.threads }}"
needs: get-version
env:
FS_OPENSSL_PACKAGE_STR: macOS${{ matrix.runner }}-unified-Zlib${{ matrix.zlib }}-Threads${{ matrix.threads }}
FS_OPENSSL_VERSION_STR: ${{ needs.get-version.outputs.openssl_version }}
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -188,8 +207,10 @@ jobs:
continue-on-error: true
runs-on: windows-latest
name: "build-MinGW-GCC${{ matrix.toolchain.version }}-${{ matrix.toolchain.bit }}bit (ASM: ${{ matrix.asm }}, Threads: ${{ matrix.threads }}"
needs: get-version
env:
FS_OPENSSL_PACKAGE_STR: MinGWGCC${{ matrix.toolchain.version }}-${{ matrix.toolchain.arch }}-ASM${{ matrix.asm }}-Threads${{ matrix.threads }}
FS_OPENSSL_VERSION_STR: ${{ needs.get-version.outputs.openssl_version }}
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -253,8 +274,10 @@ jobs:
continue-on-error: true
runs-on: windows-${{ matrix.toolchain.runson }}
name: "build-MSVC${{ matrix.toolchain.version }}-${{ matrix.toolchain.bit }}bit (ASM: ${{ matrix.asm }})"
needs: get-version
env:
FS_OPENSSL_PACKAGE_STR: MSVC${{ matrix.toolchain.version }}-${{ matrix.toolchain.arch }}-ASM${{ matrix.asm }}
FS_OPENSSL_VERSION_STR: ${{ needs.get-version.outputs.openssl_version }}
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -318,8 +341,10 @@ jobs:
continue-on-error: true
runs-on: ubuntu-latest
name: "build-AndroidAPI${{ matrix.toolchain.platform }}-${{ matrix.toolchain.arch }} (ASM: ${{ matrix.asm }}, Zlib: ${{ matrix.zlib }}), Threads: ${{ matrix.threads }}"
needs: get-version
env:
FS_OPENSSL_PACKAGE_STR: AndroidAPI${{ matrix.toolchain.platform }}-${{ matrix.toolchain.arch }}}-ASM${{ matrix.asm }}Zlib${{ matrix.zlib }}-Threads${{ matrix.threads }}
FS_OPENSSL_VERSION_STR: ${{ needs.get-version.outputs.openssl_version }}
steps:
- uses: actions/checkout@v3
with:
Expand Down

0 comments on commit a6d46af

Please sign in to comment.