diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a3dfd92..5a4e7e2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/libopendmarc/dmarc.h.in b/libopendmarc/dmarc.h.in index 814b508..2c47f9b 100644 --- a/libopendmarc/dmarc.h.in +++ b/libopendmarc/dmarc.h.in @@ -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);