Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 108 additions & 0 deletions .github/workflows/msmtp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: msmtp Tests

# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]

Comment thread
julek-wolfssl marked this conversation as resolved.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION

jobs:
build_wolfssl:
name: Build wolfSSL
# Just to keep it the same as the testing target
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
- name: Build wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
with:
path: wolfssl
configure: --enable-opensslextra --enable-opensslall
install: true

- name: tar build-dir
run: tar -zcf build-dir.tgz build-dir

- name: Upload built lib
uses: actions/upload-artifact@v4
with:
name: wolf-install-msmtp
path: build-dir.tgz
retention-days: 5

msmtp_check:
strategy:
fail-fast: false
matrix:
ref: [ 1.8.28 ]
name: ${{ matrix.ref }}
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 10
needs: build_wolfssl
steps:
- name: Download lib
uses: actions/download-artifact@v4
with:
name: wolf-install-msmtp

- name: untar build-dir
run: tar -xf build-dir.tgz

- name: Checkout OSP
uses: actions/checkout@v4
with:
repository: wolfssl/osp
path: osp
Comment thread
julek-wolfssl marked this conversation as resolved.

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
autoconf automake libtool pkg-config gettext \
libidn2-dev libsecret-1-dev autopoint
Comment thread
julek-wolfssl marked this conversation as resolved.

- name: Checkout msmtp
uses: actions/checkout@v4
with:
repository: marlam/msmtp
ref: msmtp-${{ matrix.ref }}
path: msmtp-${{ matrix.ref }}
Comment thread
julek-wolfssl marked this conversation as resolved.

- name: Apply wolfSSL patch
working-directory: msmtp-${{ matrix.ref }}
run: patch -p1 < $GITHUB_WORKSPACE/osp/msmtp/${{ matrix.ref }}/wolfssl-msmtp-${{ matrix.ref }}.patch

- name: Regenerate build system
working-directory: msmtp-${{ matrix.ref }}
run: autoreconf -ivf

- name: Configure msmtp with wolfSSL
working-directory: msmtp-${{ matrix.ref }}
run: |
PKG_CONFIG_PATH=$GITHUB_WORKSPACE/build-dir/lib/pkgconfig \
./configure --with-tls=wolfssl

- name: Build msmtp
working-directory: msmtp-${{ matrix.ref }}
run: make -j$(nproc)

- name: Run msmtp tests
working-directory: msmtp-${{ matrix.ref }}
run: LD_LIBRARY_PATH=$GITHUB_WORKSPACE/build-dir/lib make check

- name: Confirm msmtp built with wolfSSL
run: ldd msmtp-${{ matrix.ref }}/src/msmtp | grep wolfssl

- name: Print test logs on failure
if: ${{ failure() }}
run: tail -n +1 msmtp-${{ matrix.ref }}/tests/*.log