Debian Codegraph @

.github/workflows/ci.yml

raw symbols SCIP
1 # Copyright 2022 Timo Röhling <[email protected]>
2 # SPDX-License-Identifier: FSFAP
3 #
4 # Copying and distribution of this file, with or without modification, are
5 # permitted in any medium without royalty provided the copyright notice and
6 # this notice are preserved. This file is offered as-is, without any warranty.
7 #
8 name: Continuous Integration
9 on:
10 push:
11 branches:
12 - main
13 pull_request:
14 branches:
15 - main
16 permissions:
17 contents: read
18 jobs:
19 test:
20 runs-on: ubuntu-latest
21 strategy:
22 matrix:
23 milter: [MILTER=OFF, MILTER=ON]
24 sqlite: [SQLITE=OFF, SQLITE=ON]
25 redis: [REDIS=OFF, REDIS=ON]
26 deps: [vendored-deps, system-deps]
27 steps:
28 - uses: actions/checkout@v4
29 - name: Install dependencies
30 run: |
31 sudo apt-get update -qq
32 sudo apt-get install -y cmake postfix redis ${{ matrix.deps == 'system-deps' && 'check libconfuse-dev libhiredis-dev libmilter-dev libsqlite3-dev' || '' }}
33 - name: Build PostSRSd
34 run: |
35 mkdir _build
36 cd _build
37 cmake .. -DDEVELOPER_BUILD=ON -DWITH_${{ matrix.milter }} -DWITH_${{ matrix.sqlite }} -DWITH_${{ matrix.redis }} ${{ matrix.deps == 'system-deps' && '-DFETCHCONTENT_FULLY_DISCONNECTED=ON -DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS' || '' }}
38 cmake --build . --verbose
39 - name: Run tests
40 run: |
41 cd _build
42 ctest --output-on-failure
43 - name: Install and start PostSRSd daemon
44 run: |
45 cd _build
46 sudo make install
47 sed -e 's/^#srs-domain.*/srs-domain = "example.com"/' /usr/local/share/doc/postsrsd/postsrsd.conf | sudo tee /usr/local/etc/postsrsd.conf
48 sudo systemctl enable postsrsd
49 sudo systemctl start postsrsd
50 sudo journalctl --no-pager -u postsrsd
51 sudo systemctl --no-pager status postsrsd
52 - name: Test Postfix integration
53 run: |
54 postmap -q [email protected] socketmap:unix:/var/spool/postfix/srs:forward | tee /tmp/srs-alias.txt
55 postmap -q "$(cat /tmp/srs-alias.txt)" socketmap:unix:/var/spool/postfix/srs:reverse