Skip to content
Merged
Show file tree
Hide file tree
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
61 changes: 61 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,64 @@ jobs:

- name: Test
run: make check

build-test-macos:
runs-on: macos-latest

steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: |
brew install \
autoconf automake libtool pkg-config \
openssl \
lua \
cpanminus
cpanm --notest DBI LWP IO::Compress JSON Net::DNS

- name: Build and install libmilter from source
run: |
SENDMAIL_VER=8.18.2
curl -fsSL "ftp://ftp.sendmail.org/pub/sendmail/sendmail.${SENDMAIL_VER}.tar.gz" | tar xz -C /tmp
cd /tmp/sendmail-${SENDMAIL_VER}/libmilter
./Build
sudo mkdir -p /usr/local/include/libmilter /usr/local/lib
sudo cp ../include/libmilter/mfapi.h ../include/libmilter/mfdef.h /usr/local/include/libmilter/
sudo cp "$(find .. -name 'libmilter.a' | head -1)" /usr/local/lib/

- name: Build miltertest
run: |
git clone --depth=1 https://github.com/thegushi/miltertest.git /tmp/miltertest
cd /tmp/miltertest
autoreconf -fvi
./configure \
CFLAGS='-g -O2 -Wno-pointer-sign -std=gnu11' \
CPPFLAGS="-I$(brew --prefix openssl)/include -I/usr/local/include" \
LDFLAGS="-L$(brew --prefix openssl)/lib -L/usr/local/lib"
make -j$(sysctl -n hw.logicalcpu)
sudo make install

- name: Bootstrap build system
run: autoreconf -fvi

- name: Configure
run: |
./configure --enable-live-tests \
CFLAGS='-g -O2 -Wno-pointer-sign -std=gnu11' \
CPPFLAGS="-I$(brew --prefix openssl)/include -I/usr/local/include" \
LDFLAGS="-L$(brew --prefix openssl)/lib -L/usr/local/lib"

- name: Build
run: make -j$(sysctl -n hw.logicalcpu)

- name: Check Perl syntax
run: |
perl -c reports/opendmarc-expire
perl -c reports/opendmarc-import
perl -c reports/opendmarc-importstats
perl -c reports/opendmarc-params
perl -c reports/opendmarc-reports

- name: Test
run: make check
1 change: 1 addition & 0 deletions libopendmarc/dmarc.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ OPENDMARC_STATUS_T opendmarc_policy_fetch_adkim(DMARC_POLICY_T *pctx, int *adkim
OPENDMARC_STATUS_T opendmarc_policy_fetch_aspf(DMARC_POLICY_T *pctx, int *aspf);
OPENDMARC_STATUS_T opendmarc_policy_fetch_p(DMARC_POLICY_T *pctx, int *p);
OPENDMARC_STATUS_T opendmarc_policy_fetch_sp(DMARC_POLICY_T *pctx, int *sp);
OPENDMARC_STATUS_T opendmarc_policy_fetch_fo(DMARC_POLICY_T *pctx, int *fo);
u_char ** opendmarc_policy_fetch_rua(DMARC_POLICY_T *pctx, u_char *list_buf, size_t size_of_buf, int constant);
u_char ** opendmarc_policy_fetch_ruf(DMARC_POLICY_T *pctx, u_char *list_buf, size_t size_of_buf, int constant);
OPENDMARC_STATUS_T opendmarc_policy_fetch_utilized_domain(DMARC_POLICY_T *pctx, u_char *buf, size_t buflen);
Expand Down
Loading