From 815248a7bd69ae46feeddbcf33d0f12f54f3bf13 Mon Sep 17 00:00:00 2001 From: Aidan Garske Date: Tue, 17 Jun 2025 11:38:52 -0700 Subject: [PATCH 01/17] Experimental support for ubuntu-24-04-arm runner for workflows --- .github/workflows/build-wolfprovider.yml | 23 ++++++++------ .github/workflows/cjose.yml | 5 +-- .github/workflows/codespell.yml | 7 ++++- .github/workflows/curl.yml | 7 +++-- .github/workflows/grpc.yml | 8 ++--- .github/workflows/iperf.yml | 5 +-- .github/workflows/ipmitool.yml | 6 ++-- .github/workflows/liboauth2.yml | 7 +++-- .github/workflows/multi-compiler.yml | 39 ++++++------------------ .github/workflows/net-snmp.yml | 5 +-- .github/workflows/nginx.yml | 5 +-- .github/workflows/openldap.yml | 6 ++-- .github/workflows/openssh.yml | 5 +-- .github/workflows/openvpn.yml | 5 +-- .github/workflows/simple.yml | 31 ++++++------------- .github/workflows/socat.yml | 6 ++-- .github/workflows/sssd.yml | 24 ++++++--------- .github/workflows/stunnel.yml | 5 +-- .github/workflows/tcpdump.yml | 12 ++++---- 19 files changed, 95 insertions(+), 116 deletions(-) diff --git a/.github/workflows/build-wolfprovider.yml b/.github/workflows/build-wolfprovider.yml index 68bbc0bd..a70b521f 100644 --- a/.github/workflows/build-wolfprovider.yml +++ b/.github/workflows/build-wolfprovider.yml @@ -17,14 +17,17 @@ on: jobs: build_wolfprovider_common: name: Build wolfProvider - runs-on: ubuntu-22.04 + strategy: + matrix: + os: [ubuntu-22.04, ubuntu-24.04-arm] + runs-on: ${{ matrix.os }} timeout-minutes: 20 outputs: - cache_key: wolfprov-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }} + cache_key: wolfprov-${{ matrix.os }}-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }} steps: # Check if this version of wolfssl/wolfprovider has already been built, # mark to cache these items on post if we do end up building - # On a push, the first workflow(s) will complete the build and cache it + # On a push, the first workflow(s) will complete the build and cache it # and any delayed workflow will be able to utilize it. # This is not designed to cache builds across commits. - name: Checking wolfSSL/wolfProvider in cache @@ -39,7 +42,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os }}-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }} lookup-only: true # if cache hit, exit the workflow @@ -112,27 +115,27 @@ jobs: run: | OPENSSL_TAG=${{ inputs.openssl_ref }} WOLFSSL_TAG=${{ inputs.wolfssl_ref }} ./scripts/build-wolfprovider.sh - # This is potentially chewing up a lot of cache space. + # This is potentially chewing up a lot of cache space. # Could investigate reducing the size of this cache. - # Note that we use actions/cache/save and actions/cache/restore instead of + # Note that we use actions/cache/save and actions/cache/restore instead of # actions/cache to reduce the chance of a cache lock issue. - name: Save wolfProvider into cache if: steps.wolfprov-cache.outputs.cache-hit != 'true' uses: actions/cache/save@v4 - with: + with: path: | wolfssl-source wolfssl-install wolfprov-install openssl-install provider.conf - key: wolfprov-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os }}-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }} # If openssl cache miss, save it to the cache - name: Save OpenSSL into cache if: steps.openssl-cache.outputs.cache-hit != 'true' uses: actions/cache/save@v4 - with: + with: path: | openssl-source openssl-install @@ -141,7 +144,7 @@ jobs: - name: Save WolfSSL into cache if: steps.wolfssl-cache.outputs.cache-hit != 'true' uses: actions/cache/save@v4 - with: + with: path: | wolfssl-source wolfssl-install diff --git a/.github/workflows/cjose.yml b/.github/workflows/cjose.yml index de825c77..719a9ef4 100644 --- a/.github/workflows/cjose.yml +++ b/.github/workflows/cjose.yml @@ -24,16 +24,17 @@ jobs: openssl_ref: [ 'openssl-3.5.0' ] test_cjose: - runs-on: ubuntu-22.04 needs: build_wolfprovider # This should be a safe limit for the tests to run. timeout-minutes: 20 strategy: matrix: + os: [ubuntu-22.04, ubuntu-24.04-arm] cjose_ref: [ 'master', 'v0.6.2.1' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] force_fail: [ 'WOLFPROV_FORCE_FAIL=1', '' ] + runs-on: ${{ matrix.os }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 @@ -52,7 +53,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true - name: Install cjose dependencies diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index 374e61bc..f2c3ff71 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -15,11 +15,16 @@ concurrency: jobs: codespell: name: Check for spelling errors - runs-on: ubuntu-22.04 + strategy: + matrix: + os: [ubuntu-22.04, ubuntu-24.04-arm] + runs-on: ${{ matrix.os }} timeout-minutes: 5 steps: - name: Checkout wolfProvider uses: actions/checkout@v4 + with: + fetch-depth: 1 - name: Create exclude file if needed run: | diff --git a/.github/workflows/curl.yml b/.github/workflows/curl.yml index c570ef7d..83d6adc5 100644 --- a/.github/workflows/curl.yml +++ b/.github/workflows/curl.yml @@ -24,12 +24,12 @@ jobs: openssl_ref: [ 'openssl-3.5.0' ] test_curl: - runs-on: ubuntu-22.04 needs: build_wolfprovider # This should be a safe limit for the tests to run. timeout-minutes: 20 strategy: matrix: + os: [ubuntu-22.04, ubuntu-24.04-arm] curl_ref: [ 'master', 'curl-8_4_0' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] @@ -37,12 +37,13 @@ jobs: exclude: - curl_ref: 'master' force_fail: 'WOLFPROV_FORCE_FAIL=1' + runs-on: ${{ matrix.os }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 with: fetch-depth: 1 - + - name: Retrieving wolfSSL/wolfProvider from cache uses: actions/cache/restore@v4 id: wolfprov-cache @@ -55,7 +56,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true - name: Install dependencies diff --git a/.github/workflows/grpc.yml b/.github/workflows/grpc.yml index 729da246..a1220c62 100644 --- a/.github/workflows/grpc.yml +++ b/.github/workflows/grpc.yml @@ -24,13 +24,13 @@ jobs: openssl_ref: [ 'openssl-3.5.0' ] test_grpc: - runs-on: ubuntu-22.04 needs: build_wolfprovider # This should be a safe limit for the tests to run. timeout-minutes: 30 strategy: fail-fast: false matrix: + os: [ubuntu-22.04, ubuntu-24.04-arm] include: - grpc_ref: v1.60.0 # TODO: Add master tests: >- @@ -41,12 +41,13 @@ jobs: h2_ssl_cert_test h2_ssl_session_reuse_test wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] + runs-on: ${{ matrix.os }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 with: fetch-depth: 1 - + - name: Retrieving wolfSSL/wolfProvider from cache uses: actions/cache/restore@v4 id: wolfprov-cache @@ -59,7 +60,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true - name: Confirm IPv4 and IPv6 support @@ -89,7 +90,6 @@ jobs: run: | # Set up the environment for wolfProvider source $GITHUB_WORKSPACE/scripts/env-setup - export ${{ matrix.force_fail }} # Initialize submodules git submodule update --init diff --git a/.github/workflows/iperf.yml b/.github/workflows/iperf.yml index 126f2594..575604ba 100644 --- a/.github/workflows/iperf.yml +++ b/.github/workflows/iperf.yml @@ -24,16 +24,17 @@ jobs: openssl_ref: [ 'openssl-3.5.0' ] test_iperf: - runs-on: ubuntu-22.04 needs: build_wolfprovider # This should be a safe limit for the tests to run. timeout-minutes: 20 strategy: matrix: + os: [ubuntu-22.04, ubuntu-24.04-arm] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] iperf_ref: [ 'master', '3.12' ] force_fail: ['WOLFPROV_FORCE_FAIL=1', ''] + runs-on: ${{ matrix.os }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 @@ -52,7 +53,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true - name: Install dependencies diff --git a/.github/workflows/ipmitool.yml b/.github/workflows/ipmitool.yml index 7f0acc65..debce430 100644 --- a/.github/workflows/ipmitool.yml +++ b/.github/workflows/ipmitool.yml @@ -24,16 +24,17 @@ jobs: openssl_ref: [ 'openssl-3.5.0' ] test_ipmitool: - runs-on: ubuntu-22.04 needs: build_wolfprovider # This should be a safe limit for the tests to run. timeout-minutes: 20 strategy: fail-fast: false matrix: + os: [ubuntu-22.04, ubuntu-24.04-arm] ipmitool_ref: [ 'master', 'IPMITOOL_1_8_19' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] + runs-on: ${{ matrix.os }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 @@ -52,7 +53,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true - name: Install dependencies @@ -74,7 +75,6 @@ jobs: run: | # Set up the environment for wolfProvider source $GITHUB_WORKSPACE/scripts/env-setup - export ${{ matrix.force_fail }} # Verify ipmitool was built and linked correctly with OpenSSL ldd src/ipmitool | grep -E '(libssl|libcrypto)' diff --git a/.github/workflows/liboauth2.yml b/.github/workflows/liboauth2.yml index 35acc55a..e5268fd4 100644 --- a/.github/workflows/liboauth2.yml +++ b/.github/workflows/liboauth2.yml @@ -24,21 +24,22 @@ jobs: openssl_ref: [ 'openssl-3.5.0' ] test_liboauth2: - runs-on: ubuntu-22.04 needs: build_wolfprovider timeout-minutes: 20 strategy: matrix: + os: [ubuntu-22.04, ubuntu-24.04-arm] liboauth2_ref: [ 'v1.4.5.4' ] # No master with patch wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] force_fail: ['WOLFPROV_FORCE_FAIL=1', ''] + runs-on: ${{ matrix.os }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 with: fetch-depth: 1 - + - name: Retrieving wolfSSL/wolfProvider from cache uses: actions/cache/restore@v4 id: wolfprov-cache @@ -51,7 +52,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true - name: Install liboauth2 dependencies diff --git a/.github/workflows/multi-compiler.yml b/.github/workflows/multi-compiler.yml index 2ecc5e56..4e949499 100644 --- a/.github/workflows/multi-compiler.yml +++ b/.github/workflows/multi-compiler.yml @@ -20,56 +20,49 @@ jobs: strategy: fail-fast: false matrix: + os: [ubuntu-latest, ubuntu-22.04, ubuntu-24.04-arm] + openssl_ref: [ 'master', 'openssl-3.5.0' ] include: - CC: gcc-9 CXX: g++-9 - OS: ubuntu-latest wolfssl_ref: master - CC: gcc-10 CXX: g++-10 - OS: ubuntu-latest wolfssl_ref: master - CC: gcc-10 CXX: g++-10 - OS: ubuntu-latest wolfssl_ref: v5.8.0-stable - CC: gcc-11 CXX: g++-11 - OS: ubuntu-latest wolfssl_ref: master - CC: gcc-12 CXX: g++-12 - OS: ubuntu-latest wolfssl_ref: master - CC: clang-12 CXX: clang++-12 - OS: ubuntu-22.04 wolfssl_ref: master - CC: clang-13 CXX: clang++-13 - OS: ubuntu-22.04 wolfssl_ref: master - CC: clang-14 CXX: clang++-14 - OS: ubuntu-latest wolfssl_ref: master - CC: clang-15 CXX: clang++-15 - OS: ubuntu-latest wolfssl_ref: master steps: - name: Checkout wolfProvider uses: actions/checkout@v4 + with: + fetch-depth: 1 - name: Install dependencies run: | sudo apt-get update sudo apt-get install -y ${{ matrix.CC }} ${{ matrix.CXX }} automake libtool - # Check if this version of wolfssl/wolfprovider has already been built, - # mark to cache these items on post if we do end up building - - name: Checking wolfSSL/wolfProvider in cache - uses: actions/cache@v4 + - name: Retrieving wolfSSL/wolfProvider from cache + uses: actions/cache/restore@v4 id: wolfprov-cache with: path: | @@ -77,23 +70,11 @@ jobs: wolfssl-source wolfssl-install wolfprov-install - provider.conf - - key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.CC }}-${{ github.sha }} - lookup-only: true - - # If wolfssl/wolfprovider have not yet been built, pull ossl from cache - - name: Checking OpenSSL in cache - if: steps.wolfprov-cache.outputs.cache-hit != 'true' - uses: actions/cache@v4 - id: openssl-cache - with: - path: | - openssl-source openssl-install + provider.conf - key: ossl-depends-${{ matrix.wolfssl_ref }}-${{ matrix.CC }}-${{ github.sha }} - lookup-only: true + key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + fail-on-cache-miss: true # If not yet built this version, build it now - name: Build wolfProvider @@ -102,7 +83,7 @@ jobs: CC: ${{ matrix.CC }} CXX: ${{ matrix.CXX }} run: | - WOLFSSL_TAG=${{ matrix.wolfssl_ref }} ./scripts/build-wolfprovider.sh + OPENSSL_TAG=${{ matrix.openssl_ref }} WOLFSSL_TAG=${{ matrix.wolfssl_ref }} ./scripts/build-wolfprovider.sh - name: Print errors if: ${{ failure() }} diff --git a/.github/workflows/net-snmp.yml b/.github/workflows/net-snmp.yml index 0ae7f3cc..af5e1042 100644 --- a/.github/workflows/net-snmp.yml +++ b/.github/workflows/net-snmp.yml @@ -24,17 +24,18 @@ jobs: openssl_ref: [ 'openssl-3.5.0' ] test_net_snmp: - runs-on: ubuntu-22.04 needs: build_wolfprovider # This should be a safe limit for the tests to run. timeout-minutes: 20 strategy: fail-fast: false matrix: + os: [ubuntu-22.04, ubuntu-24.04-arm] net_snmp_ref: ['v5.9.3'] wolfssl_ref: ['master', 'v5.8.0-stable'] openssl_ref: ['openssl-3.5.0'] force_fail: ['WOLFPROV_FORCE_FAIL=1', ''] + runs-on: ${{ matrix.os }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 @@ -53,7 +54,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true - name: Install dependencies diff --git a/.github/workflows/nginx.yml b/.github/workflows/nginx.yml index 80ad1fb1..5f67186b 100644 --- a/.github/workflows/nginx.yml +++ b/.github/workflows/nginx.yml @@ -24,12 +24,12 @@ jobs: openssl_ref: [ 'openssl-3.5.0' ] test_nginx: - runs-on: ubuntu-22.04 needs: build_wolfprovider # This should be a safe limit for the tests to run. timeout-minutes: 20 strategy: matrix: + os: [ubuntu-22.04, ubuntu-24.04-arm] nginx_ref: [ 'master', 'release-1.27.4' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] @@ -37,6 +37,7 @@ jobs: exclude: - nginx_ref: 'master' force_fail: 'WOLFPROV_FORCE_FAIL=1' + runs-on: ${{ matrix.os }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 @@ -55,7 +56,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true - name: Install dependencies diff --git a/.github/workflows/openldap.yml b/.github/workflows/openldap.yml index 81ea6357..c0b00136 100644 --- a/.github/workflows/openldap.yml +++ b/.github/workflows/openldap.yml @@ -24,16 +24,17 @@ jobs: openssl_ref: [ 'openssl-3.5.0' ] test_openldap: - runs-on: ubuntu-22.04 needs: build_wolfprovider # This should be a safe limit for the tests to run. timeout-minutes: 20 strategy: fail-fast: false matrix: + os: [ubuntu-22.04, ubuntu-24.04-arm] openldap_ref: [ 'master', 'OPENLDAP_REL_ENG_2_5_13', 'OPENLDAP_REL_ENG_2_6_7' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] + runs-on: ${{ matrix.os }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 @@ -52,7 +53,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true - name: Install dependencies @@ -72,7 +73,6 @@ jobs: run: | # Set up the environment for wolfProvider source $GITHUB_WORKSPACE/scripts/env-setup - export ${{ matrix.force_fail }} # Generate configure script rm -f aclocal.m4 diff --git a/.github/workflows/openssh.yml b/.github/workflows/openssh.yml index 9c5492b3..0f00e31e 100644 --- a/.github/workflows/openssh.yml +++ b/.github/workflows/openssh.yml @@ -24,12 +24,12 @@ jobs: openssl_ref: [ 'openssl-3.5.0' ] test_openssh: - runs-on: ubuntu-22.04 needs: build_wolfprovider # This should be a safe limit for the tests to run. timeout-minutes: 20 strategy: matrix: + os: [ubuntu-22.04, ubuntu-24.04-arm] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] openssh_ref: [ 'master', 'V_10_0_P2', 'V_9_9_P1' ] @@ -37,6 +37,7 @@ jobs: exclude: - openssh_ref: 'master' force_fail: 'WOLFPROV_FORCE_FAIL=1' + runs-on: ${{ matrix.os }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 @@ -55,7 +56,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true - name: Checkout OSP diff --git a/.github/workflows/openvpn.yml b/.github/workflows/openvpn.yml index b5e72ba0..b1e88750 100644 --- a/.github/workflows/openvpn.yml +++ b/.github/workflows/openvpn.yml @@ -24,12 +24,12 @@ jobs: openssl_ref: [ 'openssl-3.5.0' ] test_openvpn: - runs-on: ubuntu-22.04 needs: build_wolfprovider # This should be a safe limit for the tests to run. timeout-minutes: 20 strategy: matrix: + os: [ubuntu-22.04, ubuntu-24.04-arm] openvpn_ref: [ 'master', 'v2.6.12' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] @@ -37,6 +37,7 @@ jobs: exclude: - openvpn_ref: 'master' force_fail: 'WOLFPROV_FORCE_FAIL=1' + runs-on: ${{ matrix.os }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 @@ -55,7 +56,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true - name: Install test dependencies diff --git a/.github/workflows/simple.yml b/.github/workflows/simple.yml index 41e6665d..7a36298f 100644 --- a/.github/workflows/simple.yml +++ b/.github/workflows/simple.yml @@ -15,22 +15,22 @@ concurrency: jobs: simple_test: name: Simple Test - runs-on: ubuntu-22.04 timeout-minutes: 20 strategy: matrix: + os: [ubuntu-22.04, ubuntu-24.04-arm] openssl_ref: [ 'master', 'openssl-3.5.0' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] force_fail: ['WOLFPROV_FORCE_FAIL=1', ''] - + runs-on: ${{ matrix.os }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 + with: + fetch-depth: 1 - # Check if this version of wolfssl/wolfprovider has already been built, - # mark to cache these items on post if we do end up building - - name: Checking wolfSSL/wolfProvider in cache - uses: actions/cache@v4 + - name: Retrieving wolfSSL/wolfProvider from cache + uses: actions/cache/restore@v4 id: wolfprov-cache with: path: | @@ -41,25 +41,12 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} - lookup-only: true - - # If wolfssl/wolfprovider have not yet been built, pull ossl from cache - - name: Checking OpenSSL in cache - if: steps.wolfprov-${{ matrix.wolfssl_ref }}-cache.hit != 'true' - uses: actions/cache@v4 - id: openssl-cache - with: - path: | - openssl-source - openssl-install - - key: ossl-depends-${{ matrix.openssl_ref }}-${{ github.sha }} - lookup-only: true + key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + fail-on-cache-miss: true # If not yet built this version, build it now - name: Build wolfProvider - if: steps.wolfprov-${{ matrix.wolfssl_ref }}-cache.hit != 'true' + if: steps.wolfprov-cache.outputs.cache-hit != 'true' run: | OPENSSL_TAG=${{ matrix.openssl_ref }} WOLFSSL_TAG=${{ matrix.wolfssl_ref }} ./scripts/build-wolfprovider.sh diff --git a/.github/workflows/socat.yml b/.github/workflows/socat.yml index edf1e98b..37bd2f23 100644 --- a/.github/workflows/socat.yml +++ b/.github/workflows/socat.yml @@ -24,14 +24,15 @@ jobs: openssl_ref: [ 'openssl-3.5.0' ] test_socat: - runs-on: ubuntu-22.04 needs: build_wolfprovider # This should be a safe limit for the tests to run. timeout-minutes: 20 strategy: matrix: + os: [ubuntu-22.04, ubuntu-24.04-arm] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] + runs-on: ${{ matrix.os }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 @@ -50,7 +51,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true - name: Install dependencies @@ -75,7 +76,6 @@ jobs: run: | # Set up the environment for wolfProvider source $GITHUB_WORKSPACE/scripts/env-setup - export ${{ matrix.force_fail }} # Verify OpenSSL loads wolfProvider $GITHUB_WORKSPACE/openssl-install/bin/openssl list -providers diff --git a/.github/workflows/sssd.yml b/.github/workflows/sssd.yml index eb9f9ea7..0047c748 100644 --- a/.github/workflows/sssd.yml +++ b/.github/workflows/sssd.yml @@ -14,7 +14,6 @@ concurrency: jobs: test_sssd: - runs-on: ubuntu-22.04 timeout-minutes: 20 container: image: quay.io/sssd/ci-client-devel:ubuntu-latest @@ -23,6 +22,7 @@ jobs: strategy: fail-fast: false matrix: + os: [ubuntu-22.04, ubuntu-24.04-arm] sssd_ref: [ 'master', '2.9.1' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] @@ -30,27 +30,27 @@ jobs: exclude: - sssd_ref: 'master' force_fail: 'WOLFPROV_FORCE_FAIL=1' + runs-on: ${{ matrix.os }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 with: fetch-depth: 1 - # Check if this version of wolfssl/wolfprovider has already been built, - # mark to cache these items on post if we do end up building - - name: Checking wolfSSL/wolfProvider in cache - uses: actions/cache@v4 + - name: Retrieving wolfSSL/wolfProvider from cache + uses: actions/cache/restore@v4 id: wolfprov-cache with: path: | + scripts wolfssl-source wolfssl-install wolfprov-install openssl-install provider.conf - key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} - lookup-only: true + key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + fail-on-cache-miss: true # If not yet built this version, build it now - name: Build wolfProvider @@ -90,16 +90,10 @@ jobs: - name: Run tests working-directory: sssd run: | - # Set environment variables - export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/wolfssl-install/lib:$GITHUB_WORKSPACE/openssl-install/lib64 - export OPENSSL_CONF=$GITHUB_WORKSPACE/provider.conf - export OPENSSL_MODULES=$GITHUB_WORKSPACE/wolfprov-install/lib + # Set up the environment for wolfProvider + source $GITHUB_WORKSPACE/scripts/env-setup export ${{ matrix.force_fail }} - echo "Checking OpenSSL providers:" - $GITHUB_WORKSPACE/openssl-install/bin/openssl list -providers | tee provider-list.log - grep -q libwolfprov provider-list.log || (echo "ERROR: libwolfprov not found in OpenSSL providers" && exit 1) - # Run tests and save result make check 2>&1 | tee sssd-test.log TEST_RESULT=$? diff --git a/.github/workflows/stunnel.yml b/.github/workflows/stunnel.yml index cd946044..6287efb2 100644 --- a/.github/workflows/stunnel.yml +++ b/.github/workflows/stunnel.yml @@ -24,12 +24,12 @@ jobs: openssl_ref: [ 'openssl-3.5.0' ] test_stunnel: - runs-on: ubuntu-22.04 needs: build_wolfprovider # This should be a safe limit for the tests to run. timeout-minutes: 10 strategy: matrix: + os: [ubuntu-22.04, ubuntu-24.04-arm] stunnel_ref: [ 'master', 'stunnel-5.67' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] @@ -37,6 +37,7 @@ jobs: exclude: - stunnel_ref: 'master' force_fail: 'WOLFPROV_FORCE_FAIL=1' + runs-on: ${{ matrix.os }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 @@ -55,7 +56,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true - name: Install dependencies diff --git a/.github/workflows/tcpdump.yml b/.github/workflows/tcpdump.yml index 06347929..0682f219 100644 --- a/.github/workflows/tcpdump.yml +++ b/.github/workflows/tcpdump.yml @@ -21,11 +21,11 @@ jobs: openssl_ref: [ 'openssl-3.5.0' ] test_tcpdump: - runs-on: ubuntu-22.04 needs: build_wolfprovider timeout-minutes: 15 strategy: matrix: + os: [ubuntu-22.04, ubuntu-24.04-arm] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] tcpdump_ref: [ 'master', 'tcpdump-4.99.3' ] @@ -33,6 +33,7 @@ jobs: exclude: - tcpdump_ref: 'master' force_fail: 'WOLFPROV_FORCE_FAIL=1' + runs-on: ${{ matrix.os }} steps: - name: Checkout wolfProvider @@ -51,7 +52,7 @@ jobs: wolfprov-install openssl-install provider.conf - key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true - name: Install test dependencies @@ -99,14 +100,13 @@ jobs: # Set up the environment for wolfProvider source $GITHUB_WORKSPACE/scripts/env-setup export ${{ matrix.force_fail }} - + # Run tests make check 2>&1 | tee tcpdump-test.log TEST_RESULT=$? - + if [ $TEST_RESULT -ne 0 ]; then grep -A2 -B2 "exit code\|failed\|FAILED" tcpdump-test.log || true fi - - $GITHUB_WORKSPACE/.github/scripts/check-workflow-result.sh $TEST_RESULT ${{ matrix.force_fail }} tcpdump + $GITHUB_WORKSPACE/.github/scripts/check-workflow-result.sh $TEST_RESULT ${{ matrix.force_fail }} tcpdump From 5a153c129c7184795b1b15df548d7a526bf3dcb9 Mon Sep 17 00:00:00 2001 From: Aidan Garske Date: Tue, 17 Jun 2025 11:43:58 -0700 Subject: [PATCH 02/17] Use standard ref format --- .github/workflows/build-wolfprovider.yml | 2 +- .github/workflows/cjose.yml | 2 +- .github/workflows/codespell.yml | 2 +- .github/workflows/curl.yml | 2 +- .github/workflows/grpc.yml | 2 +- .github/workflows/iperf.yml | 2 +- .github/workflows/ipmitool.yml | 2 +- .github/workflows/liboauth2.yml | 2 +- .github/workflows/net-snmp.yml | 2 +- .github/workflows/openldap.yml | 2 +- .github/workflows/openssh.yml | 2 +- .github/workflows/openvpn.yml | 2 +- .github/workflows/simple.yml | 2 +- .github/workflows/socat.yml | 2 +- .github/workflows/sssd.yml | 2 +- .github/workflows/stunnel.yml | 2 +- .github/workflows/tcpdump.yml | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build-wolfprovider.yml b/.github/workflows/build-wolfprovider.yml index a70b521f..dd79201f 100644 --- a/.github/workflows/build-wolfprovider.yml +++ b/.github/workflows/build-wolfprovider.yml @@ -19,7 +19,7 @@ jobs: name: Build wolfProvider strategy: matrix: - os: [ubuntu-22.04, ubuntu-24.04-arm] + os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] runs-on: ${{ matrix.os }} timeout-minutes: 20 outputs: diff --git a/.github/workflows/cjose.yml b/.github/workflows/cjose.yml index 719a9ef4..d91b6dbd 100644 --- a/.github/workflows/cjose.yml +++ b/.github/workflows/cjose.yml @@ -29,7 +29,7 @@ jobs: timeout-minutes: 20 strategy: matrix: - os: [ubuntu-22.04, ubuntu-24.04-arm] + os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] cjose_ref: [ 'master', 'v0.6.2.1' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index f2c3ff71..2f635cb0 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -17,7 +17,7 @@ jobs: name: Check for spelling errors strategy: matrix: - os: [ubuntu-22.04, ubuntu-24.04-arm] + os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] runs-on: ${{ matrix.os }} timeout-minutes: 5 steps: diff --git a/.github/workflows/curl.yml b/.github/workflows/curl.yml index 83d6adc5..b59f18a6 100644 --- a/.github/workflows/curl.yml +++ b/.github/workflows/curl.yml @@ -29,7 +29,7 @@ jobs: timeout-minutes: 20 strategy: matrix: - os: [ubuntu-22.04, ubuntu-24.04-arm] + os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] curl_ref: [ 'master', 'curl-8_4_0' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] diff --git a/.github/workflows/grpc.yml b/.github/workflows/grpc.yml index a1220c62..d883a340 100644 --- a/.github/workflows/grpc.yml +++ b/.github/workflows/grpc.yml @@ -30,7 +30,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-22.04, ubuntu-24.04-arm] + os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] include: - grpc_ref: v1.60.0 # TODO: Add master tests: >- diff --git a/.github/workflows/iperf.yml b/.github/workflows/iperf.yml index 575604ba..dec9061d 100644 --- a/.github/workflows/iperf.yml +++ b/.github/workflows/iperf.yml @@ -29,7 +29,7 @@ jobs: timeout-minutes: 20 strategy: matrix: - os: [ubuntu-22.04, ubuntu-24.04-arm] + os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] iperf_ref: [ 'master', '3.12' ] diff --git a/.github/workflows/ipmitool.yml b/.github/workflows/ipmitool.yml index debce430..663f6400 100644 --- a/.github/workflows/ipmitool.yml +++ b/.github/workflows/ipmitool.yml @@ -30,7 +30,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-22.04, ubuntu-24.04-arm] + os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] ipmitool_ref: [ 'master', 'IPMITOOL_1_8_19' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] diff --git a/.github/workflows/liboauth2.yml b/.github/workflows/liboauth2.yml index e5268fd4..6618bf31 100644 --- a/.github/workflows/liboauth2.yml +++ b/.github/workflows/liboauth2.yml @@ -28,7 +28,7 @@ jobs: timeout-minutes: 20 strategy: matrix: - os: [ubuntu-22.04, ubuntu-24.04-arm] + os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] liboauth2_ref: [ 'v1.4.5.4' ] # No master with patch wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] diff --git a/.github/workflows/net-snmp.yml b/.github/workflows/net-snmp.yml index af5e1042..99f156fe 100644 --- a/.github/workflows/net-snmp.yml +++ b/.github/workflows/net-snmp.yml @@ -30,7 +30,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-22.04, ubuntu-24.04-arm] + os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] net_snmp_ref: ['v5.9.3'] wolfssl_ref: ['master', 'v5.8.0-stable'] openssl_ref: ['openssl-3.5.0'] diff --git a/.github/workflows/openldap.yml b/.github/workflows/openldap.yml index c0b00136..bb2fd001 100644 --- a/.github/workflows/openldap.yml +++ b/.github/workflows/openldap.yml @@ -30,7 +30,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-22.04, ubuntu-24.04-arm] + os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] openldap_ref: [ 'master', 'OPENLDAP_REL_ENG_2_5_13', 'OPENLDAP_REL_ENG_2_6_7' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] diff --git a/.github/workflows/openssh.yml b/.github/workflows/openssh.yml index 0f00e31e..1ada6272 100644 --- a/.github/workflows/openssh.yml +++ b/.github/workflows/openssh.yml @@ -29,7 +29,7 @@ jobs: timeout-minutes: 20 strategy: matrix: - os: [ubuntu-22.04, ubuntu-24.04-arm] + os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] openssh_ref: [ 'master', 'V_10_0_P2', 'V_9_9_P1' ] diff --git a/.github/workflows/openvpn.yml b/.github/workflows/openvpn.yml index b1e88750..d9fcd210 100644 --- a/.github/workflows/openvpn.yml +++ b/.github/workflows/openvpn.yml @@ -29,7 +29,7 @@ jobs: timeout-minutes: 20 strategy: matrix: - os: [ubuntu-22.04, ubuntu-24.04-arm] + os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] openvpn_ref: [ 'master', 'v2.6.12' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] diff --git a/.github/workflows/simple.yml b/.github/workflows/simple.yml index 7a36298f..ce9e1b6a 100644 --- a/.github/workflows/simple.yml +++ b/.github/workflows/simple.yml @@ -18,7 +18,7 @@ jobs: timeout-minutes: 20 strategy: matrix: - os: [ubuntu-22.04, ubuntu-24.04-arm] + os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] openssl_ref: [ 'master', 'openssl-3.5.0' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] force_fail: ['WOLFPROV_FORCE_FAIL=1', ''] diff --git a/.github/workflows/socat.yml b/.github/workflows/socat.yml index 37bd2f23..e391edf7 100644 --- a/.github/workflows/socat.yml +++ b/.github/workflows/socat.yml @@ -29,7 +29,7 @@ jobs: timeout-minutes: 20 strategy: matrix: - os: [ubuntu-22.04, ubuntu-24.04-arm] + os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] runs-on: ${{ matrix.os }} diff --git a/.github/workflows/sssd.yml b/.github/workflows/sssd.yml index 0047c748..b0fffc5e 100644 --- a/.github/workflows/sssd.yml +++ b/.github/workflows/sssd.yml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-22.04, ubuntu-24.04-arm] + os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] sssd_ref: [ 'master', '2.9.1' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] diff --git a/.github/workflows/stunnel.yml b/.github/workflows/stunnel.yml index 6287efb2..6917af7f 100644 --- a/.github/workflows/stunnel.yml +++ b/.github/workflows/stunnel.yml @@ -29,7 +29,7 @@ jobs: timeout-minutes: 10 strategy: matrix: - os: [ubuntu-22.04, ubuntu-24.04-arm] + os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] stunnel_ref: [ 'master', 'stunnel-5.67' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] diff --git a/.github/workflows/tcpdump.yml b/.github/workflows/tcpdump.yml index 0682f219..18839193 100644 --- a/.github/workflows/tcpdump.yml +++ b/.github/workflows/tcpdump.yml @@ -25,7 +25,7 @@ jobs: timeout-minutes: 15 strategy: matrix: - os: [ubuntu-22.04, ubuntu-24.04-arm] + os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] tcpdump_ref: [ 'master', 'tcpdump-4.99.3' ] From 8d8a57f5f5dee6c6d807ca12e53d30eb6950af2c Mon Sep 17 00:00:00 2001 From: Aidan Garske Date: Tue, 17 Jun 2025 12:02:54 -0700 Subject: [PATCH 03/17] Make sure to set the OEPNSSL_ARCH when building provider --- .github/workflows/build-wolfprovider.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build-wolfprovider.yml b/.github/workflows/build-wolfprovider.yml index dd79201f..34efd2a5 100644 --- a/.github/workflows/build-wolfprovider.yml +++ b/.github/workflows/build-wolfprovider.yml @@ -113,6 +113,9 @@ jobs: - name: Build wolfProvider if: steps.wolfprov-cache.outputs.cache-hit != 'true' run: | + if [ "${{ matrix.os }}" = "ubuntu-24.04-arm" ]; then + export OPENSSL_ARCH="linux-aarch64" + fi OPENSSL_TAG=${{ inputs.openssl_ref }} WOLFSSL_TAG=${{ inputs.wolfssl_ref }} ./scripts/build-wolfprovider.sh # This is potentially chewing up a lot of cache space. From 588df2a17c0c90077c4d29569806ca7b24c1e037 Mon Sep 17 00:00:00 2001 From: Aidan Garske Date: Tue, 17 Jun 2025 12:28:45 -0700 Subject: [PATCH 04/17] Config for arm builds specifically --- scripts/utils-openssl.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/utils-openssl.sh b/scripts/utils-openssl.sh index aa2eb5c7..381f694c 100755 --- a/scripts/utils-openssl.sh +++ b/scripts/utils-openssl.sh @@ -90,10 +90,18 @@ install_openssl() { if [ ! -d ${OPENSSL_INSTALL_DIR} ]; then printf "\tConfigure OpenSSL ${OPENSSL_TAG} ... " if [ "$WOLFPROV_DEBUG" = "1" ]; then - ./config shared enable-trace --prefix=${OPENSSL_INSTALL_DIR} --debug >>$LOG_FILE 2>&1 + if [ "$OPENSSL_ARCH" = "linux-aarch64" ]; then + ./Configure linux-aarch64 shared enable-trace --prefix=${OPENSSL_INSTALL_DIR} --debug >>$LOG_FILE 2>&1 + else + ./config shared enable-trace --prefix=${OPENSSL_INSTALL_DIR} --debug >>$LOG_FILE 2>&1 + fi RET=$? else - ./config shared --prefix=${OPENSSL_INSTALL_DIR} >>$LOG_FILE 2>&1 + if [ "$OPENSSL_ARCH" = "linux-aarch64" ]; then + ./Configure linux-aarch64 shared --prefix=${OPENSSL_INSTALL_DIR} >>$LOG_FILE 2>&1 + else + ./config shared --prefix=${OPENSSL_INSTALL_DIR} >>$LOG_FILE 2>&1 + fi RET=$? fi if [ $RET != 0 ]; then From 78d8e8d0ce7f5deb3a92f3553ca2e51def5e73b3 Mon Sep 17 00:00:00 2001 From: Aidan Garske Date: Tue, 17 Jun 2025 12:47:45 -0700 Subject: [PATCH 05/17] Let ossl detect os --- .github/workflows/build-wolfprovider.yml | 2 +- scripts/utils-openssl.sh | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-wolfprovider.yml b/.github/workflows/build-wolfprovider.yml index 34efd2a5..2543ee28 100644 --- a/.github/workflows/build-wolfprovider.yml +++ b/.github/workflows/build-wolfprovider.yml @@ -116,7 +116,7 @@ jobs: if [ "${{ matrix.os }}" = "ubuntu-24.04-arm" ]; then export OPENSSL_ARCH="linux-aarch64" fi - OPENSSL_TAG=${{ inputs.openssl_ref }} WOLFSSL_TAG=${{ inputs.wolfssl_ref }} ./scripts/build-wolfprovider.sh + OPENSSL_TAG=${{ inputs.openssl_ref }} WOLFSSL_TAG=${{ inputs.wolfssl_ref }} WOLFPROV_DEBUG=1 ./scripts/build-wolfprovider.sh # This is potentially chewing up a lot of cache space. # Could investigate reducing the size of this cache. diff --git a/scripts/utils-openssl.sh b/scripts/utils-openssl.sh index 381f694c..aa2eb5c7 100755 --- a/scripts/utils-openssl.sh +++ b/scripts/utils-openssl.sh @@ -90,18 +90,10 @@ install_openssl() { if [ ! -d ${OPENSSL_INSTALL_DIR} ]; then printf "\tConfigure OpenSSL ${OPENSSL_TAG} ... " if [ "$WOLFPROV_DEBUG" = "1" ]; then - if [ "$OPENSSL_ARCH" = "linux-aarch64" ]; then - ./Configure linux-aarch64 shared enable-trace --prefix=${OPENSSL_INSTALL_DIR} --debug >>$LOG_FILE 2>&1 - else - ./config shared enable-trace --prefix=${OPENSSL_INSTALL_DIR} --debug >>$LOG_FILE 2>&1 - fi + ./config shared enable-trace --prefix=${OPENSSL_INSTALL_DIR} --debug >>$LOG_FILE 2>&1 RET=$? else - if [ "$OPENSSL_ARCH" = "linux-aarch64" ]; then - ./Configure linux-aarch64 shared --prefix=${OPENSSL_INSTALL_DIR} >>$LOG_FILE 2>&1 - else - ./config shared --prefix=${OPENSSL_INSTALL_DIR} >>$LOG_FILE 2>&1 - fi + ./config shared --prefix=${OPENSSL_INSTALL_DIR} >>$LOG_FILE 2>&1 RET=$? fi if [ $RET != 0 ]; then From 3bff1d74f0ef88889a0b6cef86302763af7a0a63 Mon Sep 17 00:00:00 2001 From: Aidan Garske Date: Tue, 17 Jun 2025 12:52:54 -0700 Subject: [PATCH 06/17] Use the os in all cache keys --- .github/workflows/build-wolfprovider.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-wolfprovider.yml b/.github/workflows/build-wolfprovider.yml index 2543ee28..2e1b0a88 100644 --- a/.github/workflows/build-wolfprovider.yml +++ b/.github/workflows/build-wolfprovider.yml @@ -81,7 +81,7 @@ jobs: openssl-source openssl-install - key: ossl-depends-${{ steps.openssl-ref.outputs.ref }} + key: ossl-depends-${{ matrix.os }}-${{ steps.openssl-ref.outputs.ref }} lookup-only: false # Convert WolfSSL branch name to commit hash if needed @@ -107,7 +107,7 @@ jobs: wolfssl-source wolfssl-install - key: wolfssl-depends-${{ steps.wolfssl-ref.outputs.ref }} + key: wolfssl-depends-${{ matrix.os }}-${{ steps.wolfssl-ref.outputs.ref }} lookup-only: false - name: Build wolfProvider @@ -142,7 +142,7 @@ jobs: path: | openssl-source openssl-install - key: ossl-depends-${{ steps.openssl-ref.outputs.ref }} + key: ossl-depends-${{ matrix.os }}-${{ steps.openssl-ref.outputs.ref }} - name: Save WolfSSL into cache if: steps.wolfssl-cache.outputs.cache-hit != 'true' @@ -151,7 +151,7 @@ jobs: path: | wolfssl-source wolfssl-install - key: wolfssl-depends-${{ steps.wolfssl-ref.outputs.ref }} + key: wolfssl-depends-${{ matrix.os }}-${{ steps.wolfssl-ref.outputs.ref }} - name: Print errors if: ${{ failure() }} From 2c437be87fe92f79d89998a12d52a32e6650250b Mon Sep 17 00:00:00 2001 From: Aidan Garske Date: Tue, 17 Jun 2025 12:59:46 -0700 Subject: [PATCH 07/17] revert cache key for ossl wolfssl --- .github/workflows/build-wolfprovider.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-wolfprovider.yml b/.github/workflows/build-wolfprovider.yml index 2e1b0a88..2543ee28 100644 --- a/.github/workflows/build-wolfprovider.yml +++ b/.github/workflows/build-wolfprovider.yml @@ -81,7 +81,7 @@ jobs: openssl-source openssl-install - key: ossl-depends-${{ matrix.os }}-${{ steps.openssl-ref.outputs.ref }} + key: ossl-depends-${{ steps.openssl-ref.outputs.ref }} lookup-only: false # Convert WolfSSL branch name to commit hash if needed @@ -107,7 +107,7 @@ jobs: wolfssl-source wolfssl-install - key: wolfssl-depends-${{ matrix.os }}-${{ steps.wolfssl-ref.outputs.ref }} + key: wolfssl-depends-${{ steps.wolfssl-ref.outputs.ref }} lookup-only: false - name: Build wolfProvider @@ -142,7 +142,7 @@ jobs: path: | openssl-source openssl-install - key: ossl-depends-${{ matrix.os }}-${{ steps.openssl-ref.outputs.ref }} + key: ossl-depends-${{ steps.openssl-ref.outputs.ref }} - name: Save WolfSSL into cache if: steps.wolfssl-cache.outputs.cache-hit != 'true' @@ -151,7 +151,7 @@ jobs: path: | wolfssl-source wolfssl-install - key: wolfssl-depends-${{ matrix.os }}-${{ steps.wolfssl-ref.outputs.ref }} + key: wolfssl-depends-${{ steps.wolfssl-ref.outputs.ref }} - name: Print errors if: ${{ failure() }} From a478a49b41742720f4cdffc3ea1929b89dd90e39 Mon Sep 17 00:00:00 2001 From: Aidan Garske Date: Tue, 17 Jun 2025 13:14:30 -0700 Subject: [PATCH 08/17] use arch to spcify --- .github/workflows/build-wolfprovider.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-wolfprovider.yml b/.github/workflows/build-wolfprovider.yml index 2543ee28..727296ef 100644 --- a/.github/workflows/build-wolfprovider.yml +++ b/.github/workflows/build-wolfprovider.yml @@ -19,11 +19,15 @@ jobs: name: Build wolfProvider strategy: matrix: - os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] + include: + - os: ubuntu-22.04 + arch: x64 + - os: ubuntu-24.04-arm + arch: arm64 runs-on: ${{ matrix.os }} timeout-minutes: 20 outputs: - cache_key: wolfprov-${{ matrix.os }}-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }} + cache_key: wolfprov-${{ matrix.os }}-${{ matrix.arch }}-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }} steps: # Check if this version of wolfssl/wolfprovider has already been built, # mark to cache these items on post if we do end up building @@ -42,7 +46,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.os }}-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os }}-${{ matrix.arch }}-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }} lookup-only: true # if cache hit, exit the workflow @@ -132,7 +136,7 @@ jobs: wolfprov-install openssl-install provider.conf - key: wolfprov-${{ matrix.os }}-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os }}-${{ matrix.arch }}-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }} # If openssl cache miss, save it to the cache - name: Save OpenSSL into cache From 5710059ba0de956c05a1298da4b17c6a40454e99 Mon Sep 17 00:00:00 2001 From: Aidan Garske Date: Tue, 17 Jun 2025 13:27:08 -0700 Subject: [PATCH 09/17] Pass in ref from workflow --- .github/workflows/build-wolfprovider.yml | 20 ++++++++------------ .github/workflows/cjose.yml | 8 +++++--- .github/workflows/curl.yml | 8 +++++--- .github/workflows/grpc.yml | 8 +++++--- .github/workflows/iperf.yml | 8 +++++--- .github/workflows/ipmitool.yml | 8 +++++--- .github/workflows/liboauth2.yml | 8 +++++--- .github/workflows/multi-compiler.yml | 6 +++--- .github/workflows/net-snmp.yml | 8 +++++--- .github/workflows/nginx.yml | 8 +++++--- .github/workflows/openldap.yml | 8 +++++--- .github/workflows/openssh.yml | 8 +++++--- .github/workflows/openvpn.yml | 8 +++++--- .github/workflows/simple.yml | 6 +++--- .github/workflows/socat.yml | 8 +++++--- .github/workflows/sssd.yml | 6 +++--- .github/workflows/stunnel.yml | 8 +++++--- .github/workflows/tcpdump.yml | 8 +++++--- 18 files changed, 87 insertions(+), 63 deletions(-) diff --git a/.github/workflows/build-wolfprovider.yml b/.github/workflows/build-wolfprovider.yml index 727296ef..b599d06b 100644 --- a/.github/workflows/build-wolfprovider.yml +++ b/.github/workflows/build-wolfprovider.yml @@ -3,6 +3,9 @@ name: Build wolfProvider on: workflow_call: inputs: + os_ref: + required: true + type: string wolfssl_ref: required: true type: string @@ -17,17 +20,10 @@ on: jobs: build_wolfprovider_common: name: Build wolfProvider - strategy: - matrix: - include: - - os: ubuntu-22.04 - arch: x64 - - os: ubuntu-24.04-arm - arch: arm64 - runs-on: ${{ matrix.os }} + runs-on: ${{ inputs.os_ref }} timeout-minutes: 20 outputs: - cache_key: wolfprov-${{ matrix.os }}-${{ matrix.arch }}-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }} + cache_key: wolfprov-${{ inputs.os_ref }}-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }} steps: # Check if this version of wolfssl/wolfprovider has already been built, # mark to cache these items on post if we do end up building @@ -46,7 +42,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.os }}-${{ matrix.arch }}-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ inputs.os_ref }}-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }} lookup-only: true # if cache hit, exit the workflow @@ -117,7 +113,7 @@ jobs: - name: Build wolfProvider if: steps.wolfprov-cache.outputs.cache-hit != 'true' run: | - if [ "${{ matrix.os }}" = "ubuntu-24.04-arm" ]; then + if [ "${{ inputs.os_ref }}" = "ubuntu-24.04-arm" ]; then export OPENSSL_ARCH="linux-aarch64" fi OPENSSL_TAG=${{ inputs.openssl_ref }} WOLFSSL_TAG=${{ inputs.wolfssl_ref }} WOLFPROV_DEBUG=1 ./scripts/build-wolfprovider.sh @@ -136,7 +132,7 @@ jobs: wolfprov-install openssl-install provider.conf - key: wolfprov-${{ matrix.os }}-${{ matrix.arch }}-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ inputs.os_ref }}-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }} # If openssl cache miss, save it to the cache - name: Save OpenSSL into cache diff --git a/.github/workflows/cjose.yml b/.github/workflows/cjose.yml index d91b6dbd..255a7a4c 100644 --- a/.github/workflows/cjose.yml +++ b/.github/workflows/cjose.yml @@ -16,10 +16,12 @@ jobs: build_wolfprovider: uses: ./.github/workflows/build-wolfprovider.yml with: + os_ref: ${{ matrix.os_ref }} wolfssl_ref: ${{ matrix.wolfssl_ref }} openssl_ref: ${{ matrix.openssl_ref }} strategy: matrix: + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] @@ -29,12 +31,12 @@ jobs: timeout-minutes: 20 strategy: matrix: - os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] cjose_ref: [ 'master', 'v0.6.2.1' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] force_fail: [ 'WOLFPROV_FORCE_FAIL=1', '' ] - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.os_ref }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 @@ -53,7 +55,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os_ref }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true - name: Install cjose dependencies diff --git a/.github/workflows/curl.yml b/.github/workflows/curl.yml index b59f18a6..8ad37678 100644 --- a/.github/workflows/curl.yml +++ b/.github/workflows/curl.yml @@ -16,10 +16,12 @@ jobs: build_wolfprovider: uses: ./.github/workflows/build-wolfprovider.yml with: + os_ref: ${{ matrix.os_ref }} wolfssl_ref: ${{ matrix.wolfssl_ref }} openssl_ref: ${{ matrix.openssl_ref }} strategy: matrix: + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] @@ -29,7 +31,7 @@ jobs: timeout-minutes: 20 strategy: matrix: - os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] curl_ref: [ 'master', 'curl-8_4_0' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] @@ -37,7 +39,7 @@ jobs: exclude: - curl_ref: 'master' force_fail: 'WOLFPROV_FORCE_FAIL=1' - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.os_ref }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 @@ -56,7 +58,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os_ref }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true - name: Install dependencies diff --git a/.github/workflows/grpc.yml b/.github/workflows/grpc.yml index d883a340..6dfcf7a5 100644 --- a/.github/workflows/grpc.yml +++ b/.github/workflows/grpc.yml @@ -16,10 +16,12 @@ jobs: build_wolfprovider: uses: ./.github/workflows/build-wolfprovider.yml with: + os_ref: ${{ matrix.os_ref }} wolfssl_ref: ${{ matrix.wolfssl_ref }} openssl_ref: ${{ matrix.openssl_ref }} strategy: matrix: + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] @@ -30,7 +32,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] include: - grpc_ref: v1.60.0 # TODO: Add master tests: >- @@ -41,7 +43,7 @@ jobs: h2_ssl_cert_test h2_ssl_session_reuse_test wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.os_ref }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 @@ -60,7 +62,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os_ref }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true - name: Confirm IPv4 and IPv6 support diff --git a/.github/workflows/iperf.yml b/.github/workflows/iperf.yml index dec9061d..2f33f612 100644 --- a/.github/workflows/iperf.yml +++ b/.github/workflows/iperf.yml @@ -16,10 +16,12 @@ jobs: build_wolfprovider: uses: ./.github/workflows/build-wolfprovider.yml with: + os_ref: ${{ matrix.os_ref }} wolfssl_ref: ${{ matrix.wolfssl_ref }} openssl_ref: ${{ matrix.openssl_ref }} strategy: matrix: + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] @@ -29,12 +31,12 @@ jobs: timeout-minutes: 20 strategy: matrix: - os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] iperf_ref: [ 'master', '3.12' ] force_fail: ['WOLFPROV_FORCE_FAIL=1', ''] - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.os_ref }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 @@ -53,7 +55,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os_ref }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true - name: Install dependencies diff --git a/.github/workflows/ipmitool.yml b/.github/workflows/ipmitool.yml index 663f6400..e68dc95c 100644 --- a/.github/workflows/ipmitool.yml +++ b/.github/workflows/ipmitool.yml @@ -16,10 +16,12 @@ jobs: build_wolfprovider: uses: ./.github/workflows/build-wolfprovider.yml with: + os_ref: ${{ matrix.os_ref }} wolfssl_ref: ${{ matrix.wolfssl_ref }} openssl_ref: ${{ matrix.openssl_ref }} strategy: matrix: + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] @@ -30,11 +32,11 @@ jobs: strategy: fail-fast: false matrix: - os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] ipmitool_ref: [ 'master', 'IPMITOOL_1_8_19' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.os_ref }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 @@ -53,7 +55,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os_ref }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true - name: Install dependencies diff --git a/.github/workflows/liboauth2.yml b/.github/workflows/liboauth2.yml index 6618bf31..76e1f1bc 100644 --- a/.github/workflows/liboauth2.yml +++ b/.github/workflows/liboauth2.yml @@ -16,10 +16,12 @@ jobs: build_wolfprovider: uses: ./.github/workflows/build-wolfprovider.yml with: + os_ref: ${{ matrix.os_ref }} wolfssl_ref: ${{ matrix.wolfssl_ref }} openssl_ref: ${{ matrix.openssl_ref }} strategy: matrix: + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] @@ -28,12 +30,12 @@ jobs: timeout-minutes: 20 strategy: matrix: - os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] liboauth2_ref: [ 'v1.4.5.4' ] # No master with patch wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] force_fail: ['WOLFPROV_FORCE_FAIL=1', ''] - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.os_ref }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 @@ -52,7 +54,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os_ref }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true - name: Install liboauth2 dependencies diff --git a/.github/workflows/multi-compiler.yml b/.github/workflows/multi-compiler.yml index 4e949499..98fe3f14 100644 --- a/.github/workflows/multi-compiler.yml +++ b/.github/workflows/multi-compiler.yml @@ -15,12 +15,12 @@ concurrency: jobs: build_wolfprovider: name: Build with ${{ matrix.CC }} - runs-on: ${{ matrix.OS }} + runs-on: ${{ matrix.os_ref }} timeout-minutes: 20 strategy: fail-fast: false matrix: - os: [ubuntu-latest, ubuntu-22.04, ubuntu-24.04-arm] + os_ref: [ubuntu-latest, ubuntu-22.04, ubuntu-24.04-arm] openssl_ref: [ 'master', 'openssl-3.5.0' ] include: - CC: gcc-9 @@ -73,7 +73,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os_ref }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true # If not yet built this version, build it now diff --git a/.github/workflows/net-snmp.yml b/.github/workflows/net-snmp.yml index 99f156fe..891813f1 100644 --- a/.github/workflows/net-snmp.yml +++ b/.github/workflows/net-snmp.yml @@ -16,10 +16,12 @@ jobs: build_wolfprovider: uses: ./.github/workflows/build-wolfprovider.yml with: + os_ref: ${{ matrix.os_ref }} wolfssl_ref: ${{ matrix.wolfssl_ref }} openssl_ref: ${{ matrix.openssl_ref }} strategy: matrix: + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] @@ -30,12 +32,12 @@ jobs: strategy: fail-fast: false matrix: - os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] net_snmp_ref: ['v5.9.3'] wolfssl_ref: ['master', 'v5.8.0-stable'] openssl_ref: ['openssl-3.5.0'] force_fail: ['WOLFPROV_FORCE_FAIL=1', ''] - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.os_ref }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 @@ -54,7 +56,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os_ref }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true - name: Install dependencies diff --git a/.github/workflows/nginx.yml b/.github/workflows/nginx.yml index 5f67186b..5c4eda7d 100644 --- a/.github/workflows/nginx.yml +++ b/.github/workflows/nginx.yml @@ -16,10 +16,12 @@ jobs: build_wolfprovider: uses: ./.github/workflows/build-wolfprovider.yml with: + os_ref: ${{ matrix.os_ref }} wolfssl_ref: ${{ matrix.wolfssl_ref }} openssl_ref: ${{ matrix.openssl_ref }} strategy: matrix: + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] @@ -29,7 +31,7 @@ jobs: timeout-minutes: 20 strategy: matrix: - os: [ubuntu-22.04, ubuntu-24.04-arm] + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] nginx_ref: [ 'master', 'release-1.27.4' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] @@ -37,7 +39,7 @@ jobs: exclude: - nginx_ref: 'master' force_fail: 'WOLFPROV_FORCE_FAIL=1' - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.os_ref }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 @@ -56,7 +58,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os_ref }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true - name: Install dependencies diff --git a/.github/workflows/openldap.yml b/.github/workflows/openldap.yml index bb2fd001..123a63ae 100644 --- a/.github/workflows/openldap.yml +++ b/.github/workflows/openldap.yml @@ -16,10 +16,12 @@ jobs: build_wolfprovider: uses: ./.github/workflows/build-wolfprovider.yml with: + os_ref: ${{ matrix.os_ref }} wolfssl_ref: ${{ matrix.wolfssl_ref }} openssl_ref: ${{ matrix.openssl_ref }} strategy: matrix: + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] @@ -30,11 +32,11 @@ jobs: strategy: fail-fast: false matrix: - os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] openldap_ref: [ 'master', 'OPENLDAP_REL_ENG_2_5_13', 'OPENLDAP_REL_ENG_2_6_7' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.os_ref }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 @@ -53,7 +55,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os_ref }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true - name: Install dependencies diff --git a/.github/workflows/openssh.yml b/.github/workflows/openssh.yml index 1ada6272..381b174e 100644 --- a/.github/workflows/openssh.yml +++ b/.github/workflows/openssh.yml @@ -16,10 +16,12 @@ jobs: build_wolfprovider: uses: ./.github/workflows/build-wolfprovider.yml with: + os_ref: ${{ matrix.os_ref }} wolfssl_ref: ${{ matrix.wolfssl_ref }} openssl_ref: ${{ matrix.openssl_ref }} strategy: matrix: + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] @@ -29,7 +31,7 @@ jobs: timeout-minutes: 20 strategy: matrix: - os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] openssh_ref: [ 'master', 'V_10_0_P2', 'V_9_9_P1' ] @@ -37,7 +39,7 @@ jobs: exclude: - openssh_ref: 'master' force_fail: 'WOLFPROV_FORCE_FAIL=1' - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.os_ref }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 @@ -56,7 +58,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os_ref }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true - name: Checkout OSP diff --git a/.github/workflows/openvpn.yml b/.github/workflows/openvpn.yml index d9fcd210..53e3e5ff 100644 --- a/.github/workflows/openvpn.yml +++ b/.github/workflows/openvpn.yml @@ -16,10 +16,12 @@ jobs: build_wolfprovider: uses: ./.github/workflows/build-wolfprovider.yml with: + os_ref: ${{ matrix.os_ref }} wolfssl_ref: ${{ matrix.wolfssl_ref }} openssl_ref: ${{ matrix.openssl_ref }} strategy: matrix: + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] @@ -29,7 +31,7 @@ jobs: timeout-minutes: 20 strategy: matrix: - os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] openvpn_ref: [ 'master', 'v2.6.12' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] @@ -37,7 +39,7 @@ jobs: exclude: - openvpn_ref: 'master' force_fail: 'WOLFPROV_FORCE_FAIL=1' - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.os_ref }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 @@ -56,7 +58,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os_ref }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true - name: Install test dependencies diff --git a/.github/workflows/simple.yml b/.github/workflows/simple.yml index ce9e1b6a..11591511 100644 --- a/.github/workflows/simple.yml +++ b/.github/workflows/simple.yml @@ -18,11 +18,11 @@ jobs: timeout-minutes: 20 strategy: matrix: - os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] openssl_ref: [ 'master', 'openssl-3.5.0' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] force_fail: ['WOLFPROV_FORCE_FAIL=1', ''] - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.os_ref }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 @@ -41,7 +41,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os_ref }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true # If not yet built this version, build it now diff --git a/.github/workflows/socat.yml b/.github/workflows/socat.yml index e391edf7..c89c9f87 100644 --- a/.github/workflows/socat.yml +++ b/.github/workflows/socat.yml @@ -16,10 +16,12 @@ jobs: build_wolfprovider: uses: ./.github/workflows/build-wolfprovider.yml with: + os_ref: ${{ matrix.os_ref }} wolfssl_ref: ${{ matrix.wolfssl_ref }} openssl_ref: ${{ matrix.openssl_ref }} strategy: matrix: + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] @@ -29,10 +31,10 @@ jobs: timeout-minutes: 20 strategy: matrix: - os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.os_ref }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 @@ -51,7 +53,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os_ref }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true - name: Install dependencies diff --git a/.github/workflows/sssd.yml b/.github/workflows/sssd.yml index b0fffc5e..0ef2801c 100644 --- a/.github/workflows/sssd.yml +++ b/.github/workflows/sssd.yml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] sssd_ref: [ 'master', '2.9.1' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] @@ -30,7 +30,7 @@ jobs: exclude: - sssd_ref: 'master' force_fail: 'WOLFPROV_FORCE_FAIL=1' - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.os_ref }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 @@ -49,7 +49,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os_ref }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true # If not yet built this version, build it now diff --git a/.github/workflows/stunnel.yml b/.github/workflows/stunnel.yml index 6917af7f..47961b65 100644 --- a/.github/workflows/stunnel.yml +++ b/.github/workflows/stunnel.yml @@ -16,10 +16,12 @@ jobs: build_wolfprovider: uses: ./.github/workflows/build-wolfprovider.yml with: + os_ref: ${{ matrix.os_ref }} wolfssl_ref: ${{ matrix.wolfssl_ref }} openssl_ref: ${{ matrix.openssl_ref }} strategy: matrix: + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] @@ -29,7 +31,7 @@ jobs: timeout-minutes: 10 strategy: matrix: - os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] stunnel_ref: [ 'master', 'stunnel-5.67' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] @@ -37,7 +39,7 @@ jobs: exclude: - stunnel_ref: 'master' force_fail: 'WOLFPROV_FORCE_FAIL=1' - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.os_ref }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 @@ -56,7 +58,7 @@ jobs: openssl-install provider.conf - key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os_ref }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true - name: Install dependencies diff --git a/.github/workflows/tcpdump.yml b/.github/workflows/tcpdump.yml index 18839193..d071a947 100644 --- a/.github/workflows/tcpdump.yml +++ b/.github/workflows/tcpdump.yml @@ -13,10 +13,12 @@ jobs: build_wolfprovider: uses: ./.github/workflows/build-wolfprovider.yml with: + os_ref: ${{ matrix.os_ref }} wolfssl_ref: ${{ matrix.wolfssl_ref }} openssl_ref: ${{ matrix.openssl_ref }} strategy: matrix: + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] @@ -25,7 +27,7 @@ jobs: timeout-minutes: 15 strategy: matrix: - os: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] tcpdump_ref: [ 'master', 'tcpdump-4.99.3' ] @@ -33,7 +35,7 @@ jobs: exclude: - tcpdump_ref: 'master' force_fail: 'WOLFPROV_FORCE_FAIL=1' - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.os_ref }} steps: - name: Checkout wolfProvider @@ -52,7 +54,7 @@ jobs: wolfprov-install openssl-install provider.conf - key: wolfprov-${{ matrix.os }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + key: wolfprov-${{ matrix.os_ref }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true - name: Install test dependencies From 542264f1f76c2dad5c718ea67fe34ce95ba33b6e Mon Sep 17 00:00:00 2001 From: Aidan Garske Date: Tue, 17 Jun 2025 13:33:17 -0700 Subject: [PATCH 10/17] Use arch specific configs for binaries --- scripts/utils-openssl.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/utils-openssl.sh b/scripts/utils-openssl.sh index aa2eb5c7..c2b02440 100755 --- a/scripts/utils-openssl.sh +++ b/scripts/utils-openssl.sh @@ -90,10 +90,20 @@ install_openssl() { if [ ! -d ${OPENSSL_INSTALL_DIR} ]; then printf "\tConfigure OpenSSL ${OPENSSL_TAG} ... " if [ "$WOLFPROV_DEBUG" = "1" ]; then - ./config shared enable-trace --prefix=${OPENSSL_INSTALL_DIR} --debug >>$LOG_FILE 2>&1 + if [ "$OPENSSL_ARCH" = "linux-aarch64" ]; then + echo "Configuring OpenSSL for ARM64" + ./Configure linux-aarch64 shared enable-trace --prefix=${OPENSSL_INSTALL_DIR} --debug no-asm >>$LOG_FILE 2>&1 + else + ./config shared enable-trace --prefix=${OPENSSL_INSTALL_DIR} --debug >>$LOG_FILE 2>&1 + fi RET=$? else - ./config shared --prefix=${OPENSSL_INSTALL_DIR} >>$LOG_FILE 2>&1 + if [ "$OPENSSL_ARCH" = "linux-aarch64" ]; then + echo "Configuring OpenSSL for ARM64" + ./Configure linux-aarch64 shared --prefix=${OPENSSL_INSTALL_DIR} no-asm >>$LOG_FILE 2>&1 + else + ./config shared --prefix=${OPENSSL_INSTALL_DIR} >>$LOG_FILE 2>&1 + fi RET=$? fi if [ $RET != 0 ]; then From fb9d3292d4ea962517b30e4b159408d5b9f5066a Mon Sep 17 00:00:00 2001 From: Aidan Garske Date: Tue, 17 Jun 2025 13:37:26 -0700 Subject: [PATCH 11/17] Now cache openssl and wolfssl with correct arch --- .github/workflows/build-wolfprovider.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-wolfprovider.yml b/.github/workflows/build-wolfprovider.yml index b599d06b..093a16c4 100644 --- a/.github/workflows/build-wolfprovider.yml +++ b/.github/workflows/build-wolfprovider.yml @@ -81,7 +81,7 @@ jobs: openssl-source openssl-install - key: ossl-depends-${{ steps.openssl-ref.outputs.ref }} + key: ossl-depends-${{ inputs.os_ref }}-${{ steps.openssl-ref.outputs.ref }} lookup-only: false # Convert WolfSSL branch name to commit hash if needed @@ -107,7 +107,7 @@ jobs: wolfssl-source wolfssl-install - key: wolfssl-depends-${{ steps.wolfssl-ref.outputs.ref }} + key: wolfssl-depends-${{ inputs.os_ref }}-${{ steps.wolfssl-ref.outputs.ref }} lookup-only: false - name: Build wolfProvider @@ -142,7 +142,7 @@ jobs: path: | openssl-source openssl-install - key: ossl-depends-${{ steps.openssl-ref.outputs.ref }} + key: ossl-depends-${{ inputs.os_ref }}-${{ steps.openssl-ref.outputs.ref }} - name: Save WolfSSL into cache if: steps.wolfssl-cache.outputs.cache-hit != 'true' @@ -151,7 +151,7 @@ jobs: path: | wolfssl-source wolfssl-install - key: wolfssl-depends-${{ steps.wolfssl-ref.outputs.ref }} + key: wolfssl-depends-${{ inputs.os_ref }}-${{ steps.wolfssl-ref.outputs.ref }} - name: Print errors if: ${{ failure() }} From 8c8b2cd6aaae7c84ea6b2f8b42f1e76848ffec07 Mon Sep 17 00:00:00 2001 From: Aidan Garske Date: Tue, 17 Jun 2025 13:56:28 -0700 Subject: [PATCH 12/17] Remove asm so arch conflicts dont occur --- scripts/utils-wolfprovider.sh | 7 +++++++ scripts/utils-wolfssl.sh | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/scripts/utils-wolfprovider.sh b/scripts/utils-wolfprovider.sh index c3fe3824..4cb582d2 100755 --- a/scripts/utils-wolfprovider.sh +++ b/scripts/utils-wolfprovider.sh @@ -62,6 +62,13 @@ install_wolfprov() { WOLFPROV_CONFIG_OPTS+=" --enable-debug" fi + # Add ARM-specific configuration + if [ "$OPENSSL_ARCH" = "linux-aarch64" ]; then + printf "ARM build detected for wolfProvider ... " + # Ensure consistent behavior across architectures + WOLFPROV_CONFIG_CFLAGS+=" -DWOLFSSL_AARCH64_BUILD" + fi + ./configure ${WOLFPROV_CONFIG_OPTS} CFLAGS="${WOLFPROV_CONFIG_CFLAGS}" >>$LOG_FILE 2>&1 RET=$? diff --git a/scripts/utils-wolfssl.sh b/scripts/utils-wolfssl.sh index 380c8021..e38fbd04 100755 --- a/scripts/utils-wolfssl.sh +++ b/scripts/utils-wolfssl.sh @@ -119,6 +119,12 @@ install_wolfssl() { cd XXX-fips-test fi + # Disable assembly for ARM builds to avoid compatibility issues + if [ "$OPENSSL_ARCH" = "linux-aarch64" ]; then + printf "ARM build detected, disabling assembly optimizations ... " + CONF_ARGS+=" --disable-asm" + fi + ./configure ${CONF_ARGS} ${WOLFSSL_CONFIG_OPTS} CFLAGS="${WOLFSSL_CONFIG_CFLAGS}" >>$LOG_FILE 2>&1 if [ $? != 0 ]; then printf "ERROR running ./configure\n" From 616990f69fe1bab703af236829c3c0fe7fafa2e3 Mon Sep 17 00:00:00 2001 From: Aidan Garske Date: Tue, 17 Jun 2025 14:28:31 -0700 Subject: [PATCH 13/17] add debug for output --- scripts/utils-wolfprovider.sh | 7 ----- scripts/utils-wolfssl.sh | 53 ++++++++++++++++++++++++++++++----- 2 files changed, 46 insertions(+), 14 deletions(-) diff --git a/scripts/utils-wolfprovider.sh b/scripts/utils-wolfprovider.sh index 4cb582d2..c3fe3824 100755 --- a/scripts/utils-wolfprovider.sh +++ b/scripts/utils-wolfprovider.sh @@ -62,13 +62,6 @@ install_wolfprov() { WOLFPROV_CONFIG_OPTS+=" --enable-debug" fi - # Add ARM-specific configuration - if [ "$OPENSSL_ARCH" = "linux-aarch64" ]; then - printf "ARM build detected for wolfProvider ... " - # Ensure consistent behavior across architectures - WOLFPROV_CONFIG_CFLAGS+=" -DWOLFSSL_AARCH64_BUILD" - fi - ./configure ${WOLFPROV_CONFIG_OPTS} CFLAGS="${WOLFPROV_CONFIG_CFLAGS}" >>$LOG_FILE 2>&1 RET=$? diff --git a/scripts/utils-wolfssl.sh b/scripts/utils-wolfssl.sh index e38fbd04..40d8c1dc 100755 --- a/scripts/utils-wolfssl.sh +++ b/scripts/utils-wolfssl.sh @@ -27,7 +27,7 @@ WOLFSSL_SOURCE_DIR=${SCRIPT_DIR}/../wolfssl-source WOLFSSL_INSTALL_DIR=${SCRIPT_DIR}/../wolfssl-install WOLFSSL_ISFIPS=${WOLFSSL_ISFIPS:-0} WOLFSSL_CONFIG_OPTS=${WOLFSSL_CONFIG_OPTS:-'--enable-all-crypto --with-eccminsz=192 --with-max-ecc-bits=1024 --enable-opensslcoexist --enable-sha'} -WOLFSSL_CONFIG_CFLAGS=${WOLFSSL_CONFIG_CFLAGS:-"-I${OPENSSL_INSTALL_DIR}/include -DWC_RSA_NO_PADDING -DWOLFSSL_PUBLIC_MP -DHAVE_PUBLIC_FFDHE -DHAVE_FFDHE_6144 -DHAVE_FFDHE_8192 -DWOLFSSL_PSS_LONG_SALT -DWOLFSSL_PSS_SALT_LEN_DISCOVER -DRSA_MIN_SIZE=1024 -DWOLFSSL_OLD_OID_SUM -DWOLFSSL_BIND "} +WOLFSSL_CONFIG_CFLAGS=${WOLFSSL_CONFIG_CFLAGS:-"-I${OPENSSL_INSTALL_DIR}/include -DWC_RSA_NO_PADDING -DWOLFSSL_PUBLIC_MP -DHAVE_PUBLIC_FFDHE -DHAVE_FFDHE_6144 -DHAVE_FFDHE_8192 -DWOLFSSL_PSS_LONG_SALT -DWOLFSSL_PSS_SALT_LEN_DISCOVER -DRSA_MIN_SIZE=1024 -DWOLFSSL_OLD_OID_SUM -DWOLFSSL_BIND -DWOLFSSL_AESGCM_STREAM "} WOLFPROV_DEBUG=${WOLFPROV_DEBUG:-0} USE_CUR_TAG=${USE_CUR_TAG:-0} @@ -119,12 +119,11 @@ install_wolfssl() { cd XXX-fips-test fi - # Disable assembly for ARM builds to avoid compatibility issues - if [ "$OPENSSL_ARCH" = "linux-aarch64" ]; then - printf "ARM build detected, disabling assembly optimizations ... " - CONF_ARGS+=" --disable-asm" - fi - + # Debug: Print the configure command + echo "" + echo "=== wolfSSL configure command ===" + echo "./configure ${CONF_ARGS} ${WOLFSSL_CONFIG_OPTS} CFLAGS=\"${WOLFSSL_CONFIG_CFLAGS}\"" + ./configure ${CONF_ARGS} ${WOLFSSL_CONFIG_OPTS} CFLAGS="${WOLFSSL_CONFIG_CFLAGS}" >>$LOG_FILE 2>&1 if [ $? != 0 ]; then printf "ERROR running ./configure\n" @@ -144,6 +143,25 @@ install_wolfssl() { fi printf "Done.\n" + # Print wolfSSL configuration for debugging + printf "\tChecking wolfSSL configuration ... " + if [ -f "./config.status" ]; then + echo "" + echo "=== wolfSSL config.status output ===" + ./config.status --c + fi + if [ -f "./wolfssl/options.h" ]; then + echo "" + echo "=== WOLFSSL_AESGCM_STREAM definition ===" + AESGCM_STREAM_STATUS=$(grep -n "WOLFSSL_AESGCM_STREAM" ./wolfssl/options.h || echo "not found") + echo "$AESGCM_STREAM_STATUS" + + echo "" + echo "=== AES-GCM related definitions ===" + grep -n "GCM\|AESGCM" ./wolfssl/options.h || echo "No AES-GCM definitions found" + fi + printf "Done.\n" + if [ -n "$WOLFSSL_FIPS_BUNDLE" ]; then ./fips-hash.sh fi @@ -169,6 +187,27 @@ init_wolfssl() { install_wolfssl printf "\twolfSSL ${WOLFSSL_TAG} installed in: ${WOLFSSL_INSTALL_DIR}\n" + # Check wolfSSL configuration (even if already built) + cd ${WOLFSSL_SOURCE_DIR} + printf "\tChecking wolfSSL configuration ... " + if [ -f "./config.status" ]; then + echo "" + echo "=== wolfSSL config.status output ===" + ./config.status --c + fi + if [ -f "./wolfssl/options.h" ]; then + echo "" + echo "=== WOLFSSL_AESGCM_STREAM definition ===" + AESGCM_STREAM_STATUS=$(grep -n "WOLFSSL_AESGCM_STREAM" ./wolfssl/options.h || echo "not found") + echo "$AESGCM_STREAM_STATUS" + + echo "" + echo "=== AES-GCM related definitions ===" + grep -n "GCM\|AESGCM" ./wolfssl/options.h || echo "No AES-GCM definitions found" + fi + printf "Done.\n" + cd .. + if [ -z $LD_LIBRARY_PATH ]; then export LD_LIBRARY_PATH="$WOLFSSL_INSTALL_DIR/lib" else From 47c2139618f301c594dc74116b3c3ed400bc274e Mon Sep 17 00:00:00 2001 From: Aidan Garske Date: Tue, 17 Jun 2025 14:34:39 -0700 Subject: [PATCH 14/17] Remove debug output --- scripts/utils-wolfssl.sh | 47 +--------------------------------------- 1 file changed, 1 insertion(+), 46 deletions(-) diff --git a/scripts/utils-wolfssl.sh b/scripts/utils-wolfssl.sh index 40d8c1dc..380c8021 100755 --- a/scripts/utils-wolfssl.sh +++ b/scripts/utils-wolfssl.sh @@ -27,7 +27,7 @@ WOLFSSL_SOURCE_DIR=${SCRIPT_DIR}/../wolfssl-source WOLFSSL_INSTALL_DIR=${SCRIPT_DIR}/../wolfssl-install WOLFSSL_ISFIPS=${WOLFSSL_ISFIPS:-0} WOLFSSL_CONFIG_OPTS=${WOLFSSL_CONFIG_OPTS:-'--enable-all-crypto --with-eccminsz=192 --with-max-ecc-bits=1024 --enable-opensslcoexist --enable-sha'} -WOLFSSL_CONFIG_CFLAGS=${WOLFSSL_CONFIG_CFLAGS:-"-I${OPENSSL_INSTALL_DIR}/include -DWC_RSA_NO_PADDING -DWOLFSSL_PUBLIC_MP -DHAVE_PUBLIC_FFDHE -DHAVE_FFDHE_6144 -DHAVE_FFDHE_8192 -DWOLFSSL_PSS_LONG_SALT -DWOLFSSL_PSS_SALT_LEN_DISCOVER -DRSA_MIN_SIZE=1024 -DWOLFSSL_OLD_OID_SUM -DWOLFSSL_BIND -DWOLFSSL_AESGCM_STREAM "} +WOLFSSL_CONFIG_CFLAGS=${WOLFSSL_CONFIG_CFLAGS:-"-I${OPENSSL_INSTALL_DIR}/include -DWC_RSA_NO_PADDING -DWOLFSSL_PUBLIC_MP -DHAVE_PUBLIC_FFDHE -DHAVE_FFDHE_6144 -DHAVE_FFDHE_8192 -DWOLFSSL_PSS_LONG_SALT -DWOLFSSL_PSS_SALT_LEN_DISCOVER -DRSA_MIN_SIZE=1024 -DWOLFSSL_OLD_OID_SUM -DWOLFSSL_BIND "} WOLFPROV_DEBUG=${WOLFPROV_DEBUG:-0} USE_CUR_TAG=${USE_CUR_TAG:-0} @@ -119,11 +119,6 @@ install_wolfssl() { cd XXX-fips-test fi - # Debug: Print the configure command - echo "" - echo "=== wolfSSL configure command ===" - echo "./configure ${CONF_ARGS} ${WOLFSSL_CONFIG_OPTS} CFLAGS=\"${WOLFSSL_CONFIG_CFLAGS}\"" - ./configure ${CONF_ARGS} ${WOLFSSL_CONFIG_OPTS} CFLAGS="${WOLFSSL_CONFIG_CFLAGS}" >>$LOG_FILE 2>&1 if [ $? != 0 ]; then printf "ERROR running ./configure\n" @@ -143,25 +138,6 @@ install_wolfssl() { fi printf "Done.\n" - # Print wolfSSL configuration for debugging - printf "\tChecking wolfSSL configuration ... " - if [ -f "./config.status" ]; then - echo "" - echo "=== wolfSSL config.status output ===" - ./config.status --c - fi - if [ -f "./wolfssl/options.h" ]; then - echo "" - echo "=== WOLFSSL_AESGCM_STREAM definition ===" - AESGCM_STREAM_STATUS=$(grep -n "WOLFSSL_AESGCM_STREAM" ./wolfssl/options.h || echo "not found") - echo "$AESGCM_STREAM_STATUS" - - echo "" - echo "=== AES-GCM related definitions ===" - grep -n "GCM\|AESGCM" ./wolfssl/options.h || echo "No AES-GCM definitions found" - fi - printf "Done.\n" - if [ -n "$WOLFSSL_FIPS_BUNDLE" ]; then ./fips-hash.sh fi @@ -187,27 +163,6 @@ init_wolfssl() { install_wolfssl printf "\twolfSSL ${WOLFSSL_TAG} installed in: ${WOLFSSL_INSTALL_DIR}\n" - # Check wolfSSL configuration (even if already built) - cd ${WOLFSSL_SOURCE_DIR} - printf "\tChecking wolfSSL configuration ... " - if [ -f "./config.status" ]; then - echo "" - echo "=== wolfSSL config.status output ===" - ./config.status --c - fi - if [ -f "./wolfssl/options.h" ]; then - echo "" - echo "=== WOLFSSL_AESGCM_STREAM definition ===" - AESGCM_STREAM_STATUS=$(grep -n "WOLFSSL_AESGCM_STREAM" ./wolfssl/options.h || echo "not found") - echo "$AESGCM_STREAM_STATUS" - - echo "" - echo "=== AES-GCM related definitions ===" - grep -n "GCM\|AESGCM" ./wolfssl/options.h || echo "No AES-GCM definitions found" - fi - printf "Done.\n" - cd .. - if [ -z $LD_LIBRARY_PATH ]; then export LD_LIBRARY_PATH="$WOLFSSL_INSTALL_DIR/lib" else From 2af4ba2173c5344d125d4ed05ff214c44f5de082 Mon Sep 17 00:00:00 2001 From: Aidan Garske Date: Tue, 17 Jun 2025 15:36:20 -0700 Subject: [PATCH 15/17] Add back original workflow format --- .github/workflows/multi-compiler.yml | 41 ++++++++++++++++++++-------- .github/workflows/simple.yml | 18 ++++++++---- .github/workflows/sssd.yml | 15 +++++----- scripts/utils-openssl.sh | 15 ++-------- 4 files changed, 52 insertions(+), 37 deletions(-) diff --git a/.github/workflows/multi-compiler.yml b/.github/workflows/multi-compiler.yml index 98fe3f14..2ecc5e56 100644 --- a/.github/workflows/multi-compiler.yml +++ b/.github/workflows/multi-compiler.yml @@ -15,54 +15,61 @@ concurrency: jobs: build_wolfprovider: name: Build with ${{ matrix.CC }} - runs-on: ${{ matrix.os_ref }} + runs-on: ${{ matrix.OS }} timeout-minutes: 20 strategy: fail-fast: false matrix: - os_ref: [ubuntu-latest, ubuntu-22.04, ubuntu-24.04-arm] - openssl_ref: [ 'master', 'openssl-3.5.0' ] include: - CC: gcc-9 CXX: g++-9 + OS: ubuntu-latest wolfssl_ref: master - CC: gcc-10 CXX: g++-10 + OS: ubuntu-latest wolfssl_ref: master - CC: gcc-10 CXX: g++-10 + OS: ubuntu-latest wolfssl_ref: v5.8.0-stable - CC: gcc-11 CXX: g++-11 + OS: ubuntu-latest wolfssl_ref: master - CC: gcc-12 CXX: g++-12 + OS: ubuntu-latest wolfssl_ref: master - CC: clang-12 CXX: clang++-12 + OS: ubuntu-22.04 wolfssl_ref: master - CC: clang-13 CXX: clang++-13 + OS: ubuntu-22.04 wolfssl_ref: master - CC: clang-14 CXX: clang++-14 + OS: ubuntu-latest wolfssl_ref: master - CC: clang-15 CXX: clang++-15 + OS: ubuntu-latest wolfssl_ref: master steps: - name: Checkout wolfProvider uses: actions/checkout@v4 - with: - fetch-depth: 1 - name: Install dependencies run: | sudo apt-get update sudo apt-get install -y ${{ matrix.CC }} ${{ matrix.CXX }} automake libtool - - name: Retrieving wolfSSL/wolfProvider from cache - uses: actions/cache/restore@v4 + # Check if this version of wolfssl/wolfprovider has already been built, + # mark to cache these items on post if we do end up building + - name: Checking wolfSSL/wolfProvider in cache + uses: actions/cache@v4 id: wolfprov-cache with: path: | @@ -70,11 +77,23 @@ jobs: wolfssl-source wolfssl-install wolfprov-install - openssl-install provider.conf - key: wolfprov-${{ matrix.os_ref }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} - fail-on-cache-miss: true + key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.CC }}-${{ github.sha }} + lookup-only: true + + # If wolfssl/wolfprovider have not yet been built, pull ossl from cache + - name: Checking OpenSSL in cache + if: steps.wolfprov-cache.outputs.cache-hit != 'true' + uses: actions/cache@v4 + id: openssl-cache + with: + path: | + openssl-source + openssl-install + + key: ossl-depends-${{ matrix.wolfssl_ref }}-${{ matrix.CC }}-${{ github.sha }} + lookup-only: true # If not yet built this version, build it now - name: Build wolfProvider @@ -83,7 +102,7 @@ jobs: CC: ${{ matrix.CC }} CXX: ${{ matrix.CXX }} run: | - OPENSSL_TAG=${{ matrix.openssl_ref }} WOLFSSL_TAG=${{ matrix.wolfssl_ref }} ./scripts/build-wolfprovider.sh + WOLFSSL_TAG=${{ matrix.wolfssl_ref }} ./scripts/build-wolfprovider.sh - name: Print errors if: ${{ failure() }} diff --git a/.github/workflows/simple.yml b/.github/workflows/simple.yml index 11591511..f6a16a55 100644 --- a/.github/workflows/simple.yml +++ b/.github/workflows/simple.yml @@ -13,6 +13,18 @@ concurrency: # END OF COMMON SECTION jobs: + build-wolfprovider: + uses: ./.github/workflows/build-wolfprovider.yml + with: + os_ref: ${{ matrix.os_ref }} + wolfssl_ref: ${{ matrix.wolfssl_ref }} + openssl_ref: ${{ matrix.openssl_ref }} + strategy: + matrix: + os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] + wolfssl_ref: [ 'master', 'v5.8.0-stable' ] + openssl_ref: [ 'master', 'openssl-3.5.0' ] + simple_test: name: Simple Test timeout-minutes: 20 @@ -44,12 +56,6 @@ jobs: key: wolfprov-${{ matrix.os_ref }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} fail-on-cache-miss: true - # If not yet built this version, build it now - - name: Build wolfProvider - if: steps.wolfprov-cache.outputs.cache-hit != 'true' - run: | - OPENSSL_TAG=${{ matrix.openssl_ref }} WOLFSSL_TAG=${{ matrix.wolfssl_ref }} ./scripts/build-wolfprovider.sh - - name: Run simple tests run: | ./scripts/cmd_test/do-cmd-tests.sh ${{ matrix.force_fail }} diff --git a/.github/workflows/sssd.yml b/.github/workflows/sssd.yml index 0ef2801c..7ef76411 100644 --- a/.github/workflows/sssd.yml +++ b/.github/workflows/sssd.yml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - os_ref: [ 'ubuntu-22.04', 'ubuntu-24.04-arm' ] + os: [ubuntu-22.04, ubuntu-24.04-arm] sssd_ref: [ 'master', '2.9.1' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] @@ -30,27 +30,28 @@ jobs: exclude: - sssd_ref: 'master' force_fail: 'WOLFPROV_FORCE_FAIL=1' - runs-on: ${{ matrix.os_ref }} + runs-on: ${{ matrix.os }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4 with: fetch-depth: 1 - - name: Retrieving wolfSSL/wolfProvider from cache - uses: actions/cache/restore@v4 + # Check if this version of wolfssl/wolfprovider has already been built, + # mark to cache these items on post if we do end up building + - name: Checking wolfSSL/wolfProvider in cache + uses: actions/cache@v4 id: wolfprov-cache with: path: | - scripts wolfssl-source wolfssl-install wolfprov-install openssl-install provider.conf - key: wolfprov-${{ matrix.os_ref }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} - fail-on-cache-miss: true + key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }} + lookup-only: true # If not yet built this version, build it now - name: Build wolfProvider diff --git a/scripts/utils-openssl.sh b/scripts/utils-openssl.sh index c2b02440..0d11df23 100755 --- a/scripts/utils-openssl.sh +++ b/scripts/utils-openssl.sh @@ -90,21 +90,10 @@ install_openssl() { if [ ! -d ${OPENSSL_INSTALL_DIR} ]; then printf "\tConfigure OpenSSL ${OPENSSL_TAG} ... " if [ "$WOLFPROV_DEBUG" = "1" ]; then - if [ "$OPENSSL_ARCH" = "linux-aarch64" ]; then - echo "Configuring OpenSSL for ARM64" - ./Configure linux-aarch64 shared enable-trace --prefix=${OPENSSL_INSTALL_DIR} --debug no-asm >>$LOG_FILE 2>&1 - else - ./config shared enable-trace --prefix=${OPENSSL_INSTALL_DIR} --debug >>$LOG_FILE 2>&1 - fi + ./config shared enable-trace --prefix=${OPENSSL_INSTALL_DIR} --debug >>$LOG_FILE 2>&1 RET=$? else - if [ "$OPENSSL_ARCH" = "linux-aarch64" ]; then - echo "Configuring OpenSSL for ARM64" - ./Configure linux-aarch64 shared --prefix=${OPENSSL_INSTALL_DIR} no-asm >>$LOG_FILE 2>&1 - else - ./config shared --prefix=${OPENSSL_INSTALL_DIR} >>$LOG_FILE 2>&1 - fi - RET=$? + ./config shared --prefix=${OPENSSL_INSTALL_DIR} >>$LOG_FILE 2>&1 fi if [ $RET != 0 ]; then printf "ERROR.\n" From d5fffbec99170a5aade41f5be957676fd8269f62 Mon Sep 17 00:00:00 2001 From: Aidan Garske Date: Tue, 17 Jun 2025 15:37:56 -0700 Subject: [PATCH 16/17] Add missing ret statemnt --- scripts/utils-openssl.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/utils-openssl.sh b/scripts/utils-openssl.sh index 0d11df23..aa2eb5c7 100755 --- a/scripts/utils-openssl.sh +++ b/scripts/utils-openssl.sh @@ -94,6 +94,7 @@ install_openssl() { RET=$? else ./config shared --prefix=${OPENSSL_INSTALL_DIR} >>$LOG_FILE 2>&1 + RET=$? fi if [ $RET != 0 ]; then printf "ERROR.\n" From 3c4bde5388be7495a6a51db9033240e64136de59 Mon Sep 17 00:00:00 2001 From: Aidan Garske Date: Tue, 17 Jun 2025 15:55:10 -0700 Subject: [PATCH 17/17] fix sssd ref --- .github/workflows/sssd.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/sssd.yml b/.github/workflows/sssd.yml index 7ef76411..146ad34c 100644 --- a/.github/workflows/sssd.yml +++ b/.github/workflows/sssd.yml @@ -14,6 +14,7 @@ concurrency: jobs: test_sssd: + runs-on: ubuntu-22.04 timeout-minutes: 20 container: image: quay.io/sssd/ci-client-devel:ubuntu-latest @@ -22,7 +23,6 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-22.04, ubuntu-24.04-arm] sssd_ref: [ 'master', '2.9.1' ] wolfssl_ref: [ 'master', 'v5.8.0-stable' ] openssl_ref: [ 'openssl-3.5.0' ] @@ -30,7 +30,6 @@ jobs: exclude: - sssd_ref: 'master' force_fail: 'WOLFPROV_FORCE_FAIL=1' - runs-on: ${{ matrix.os }} steps: - name: Checkout wolfProvider uses: actions/checkout@v4