From 7162a35534c9daeb92b91964aaa2c19aa2d219e0 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 18 Feb 2025 07:00:00 +0000 Subject: [PATCH 01/24] Add GitHub Actions workflow for testing g++ and clang compilation Co-Authored-By: andrew@wolfssl.com --- .github/workflows/multi-compiler.yml | 53 ++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/multi-compiler.yml diff --git a/.github/workflows/multi-compiler.yml b/.github/workflows/multi-compiler.yml new file mode 100644 index 000000000..132470a93 --- /dev/null +++ b/.github/workflows/multi-compiler.yml @@ -0,0 +1,53 @@ +name: Multiple compilers and versions + +on: + push: + branches: [ 'master', 'main', 'release/**' ] + pull_request: + branches: [ '*' ] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + my_matrix: + name: Compiler test + strategy: + fail-fast: false + matrix: + include: + - CC: gcc-9 + CXX: g++-9 + - CC: gcc-10 + CXX: g++-10 + - CC: gcc-11 + CXX: g++-11 + - CC: gcc-12 + CXX: g++-12 + - CC: clang-10 + CXX: clang++-10 + - CC: clang-11 + CXX: clang++-11 + - CC: clang-12 + CXX: clang++-12 + - CC: clang-13 + CXX: clang++-13 + - CC: clang-14 + CXX: clang++-14 + if: github.repository_owner == 'wolfSSL' + runs-on: ubuntu-latest + timeout-minutes: 4 + steps: + - name: Install dependencies + run: export DEBIAN_FRONTEND=noninteractive && sudo apt-get update && sudo apt-get install -y ${{ matrix.CC }} + - uses: actions/checkout@v4 + - name: Build + env: + CC: ${{ matrix.CC }} + CXX: ${{ matrix.CXX }} + run: ./autogen.sh && ./configure && make && make dist + - name: Show log on errors + if: ${{ failure() }} + run: | + cat config.log From fb279055f6aa82757a7b69319227d9bb12f8148d Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 18 Feb 2025 07:03:03 +0000 Subject: [PATCH 02/24] Update workflow to use Ubuntu 20.04/22.04 instead of ubuntu-latest Co-Authored-By: andrew@wolfssl.com --- .github/workflows/multi-compiler.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/multi-compiler.yml b/.github/workflows/multi-compiler.yml index 132470a93..e75b617b9 100644 --- a/.github/workflows/multi-compiler.yml +++ b/.github/workflows/multi-compiler.yml @@ -19,24 +19,33 @@ jobs: include: - CC: gcc-9 CXX: g++-9 + OS: ubuntu-22.04 - CC: gcc-10 CXX: g++-10 + OS: ubuntu-22.04 - CC: gcc-11 CXX: g++-11 + OS: ubuntu-22.04 - CC: gcc-12 CXX: g++-12 + OS: ubuntu-22.04 - CC: clang-10 CXX: clang++-10 + OS: ubuntu-20.04 - CC: clang-11 CXX: clang++-11 + OS: ubuntu-20.04 - CC: clang-12 CXX: clang++-12 + OS: ubuntu-20.04 - CC: clang-13 CXX: clang++-13 + OS: ubuntu-22.04 - CC: clang-14 CXX: clang++-14 + OS: ubuntu-22.04 if: github.repository_owner == 'wolfSSL' - runs-on: ubuntu-latest + runs-on: ${{ matrix.OS }} timeout-minutes: 4 steps: - name: Install dependencies From a6373dfc5c3573a962ee7512e74f2b3a0f17670f Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 18 Feb 2025 07:10:24 +0000 Subject: [PATCH 03/24] Update workflow to include wolfSSL dependency Co-Authored-By: andrew@wolfssl.com --- .github/workflows/multi-compiler.yml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/multi-compiler.yml b/.github/workflows/multi-compiler.yml index e75b617b9..926b492f7 100644 --- a/.github/workflows/multi-compiler.yml +++ b/.github/workflows/multi-compiler.yml @@ -11,8 +11,27 @@ concurrency: cancel-in-progress: true jobs: + build_wolfssl: + name: Build wolfSSL + runs-on: ${{ matrix.OS }} + strategy: + fail-fast: false + matrix: + OS: [ubuntu-20.04, ubuntu-22.04] + timeout-minutes: 4 + steps: + - name: Checkout, build, and install wolfssl + uses: wolfSSL/actions-build-autotools-project@v1 + with: + repository: wolfssl/wolfssl + path: wolfssl + configure: --enable-all + check: false + install: true + my_matrix: name: Compiler test + needs: build_wolfssl strategy: fail-fast: false matrix: @@ -55,7 +74,12 @@ jobs: env: CC: ${{ matrix.CC }} CXX: ${{ matrix.CXX }} - run: ./autogen.sh && ./configure && make && make dist + uses: wolfSSL/actions-build-autotools-project@v1 + with: + repository: wolfssl/wolfssh + path: wolfssh + configure: LDFLAGS="-L${{ github.workspace }}/build-dir/lib" CPPFLAGS="-I${{ github.workspace }}/build-dir/include" + check: true - name: Show log on errors if: ${{ failure() }} run: | From 2b44462aa4c807b54b168f30d2240b7f059b0b81 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 18 Feb 2025 07:14:03 +0000 Subject: [PATCH 04/24] Fix compiler tests by adding wolfSSL build caching Co-Authored-By: andrew@wolfssl.com --- .github/workflows/multi-compiler.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/multi-compiler.yml b/.github/workflows/multi-compiler.yml index 926b492f7..64d1940e9 100644 --- a/.github/workflows/multi-compiler.yml +++ b/.github/workflows/multi-compiler.yml @@ -28,6 +28,11 @@ jobs: configure: --enable-all check: false install: true + - name: Cache wolfSSL build + uses: actions/cache@v4 + with: + path: build-dir/ + key: wolfssh-compiler-test-wolfssl-${{ matrix.OS }} my_matrix: name: Compiler test @@ -70,6 +75,12 @@ jobs: - name: Install dependencies run: export DEBIAN_FRONTEND=noninteractive && sudo apt-get update && sudo apt-get install -y ${{ matrix.CC }} - uses: actions/checkout@v4 + - name: Restore wolfSSL build + uses: actions/cache@v4 + with: + path: build-dir/ + key: wolfssh-compiler-test-wolfssl-${{ matrix.OS }} + fail-on-cache-miss: true - name: Build env: CC: ${{ matrix.CC }} From b198ebf14bf68f74a51becafefcc7da4779043bc Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 18 Feb 2025 07:16:38 +0000 Subject: [PATCH 05/24] Fix wolfSSL installation path to match cache location Co-Authored-By: andrew@wolfssl.com --- .github/workflows/multi-compiler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/multi-compiler.yml b/.github/workflows/multi-compiler.yml index 64d1940e9..38ed78249 100644 --- a/.github/workflows/multi-compiler.yml +++ b/.github/workflows/multi-compiler.yml @@ -25,7 +25,7 @@ jobs: with: repository: wolfssl/wolfssl path: wolfssl - configure: --enable-all + configure: --enable-all --prefix=${{ github.workspace }}/build-dir check: false install: true - name: Cache wolfSSL build From 403c79547772c08d62368e143ce9f728031bbb79 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 18 Feb 2025 07:54:08 +0000 Subject: [PATCH 06/24] Use upload-artifact for config.log instead of cat Co-Authored-By: andrew@wolfssl.com --- .github/workflows/multi-compiler.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/multi-compiler.yml b/.github/workflows/multi-compiler.yml index 38ed78249..b84682b3e 100644 --- a/.github/workflows/multi-compiler.yml +++ b/.github/workflows/multi-compiler.yml @@ -91,7 +91,9 @@ jobs: path: wolfssh configure: LDFLAGS="-L${{ github.workspace }}/build-dir/lib" CPPFLAGS="-I${{ github.workspace }}/build-dir/include" check: true - - name: Show log on errors + - name: Upload config.log on errors if: ${{ failure() }} - run: | - cat config.log + uses: actions/upload-artifact@v4 + with: + name: config-log-${{ matrix.CC }}-${{ matrix.OS }} + path: config.log From a7d1b59af61f0219e1c810899a928741e6769b13 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 18:09:56 +0000 Subject: [PATCH 07/24] Add g++ compiler test and update artifact upload Co-Authored-By: andrew@wolfssl.com --- .github/workflows/multi-compiler.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/multi-compiler.yml b/.github/workflows/multi-compiler.yml index b84682b3e..9ab08b83f 100644 --- a/.github/workflows/multi-compiler.yml +++ b/.github/workflows/multi-compiler.yml @@ -41,6 +41,9 @@ jobs: fail-fast: false matrix: include: + - CC: g++ + CXX: g++ + OS: ubuntu-22.04 - CC: gcc-9 CXX: g++-9 OS: ubuntu-22.04 @@ -73,7 +76,12 @@ jobs: timeout-minutes: 4 steps: - name: Install dependencies - run: export DEBIAN_FRONTEND=noninteractive && sudo apt-get update && sudo apt-get install -y ${{ matrix.CC }} + run: | + export DEBIAN_FRONTEND=noninteractive + sudo apt-get update + if [ "${{ matrix.CC }}" != "g++" ]; then + sudo apt-get install -y ${{ matrix.CC }} + fi - uses: actions/checkout@v4 - name: Restore wolfSSL build uses: actions/cache@v4 From de3b40493e1bbb6b99bf984f24e839f081730bfd Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 18:10:22 +0000 Subject: [PATCH 08/24] Pass CC and CXX to configure for proper g++ testing Co-Authored-By: andrew@wolfssl.com --- .github/workflows/multi-compiler.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/multi-compiler.yml b/.github/workflows/multi-compiler.yml index 9ab08b83f..4b30d1e23 100644 --- a/.github/workflows/multi-compiler.yml +++ b/.github/workflows/multi-compiler.yml @@ -97,7 +97,11 @@ jobs: with: repository: wolfssl/wolfssh path: wolfssh - configure: LDFLAGS="-L${{ github.workspace }}/build-dir/lib" CPPFLAGS="-I${{ github.workspace }}/build-dir/include" + configure: >- + CC="${{ matrix.CC }}" + CXX="${{ matrix.CXX }}" + LDFLAGS="-L${{ github.workspace }}/build-dir/lib" + CPPFLAGS="-I${{ github.workspace }}/build-dir/include" check: true - name: Upload config.log on errors if: ${{ failure() }} From 31edbeff8f0720870fb2df9ee7f01ca0a7c13cd6 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 18:14:33 +0000 Subject: [PATCH 09/24] Add --enable-all flag to configure for g++ test Co-Authored-By: andrew@wolfssl.com --- .github/workflows/multi-compiler.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/multi-compiler.yml b/.github/workflows/multi-compiler.yml index 4b30d1e23..d786a5a84 100644 --- a/.github/workflows/multi-compiler.yml +++ b/.github/workflows/multi-compiler.yml @@ -102,6 +102,7 @@ jobs: CXX="${{ matrix.CXX }}" LDFLAGS="-L${{ github.workspace }}/build-dir/lib" CPPFLAGS="-I${{ github.workspace }}/build-dir/include" + --enable-all check: true - name: Upload config.log on errors if: ${{ failure() }} From db26b6920ce6b1b28b803244ae9c9f8705a6fa6c Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 18:14:59 +0000 Subject: [PATCH 10/24] Fix environment variables for g++ test Co-Authored-By: andrew@wolfssl.com --- .github/workflows/multi-compiler.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/multi-compiler.yml b/.github/workflows/multi-compiler.yml index d786a5a84..a00caead8 100644 --- a/.github/workflows/multi-compiler.yml +++ b/.github/workflows/multi-compiler.yml @@ -93,16 +93,13 @@ jobs: env: CC: ${{ matrix.CC }} CXX: ${{ matrix.CXX }} + LDFLAGS: "-L${{ github.workspace }}/build-dir/lib" + CPPFLAGS: "-I${{ github.workspace }}/build-dir/include" uses: wolfSSL/actions-build-autotools-project@v1 with: repository: wolfssl/wolfssh path: wolfssh - configure: >- - CC="${{ matrix.CC }}" - CXX="${{ matrix.CXX }}" - LDFLAGS="-L${{ github.workspace }}/build-dir/lib" - CPPFLAGS="-I${{ github.workspace }}/build-dir/include" - --enable-all + configure: --enable-all check: true - name: Upload config.log on errors if: ${{ failure() }} From 6f5dbc722ddfa0c84083006cdc177cf98b146da3 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 18:18:23 +0000 Subject: [PATCH 11/24] Fix LDFLAGS and CPPFLAGS format for g++ test Co-Authored-By: andrew@wolfssl.com --- .github/workflows/multi-compiler.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/multi-compiler.yml b/.github/workflows/multi-compiler.yml index a00caead8..88a093a89 100644 --- a/.github/workflows/multi-compiler.yml +++ b/.github/workflows/multi-compiler.yml @@ -93,8 +93,8 @@ jobs: env: CC: ${{ matrix.CC }} CXX: ${{ matrix.CXX }} - LDFLAGS: "-L${{ github.workspace }}/build-dir/lib" - CPPFLAGS: "-I${{ github.workspace }}/build-dir/include" + LDFLAGS: -L${{ github.workspace }}/build-dir/lib + CPPFLAGS: -I${{ github.workspace }}/build-dir/include uses: wolfSSL/actions-build-autotools-project@v1 with: repository: wolfssl/wolfssh From cd6409f099b9c5a8c999c2c4693a254a2b4414e8 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 18:21:24 +0000 Subject: [PATCH 12/24] Add --enable-wolfssh flag and PKG_CONFIG_PATH for g++ test Co-Authored-By: andrew@wolfssl.com --- .github/workflows/multi-compiler.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/multi-compiler.yml b/.github/workflows/multi-compiler.yml index 88a093a89..56bb247bd 100644 --- a/.github/workflows/multi-compiler.yml +++ b/.github/workflows/multi-compiler.yml @@ -25,7 +25,7 @@ jobs: with: repository: wolfssl/wolfssl path: wolfssl - configure: --enable-all --prefix=${{ github.workspace }}/build-dir + configure: --enable-all --enable-wolfssh --prefix=${{ github.workspace }}/build-dir check: false install: true - name: Cache wolfSSL build @@ -93,8 +93,9 @@ jobs: env: CC: ${{ matrix.CC }} CXX: ${{ matrix.CXX }} - LDFLAGS: -L${{ github.workspace }}/build-dir/lib - CPPFLAGS: -I${{ github.workspace }}/build-dir/include + LDFLAGS: "-L${{ github.workspace }}/build-dir/lib" + CPPFLAGS: "-I${{ github.workspace }}/build-dir/include" + PKG_CONFIG_PATH: "${{ github.workspace }}/build-dir/lib/pkgconfig" uses: wolfSSL/actions-build-autotools-project@v1 with: repository: wolfssl/wolfssh From f4f9a75decfabb007bf032a8ac91cee8881b749d Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 18:24:44 +0000 Subject: [PATCH 13/24] Add LD_LIBRARY_PATH and --with-wolfssl path for g++ test Co-Authored-By: andrew@wolfssl.com --- .github/workflows/multi-compiler.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/multi-compiler.yml b/.github/workflows/multi-compiler.yml index 56bb247bd..0bcff0d22 100644 --- a/.github/workflows/multi-compiler.yml +++ b/.github/workflows/multi-compiler.yml @@ -96,11 +96,12 @@ jobs: LDFLAGS: "-L${{ github.workspace }}/build-dir/lib" CPPFLAGS: "-I${{ github.workspace }}/build-dir/include" PKG_CONFIG_PATH: "${{ github.workspace }}/build-dir/lib/pkgconfig" + LD_LIBRARY_PATH: "${{ github.workspace }}/build-dir/lib" uses: wolfSSL/actions-build-autotools-project@v1 with: repository: wolfssl/wolfssh path: wolfssh - configure: --enable-all + configure: --enable-all --with-wolfssl=${{ github.workspace }}/build-dir check: true - name: Upload config.log on errors if: ${{ failure() }} From 648195809bbb9b161a6a41eb94bf654c4811fc79 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 18:28:18 +0000 Subject: [PATCH 14/24] Enable C++ support in wolfSSL and fix linking flags Co-Authored-By: andrew@wolfssl.com --- .github/workflows/multi-compiler.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/multi-compiler.yml b/.github/workflows/multi-compiler.yml index 0bcff0d22..e5c61ce22 100644 --- a/.github/workflows/multi-compiler.yml +++ b/.github/workflows/multi-compiler.yml @@ -25,7 +25,7 @@ jobs: with: repository: wolfssl/wolfssl path: wolfssl - configure: --enable-all --enable-wolfssh --prefix=${{ github.workspace }}/build-dir + configure: --enable-all --enable-wolfssh --enable-cxx --prefix=${{ github.workspace }}/build-dir check: false install: true - name: Cache wolfSSL build @@ -101,7 +101,7 @@ jobs: with: repository: wolfssl/wolfssh path: wolfssh - configure: --enable-all --with-wolfssl=${{ github.workspace }}/build-dir + configure: --enable-all --with-wolfssl=${{ github.workspace }}/build-dir CFLAGS="-I${{ github.workspace }}/build-dir/include" LDFLAGS="-L${{ github.workspace }}/build-dir/lib -lwolfssl" check: true - name: Upload config.log on errors if: ${{ failure() }} From 849a93ad4f1c8f5589d31526e139d1962aa360df Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 18:29:36 +0000 Subject: [PATCH 15/24] Remove unsupported --enable-cxx flag and fix linking flags Co-Authored-By: andrew@wolfssl.com --- .github/workflows/multi-compiler.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/multi-compiler.yml b/.github/workflows/multi-compiler.yml index e5c61ce22..dcacbb271 100644 --- a/.github/workflows/multi-compiler.yml +++ b/.github/workflows/multi-compiler.yml @@ -25,7 +25,7 @@ jobs: with: repository: wolfssl/wolfssl path: wolfssl - configure: --enable-all --enable-wolfssh --enable-cxx --prefix=${{ github.workspace }}/build-dir + configure: --enable-all --enable-wolfssh --prefix=${{ github.workspace }}/build-dir check: false install: true - name: Cache wolfSSL build @@ -101,7 +101,7 @@ jobs: with: repository: wolfssl/wolfssh path: wolfssh - configure: --enable-all --with-wolfssl=${{ github.workspace }}/build-dir CFLAGS="-I${{ github.workspace }}/build-dir/include" LDFLAGS="-L${{ github.workspace }}/build-dir/lib -lwolfssl" + configure: --enable-all --with-wolfssl=${{ github.workspace }}/build-dir CPPFLAGS="-I${{ github.workspace }}/build-dir/include" LDFLAGS="-L${{ github.workspace }}/build-dir/lib -lwolfssl" check: true - name: Upload config.log on errors if: ${{ failure() }} From 2aa3b2f86c71a38ecb47135554b51732f82f5617 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 18:32:56 +0000 Subject: [PATCH 16/24] Fix environment variables for g++ test Co-Authored-By: andrew@wolfssl.com --- .github/workflows/multi-compiler.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/multi-compiler.yml b/.github/workflows/multi-compiler.yml index dcacbb271..1e8cb2c64 100644 --- a/.github/workflows/multi-compiler.yml +++ b/.github/workflows/multi-compiler.yml @@ -93,15 +93,16 @@ jobs: env: CC: ${{ matrix.CC }} CXX: ${{ matrix.CXX }} - LDFLAGS: "-L${{ github.workspace }}/build-dir/lib" + LDFLAGS: "-L${{ github.workspace }}/build-dir/lib -lwolfssl" CPPFLAGS: "-I${{ github.workspace }}/build-dir/include" PKG_CONFIG_PATH: "${{ github.workspace }}/build-dir/lib/pkgconfig" LD_LIBRARY_PATH: "${{ github.workspace }}/build-dir/lib" + LIBS: "-lwolfssl" uses: wolfSSL/actions-build-autotools-project@v1 with: repository: wolfssl/wolfssh path: wolfssh - configure: --enable-all --with-wolfssl=${{ github.workspace }}/build-dir CPPFLAGS="-I${{ github.workspace }}/build-dir/include" LDFLAGS="-L${{ github.workspace }}/build-dir/lib -lwolfssl" + configure: --enable-all --with-wolfssl=${{ github.workspace }}/build-dir check: true - name: Upload config.log on errors if: ${{ failure() }} From e18580c1c95ca382b5cef4a3097499541ce7f327 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 18:36:27 +0000 Subject: [PATCH 17/24] Enable shared library and fix library linking flags Co-Authored-By: andrew@wolfssl.com --- .github/workflows/multi-compiler.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/multi-compiler.yml b/.github/workflows/multi-compiler.yml index 1e8cb2c64..6dfa240b1 100644 --- a/.github/workflows/multi-compiler.yml +++ b/.github/workflows/multi-compiler.yml @@ -25,7 +25,7 @@ jobs: with: repository: wolfssl/wolfssl path: wolfssl - configure: --enable-all --enable-wolfssh --prefix=${{ github.workspace }}/build-dir + configure: --enable-all --enable-wolfssh --enable-shared --prefix=${{ github.workspace }}/build-dir check: false install: true - name: Cache wolfSSL build @@ -93,11 +93,11 @@ jobs: env: CC: ${{ matrix.CC }} CXX: ${{ matrix.CXX }} - LDFLAGS: "-L${{ github.workspace }}/build-dir/lib -lwolfssl" + LDFLAGS: "-L${{ github.workspace }}/build-dir/lib" CPPFLAGS: "-I${{ github.workspace }}/build-dir/include" PKG_CONFIG_PATH: "${{ github.workspace }}/build-dir/lib/pkgconfig" LD_LIBRARY_PATH: "${{ github.workspace }}/build-dir/lib" - LIBS: "-lwolfssl" + LIBS: "-L${{ github.workspace }}/build-dir/lib -lwolfssl" uses: wolfSSL/actions-build-autotools-project@v1 with: repository: wolfssl/wolfssh From dea38ffcf011c56b021fa1cae531e003c1de796b Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 18:39:55 +0000 Subject: [PATCH 18/24] Fix library linking with rpath and LIBS in configure Co-Authored-By: andrew@wolfssl.com --- .github/workflows/multi-compiler.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/multi-compiler.yml b/.github/workflows/multi-compiler.yml index 6dfa240b1..c456f7242 100644 --- a/.github/workflows/multi-compiler.yml +++ b/.github/workflows/multi-compiler.yml @@ -93,16 +93,15 @@ jobs: env: CC: ${{ matrix.CC }} CXX: ${{ matrix.CXX }} - LDFLAGS: "-L${{ github.workspace }}/build-dir/lib" + LDFLAGS: "-L${{ github.workspace }}/build-dir/lib -Wl,-rpath,${{ github.workspace }}/build-dir/lib" CPPFLAGS: "-I${{ github.workspace }}/build-dir/include" PKG_CONFIG_PATH: "${{ github.workspace }}/build-dir/lib/pkgconfig" LD_LIBRARY_PATH: "${{ github.workspace }}/build-dir/lib" - LIBS: "-L${{ github.workspace }}/build-dir/lib -lwolfssl" uses: wolfSSL/actions-build-autotools-project@v1 with: repository: wolfssl/wolfssh path: wolfssh - configure: --enable-all --with-wolfssl=${{ github.workspace }}/build-dir + configure: --enable-all --with-wolfssl=${{ github.workspace }}/build-dir LIBS="-lwolfssl" check: true - name: Upload config.log on errors if: ${{ failure() }} From 1ffd96d431efb3fd5f1fdba972f810f71ef8923f Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 18:43:15 +0000 Subject: [PATCH 19/24] Add WOLFSSL_LIBS and WOLFSSL_CFLAGS environment variables Co-Authored-By: andrew@wolfssl.com --- .github/workflows/multi-compiler.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/multi-compiler.yml b/.github/workflows/multi-compiler.yml index c456f7242..74066c570 100644 --- a/.github/workflows/multi-compiler.yml +++ b/.github/workflows/multi-compiler.yml @@ -97,11 +97,14 @@ jobs: CPPFLAGS: "-I${{ github.workspace }}/build-dir/include" PKG_CONFIG_PATH: "${{ github.workspace }}/build-dir/lib/pkgconfig" LD_LIBRARY_PATH: "${{ github.workspace }}/build-dir/lib" + LIBS: "-lwolfssl" + WOLFSSL_LIBS: "-L${{ github.workspace }}/build-dir/lib -lwolfssl" + WOLFSSL_CFLAGS: "-I${{ github.workspace }}/build-dir/include" uses: wolfSSL/actions-build-autotools-project@v1 with: repository: wolfssl/wolfssh path: wolfssh - configure: --enable-all --with-wolfssl=${{ github.workspace }}/build-dir LIBS="-lwolfssl" + configure: --enable-all --with-wolfssl=${{ github.workspace }}/build-dir check: true - name: Upload config.log on errors if: ${{ failure() }} From 67883a7f07353d4b10131f981204bab1ce3d82bf Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 18:45:45 +0000 Subject: [PATCH 20/24] Add wolfSSL verification step and enable static library Co-Authored-By: andrew@wolfssl.com --- .github/workflows/multi-compiler.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/multi-compiler.yml b/.github/workflows/multi-compiler.yml index 74066c570..257d3771d 100644 --- a/.github/workflows/multi-compiler.yml +++ b/.github/workflows/multi-compiler.yml @@ -25,7 +25,7 @@ jobs: with: repository: wolfssl/wolfssl path: wolfssl - configure: --enable-all --enable-wolfssh --enable-shared --prefix=${{ github.workspace }}/build-dir + configure: --enable-all --enable-wolfssh --enable-shared --enable-static --prefix=${{ github.workspace }}/build-dir check: false install: true - name: Cache wolfSSL build @@ -89,17 +89,19 @@ jobs: path: build-dir/ key: wolfssh-compiler-test-wolfssl-${{ matrix.OS }} fail-on-cache-miss: true + - name: Verify wolfSSL installation + run: | + ls -la ${{ github.workspace }}/build-dir/lib/ + ls -la ${{ github.workspace }}/build-dir/include/ + pkg-config --libs --cflags wolfssl || echo "pkg-config failed" - name: Build env: CC: ${{ matrix.CC }} CXX: ${{ matrix.CXX }} - LDFLAGS: "-L${{ github.workspace }}/build-dir/lib -Wl,-rpath,${{ github.workspace }}/build-dir/lib" + LDFLAGS: "-L${{ github.workspace }}/build-dir/lib" CPPFLAGS: "-I${{ github.workspace }}/build-dir/include" PKG_CONFIG_PATH: "${{ github.workspace }}/build-dir/lib/pkgconfig" LD_LIBRARY_PATH: "${{ github.workspace }}/build-dir/lib" - LIBS: "-lwolfssl" - WOLFSSL_LIBS: "-L${{ github.workspace }}/build-dir/lib -lwolfssl" - WOLFSSL_CFLAGS: "-I${{ github.workspace }}/build-dir/include" uses: wolfSSL/actions-build-autotools-project@v1 with: repository: wolfssl/wolfssh From 2f2aa089f2d0348e31ab1f258447bad444a13c35 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 18:49:41 +0000 Subject: [PATCH 21/24] Fix wolfSSL library linking with CFLAGS and LDFLAGS Co-Authored-By: andrew@wolfssl.com --- .github/workflows/multi-compiler.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/multi-compiler.yml b/.github/workflows/multi-compiler.yml index 257d3771d..8b53bcd93 100644 --- a/.github/workflows/multi-compiler.yml +++ b/.github/workflows/multi-compiler.yml @@ -25,7 +25,7 @@ jobs: with: repository: wolfssl/wolfssl path: wolfssl - configure: --enable-all --enable-wolfssh --enable-shared --enable-static --prefix=${{ github.workspace }}/build-dir + configure: --enable-all --enable-wolfssh --enable-shared --enable-static --prefix=${{ github.workspace }}/build-dir CFLAGS="-I${{ github.workspace }}/build-dir/include" LDFLAGS="-L${{ github.workspace }}/build-dir/lib" check: false install: true - name: Cache wolfSSL build @@ -98,10 +98,11 @@ jobs: env: CC: ${{ matrix.CC }} CXX: ${{ matrix.CXX }} - LDFLAGS: "-L${{ github.workspace }}/build-dir/lib" + LDFLAGS: "-L${{ github.workspace }}/build-dir/lib -lwolfssl" CPPFLAGS: "-I${{ github.workspace }}/build-dir/include" PKG_CONFIG_PATH: "${{ github.workspace }}/build-dir/lib/pkgconfig" LD_LIBRARY_PATH: "${{ github.workspace }}/build-dir/lib" + CFLAGS: "-I${{ github.workspace }}/build-dir/include" uses: wolfSSL/actions-build-autotools-project@v1 with: repository: wolfssl/wolfssh From 0ae0c24fa8552ac7b5f5267406f4f5ae68782f1e Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 18:52:54 +0000 Subject: [PATCH 22/24] Add wolfSSL verification step and update build flags Co-Authored-By: andrew@wolfssl.com --- .github/workflows/multi-compiler.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/multi-compiler.yml b/.github/workflows/multi-compiler.yml index 8b53bcd93..e4313ad18 100644 --- a/.github/workflows/multi-compiler.yml +++ b/.github/workflows/multi-compiler.yml @@ -25,7 +25,7 @@ jobs: with: repository: wolfssl/wolfssl path: wolfssl - configure: --enable-all --enable-wolfssh --enable-shared --enable-static --prefix=${{ github.workspace }}/build-dir CFLAGS="-I${{ github.workspace }}/build-dir/include" LDFLAGS="-L${{ github.workspace }}/build-dir/lib" + configure: --enable-all --enable-wolfssh --enable-shared --enable-static --prefix=${{ github.workspace }}/build-dir check: false install: true - name: Cache wolfSSL build @@ -94,15 +94,21 @@ jobs: ls -la ${{ github.workspace }}/build-dir/lib/ ls -la ${{ github.workspace }}/build-dir/include/ pkg-config --libs --cflags wolfssl || echo "pkg-config failed" + - name: Verify wolfSSL installation + run: | + ls -la ${{ github.workspace }}/build-dir/lib/ + pkg-config --libs --cflags wolfssl || echo "Using manual flags" + ${{ matrix.CC }} -v - name: Build env: CC: ${{ matrix.CC }} CXX: ${{ matrix.CXX }} - LDFLAGS: "-L${{ github.workspace }}/build-dir/lib -lwolfssl" + LDFLAGS: "-L${{ github.workspace }}/build-dir/lib" CPPFLAGS: "-I${{ github.workspace }}/build-dir/include" PKG_CONFIG_PATH: "${{ github.workspace }}/build-dir/lib/pkgconfig" LD_LIBRARY_PATH: "${{ github.workspace }}/build-dir/lib" - CFLAGS: "-I${{ github.workspace }}/build-dir/include" + WOLFSSL_CFLAGS: "-I${{ github.workspace }}/build-dir/include" + WOLFSSL_LIBS: "-L${{ github.workspace }}/build-dir/lib -lwolfssl" uses: wolfSSL/actions-build-autotools-project@v1 with: repository: wolfssl/wolfssh From ba302750b0076d09069f2859104222e1e1e5e74e Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 18:56:15 +0000 Subject: [PATCH 23/24] Add fPIC flag and update library paths for g++ test Co-Authored-By: andrew@wolfssl.com --- .github/workflows/multi-compiler.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/multi-compiler.yml b/.github/workflows/multi-compiler.yml index e4313ad18..977040c25 100644 --- a/.github/workflows/multi-compiler.yml +++ b/.github/workflows/multi-compiler.yml @@ -25,7 +25,7 @@ jobs: with: repository: wolfssl/wolfssl path: wolfssl - configure: --enable-all --enable-wolfssh --enable-shared --enable-static --prefix=${{ github.workspace }}/build-dir + configure: --enable-all --enable-wolfssh --enable-shared --enable-static --prefix=${{ github.workspace }}/build-dir CFLAGS="-fPIC" check: false install: true - name: Cache wolfSSL build @@ -103,12 +103,11 @@ jobs: env: CC: ${{ matrix.CC }} CXX: ${{ matrix.CXX }} - LDFLAGS: "-L${{ github.workspace }}/build-dir/lib" + LDFLAGS: "-L${{ github.workspace }}/build-dir/lib -lwolfssl" CPPFLAGS: "-I${{ github.workspace }}/build-dir/include" PKG_CONFIG_PATH: "${{ github.workspace }}/build-dir/lib/pkgconfig" LD_LIBRARY_PATH: "${{ github.workspace }}/build-dir/lib" - WOLFSSL_CFLAGS: "-I${{ github.workspace }}/build-dir/include" - WOLFSSL_LIBS: "-L${{ github.workspace }}/build-dir/lib -lwolfssl" + CFLAGS: "-fPIC" uses: wolfSSL/actions-build-autotools-project@v1 with: repository: wolfssl/wolfssh @@ -120,4 +119,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: config-log-${{ matrix.CC }}-${{ matrix.OS }} - path: config.log + path: | + config.log + ${{ github.workspace }}/build-dir/lib/ + ${{ github.workspace }}/build-dir/include/ From 4a745a7253c9d33d1a2dc82c2993663722f31486 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 18:59:31 +0000 Subject: [PATCH 24/24] Add wolfSSL test compilation and update library flags Co-Authored-By: andrew@wolfssl.com --- .github/workflows/multi-compiler.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/multi-compiler.yml b/.github/workflows/multi-compiler.yml index 977040c25..178d5d46c 100644 --- a/.github/workflows/multi-compiler.yml +++ b/.github/workflows/multi-compiler.yml @@ -97,17 +97,27 @@ jobs: - name: Verify wolfSSL installation run: | ls -la ${{ github.workspace }}/build-dir/lib/ - pkg-config --libs --cflags wolfssl || echo "Using manual flags" - ${{ matrix.CC }} -v + echo "Testing wolfSSL library..." + ${{ matrix.CC }} -o test_wolfssl -I${{ github.workspace }}/build-dir/include -L${{ github.workspace }}/build-dir/lib test_wolfssl.c -lwolfssl || echo "Compilation failed" + working-directory: ${{ github.workspace }} + - name: Create test file + run: | + cat > test_wolfssl.c << 'EOL' + #include + #include + int main() { return wolfCrypt_Init(); } + EOL - name: Build env: CC: ${{ matrix.CC }} CXX: ${{ matrix.CXX }} - LDFLAGS: "-L${{ github.workspace }}/build-dir/lib -lwolfssl" + LDFLAGS: "-L${{ github.workspace }}/build-dir/lib -Wl,-rpath,${{ github.workspace }}/build-dir/lib -lwolfssl" CPPFLAGS: "-I${{ github.workspace }}/build-dir/include" PKG_CONFIG_PATH: "${{ github.workspace }}/build-dir/lib/pkgconfig" LD_LIBRARY_PATH: "${{ github.workspace }}/build-dir/lib" CFLAGS: "-fPIC" + WOLFSSL_CFLAGS: "-I${{ github.workspace }}/build-dir/include" + WOLFSSL_LIBS: "-L${{ github.workspace }}/build-dir/lib -lwolfssl" uses: wolfSSL/actions-build-autotools-project@v1 with: repository: wolfssl/wolfssh