diff --git a/.github/actions/install/danielaparker-jsoncons/action.yml b/.github/actions/install/danielaparker-jsoncons/action.yml index f8f18d72a..e29bbd004 100644 --- a/.github/actions/install/danielaparker-jsoncons/action.yml +++ b/.github/actions/install/danielaparker-jsoncons/action.yml @@ -8,11 +8,5 @@ inputs: runs: using: composite steps: - - run: | - cd /tmp - wget https://github.com/danielaparker/jsoncons/archive/v${{ inputs.version }}.tar.gz - tar -zxf /tmp/v${{ inputs.version }}.tar.gz - cd jsoncons-${{ inputs.version }} - cmake . - sudo cmake --install . + - run: ${{ github.action_path }}/install-jsoncons.sh ${{ inputs.version }} shell: bash diff --git a/.github/actions/install/danielaparker-jsoncons/install-jsoncons.sh b/.github/actions/install/danielaparker-jsoncons/install-jsoncons.sh new file mode 100755 index 000000000..18bf37dc7 --- /dev/null +++ b/.github/actions/install/danielaparker-jsoncons/install-jsoncons.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env bash +# Install jsoncons library with specified version + +set -e # Exit on error + +# Check if version is provided +if [[ -z "$1" ]] || [[ "$1" == "-h" ]] || [[ "$1" == "--help" ]]; then + echo "Usage: $0 VERSION" + echo "" + echo "Install jsoncons library" + echo "" + echo "Arguments:" + echo " VERSION jsoncons version to install (required)" + echo "" + echo "Examples:" + echo " $0 1.5.0" + echo " $0 1.4.3" + echo " $0 1.3.2" + exit 1 +fi + +# Configuration +JSONCONS_VERSION="$1" +INSTALL_DIR="/tmp" +BUILD_DIR="${INSTALL_DIR}/jsoncons-${JSONCONS_VERSION}" + +echo "Installing jsoncons v${JSONCONS_VERSION}..." + +# Download +echo "Downloading jsoncons v${JSONCONS_VERSION}..." +cd "${INSTALL_DIR}" +wget -q "https://github.com/danielaparker/jsoncons/archive/v${JSONCONS_VERSION}.tar.gz" + +# Extract +echo "Extracting archive..." +tar -zxf "v${JSONCONS_VERSION}.tar.gz" + +# Build and install +echo "Building and installing..." +cd "${BUILD_DIR}" +cmake . -DCMAKE_BUILD_TYPE=Release +sudo cmake --install . + +# Cleanup +echo "Cleaning up..." +rm -f "${INSTALL_DIR}/v${JSONCONS_VERSION}.tar.gz" +rm -rf "${BUILD_DIR}" + +echo "✓ jsoncons v${JSONCONS_VERSION} installed successfully!" diff --git a/.github/actions/install/libressl/action.yml b/.github/actions/install/libressl/action.yml index 7e5b190f0..55cdc4c0f 100644 --- a/.github/actions/install/libressl/action.yml +++ b/.github/actions/install/libressl/action.yml @@ -8,12 +8,5 @@ inputs: runs: using: composite steps: - - run: | - wget https://raw.githubusercontent.com/libressl-portable/portable/v${{ inputs.version }}/FindLibreSSL.cmake -P cmake/ - cd /tmp - wget https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-${{ inputs.version }}.tar.gz - tar -zvxf /tmp/libressl-${{ inputs.version }}.tar.gz - cd libressl-${{ inputs.version }} - ./configure - sudo make -j $(nproc) install + - run: ${{ github.action_path }}/install-libressl.sh ${{ inputs.version }} shell: bash diff --git a/.github/actions/install/libressl/install-libressl.sh b/.github/actions/install/libressl/install-libressl.sh new file mode 100755 index 000000000..e95bfa8f8 --- /dev/null +++ b/.github/actions/install/libressl/install-libressl.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +# Install LibreSSL library with specified version + +set -e # Exit on error + +# Check if version is provided +if [[ -z "$1" ]] || [[ "$1" == "-h" ]] || [[ "$1" == "--help" ]]; then + echo "Usage: $0 VERSION" + echo "" + echo "Install libreSSL library" + echo "" + echo "Arguments:" + echo " VERSION libreSSL version to install (required)" + echo "" + echo "Examples:" + echo " $0 4.2.1" + echo " $0 4.1.2" + echo " $0 3.9.4" + exit 1 +fi + +LIBRESSL_VERSION="$1" + +wget https://raw.githubusercontent.com/libressl-portable/portable/v${LIBRESSL_VERSION}/FindLibreSSL.cmake -P cmake/ +cd /tmp +wget https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-${LIBRESSL_VERSION}.tar.gz +tar -zvxf /tmp/libressl-${LIBRESSL_VERSION}.tar.gz +cd libressl-${LIBRESSL_VERSION} +./configure +sudo make -j $(nproc) install diff --git a/.github/actions/install/wolfssl/action.yml b/.github/actions/install/wolfssl/action.yml index bced14743..013cdb98e 100644 --- a/.github/actions/install/wolfssl/action.yml +++ b/.github/actions/install/wolfssl/action.yml @@ -8,15 +8,7 @@ inputs: runs: using: composite steps: - - run: | - cd /tmp - wget -O wolfssl.tar.gz https://github.com/wolfSSL/wolfssl/archive/${{ inputs.version }}.tar.gz - tar -zxf /tmp/wolfssl.tar.gz - cd wolfssl-* - autoreconf -fiv - ./configure --enable-opensslall --enable-opensslextra --disable-examples --disable-crypttests --enable-harden --enable-all --enable-all-crypto - make - sudo make install + - run: ${{ github.action_path }}/install-wolfssl.sh ${{ inputs.version }} shell: bash - run: sudo rm -rf /usr/include/openssl shell: bash diff --git a/.github/actions/install/wolfssl/install-wolfssl.sh b/.github/actions/install/wolfssl/install-wolfssl.sh new file mode 100755 index 000000000..845ae2421 --- /dev/null +++ b/.github/actions/install/wolfssl/install-wolfssl.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash +# Install wolfSSL library with specified version + +set -e # Exit on error + +# Check if version is provided +if [[ -z "$1" ]] || [[ "$1" == "-h" ]] || [[ "$1" == "--help" ]]; then + echo "Usage: $0 VERSION" + echo "" + echo "Install wolfSSL library" + echo "" + echo "Arguments:" + echo " VERSION wolfSSL version to install (required)" + echo "" + echo "Examples:" + echo " $0 4.2.1" + echo " $0 4.1.2" + echo " $0 3.9.4" + exit 1 +fi + +WOLFSSL_VERSION="$1" + +cd /tmp +wget -O wolfssl.tar.gz https://github.com/wolfSSL/wolfssl/archive/$WOLFSSL_VERSION.tar.gz +tar -zxf /tmp/wolfssl.tar.gz +cd wolfssl-* +autoreconf -fiv +./configure --enable-opensslall --enable-opensslextra --disable-examples --disable-crypttests --enable-harden --enable-all --enable-all-crypto +make +sudo make install