Skip to content

Commit 5c38f44

Browse files
committed
Add msmtp action
Depends on wolfSSL/osp#317
1 parent b63f878 commit 5c38f44

1 file changed

Lines changed: 108 additions & 0 deletions

File tree

.github/workflows/msmtp.yml

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: msmtp Tests
2+
3+
# START OF COMMON SECTION
4+
on:
5+
push:
6+
branches: [ 'master', 'main', 'release/**' ]
7+
pull_request:
8+
branches: [ '*' ]
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
# END OF COMMON SECTION
14+
15+
jobs:
16+
build_wolfssl:
17+
name: Build wolfSSL
18+
# Just to keep it the same as the testing target
19+
if: github.repository_owner == 'wolfssl'
20+
runs-on: ubuntu-24.04
21+
# This should be a safe limit for the tests to run.
22+
timeout-minutes: 4
23+
steps:
24+
- name: Build wolfSSL
25+
uses: wolfSSL/actions-build-autotools-project@v1
26+
with:
27+
path: wolfssl
28+
configure: --enable-opensslextra --enable-opensslall
29+
install: true
30+
31+
- name: tar build-dir
32+
run: tar -zcf build-dir.tgz build-dir
33+
34+
- name: Upload built lib
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: wolf-install-msmtp
38+
path: build-dir.tgz
39+
retention-days: 5
40+
41+
msmtp_check:
42+
strategy:
43+
fail-fast: false
44+
matrix:
45+
ref: [ 1.8.28 ]
46+
name: ${{ matrix.ref }}
47+
if: github.repository_owner == 'wolfssl'
48+
runs-on: ubuntu-24.04
49+
# This should be a safe limit for the tests to run.
50+
timeout-minutes: 10
51+
needs: build_wolfssl
52+
steps:
53+
- name: Download lib
54+
uses: actions/download-artifact@v4
55+
with:
56+
name: wolf-install-msmtp
57+
58+
- name: untar build-dir
59+
run: tar -xf build-dir.tgz
60+
61+
- name: Checkout OSP
62+
uses: actions/checkout@v4
63+
with:
64+
repository: wolfssl/osp
65+
path: osp
66+
67+
- name: Install dependencies
68+
run: |
69+
sudo apt-get update
70+
sudo apt-get install -y \
71+
autoconf automake libtool pkg-config gettext \
72+
libidn2-dev libsecret-1-dev autopoint
73+
74+
- name: Checkout msmtp
75+
uses: actions/checkout@v4
76+
with:
77+
repository: marlam/msmtp
78+
ref: msmtp-${{ matrix.ref }}
79+
path: msmtp-${{ matrix.ref }}
80+
81+
- name: Apply wolfSSL patch
82+
working-directory: msmtp-${{ matrix.ref }}
83+
run: patch -p1 < $GITHUB_WORKSPACE/osp/msmtp/${{ matrix.ref }}/wolfssl-msmtp-${{ matrix.ref }}.patch
84+
85+
- name: Regenerate build system
86+
working-directory: msmtp-${{ matrix.ref }}
87+
run: autoreconf -ivf
88+
89+
- name: Configure msmtp with wolfSSL
90+
working-directory: msmtp-${{ matrix.ref }}
91+
run: |
92+
PKG_CONFIG_PATH=$GITHUB_WORKSPACE/build-dir/lib/pkgconfig \
93+
./configure --with-tls=wolfssl
94+
95+
- name: Build msmtp
96+
working-directory: msmtp-${{ matrix.ref }}
97+
run: make -j$(nproc)
98+
99+
- name: Run msmtp tests
100+
working-directory: msmtp-${{ matrix.ref }}
101+
run: LD_LIBRARY_PATH=$GITHUB_WORKSPACE/build-dir/lib make check
102+
103+
- name: Confirm msmtp built with wolfSSL
104+
run: ldd msmtp-${{ matrix.ref }}/src/msmtp | grep wolfssl
105+
106+
- name: Print test logs on failure
107+
if: ${{ failure() }}
108+
run: tail -n +1 msmtp-${{ matrix.ref }}/tests/*.log

0 commit comments

Comments
 (0)