1 | name: CI build |
---|
2 | on: |
---|
3 | pull_request: |
---|
4 | push: |
---|
5 | # don't run on packaging branches |
---|
6 | branches-ignore: |
---|
7 | - 'for-debian' |
---|
8 | - 'debian/**' |
---|
9 | - 'pristine-tar' |
---|
10 | jobs: |
---|
11 | build: |
---|
12 | strategy: |
---|
13 | fail-fast: false |
---|
14 | matrix: |
---|
15 | container: |
---|
16 | - 'debian:buster' |
---|
17 | - 'debian:sid' |
---|
18 | - 'fedora:32' |
---|
19 | runs-on: ubuntu-latest |
---|
20 | container: ${{ matrix.container }} |
---|
21 | name: ${{ matrix.container }} |
---|
22 | steps: |
---|
23 | - uses: actions/checkout@v2 |
---|
24 | - name: install dependencies (Debian) |
---|
25 | if: startsWith(matrix.container, 'debian') |
---|
26 | run: | |
---|
27 | apt-get update |
---|
28 | apt-get -y install python3-yaml apache2-bin apache2-dev curl gnutls-bin libapr1-dev libgnutls28-dev openssl pandoc pkg-config procps softhsm2 |
---|
29 | - name: install dependencies (Fedora) |
---|
30 | if: startsWith(matrix.container, 'fedora') |
---|
31 | run: | |
---|
32 | dnf -y group install "C Development Tools and Libraries" |
---|
33 | dnf -y install curl gnutls-devel gnutls-utils httpd-devel iproute python3-pyyaml redhat-rpm-config softhsm |
---|
34 | - name: network overview |
---|
35 | run: | |
---|
36 | ip addr show |
---|
37 | cat /etc/hosts |
---|
38 | - name: find usable IPs for tests |
---|
39 | run: | |
---|
40 | echo "::set-env name=test_ips::$(python3 test/check_test_ips.py -H localhost)" |
---|
41 | - name: set prefix for container-specific artifacts |
---|
42 | # this is because upload-artifact doesn't like ":" in file names |
---|
43 | env: |
---|
44 | CONTAINER_NAME: ${{ matrix.container }} |
---|
45 | run: | |
---|
46 | echo "::set-env name=artifact_prefix::$(echo ${CONTAINER_NAME} | sed s/:/-/)" |
---|
47 | - name: autoreconf |
---|
48 | run: autoreconf -fiv |
---|
49 | - name: configure |
---|
50 | run: TEST_IP="${test_ips}" APACHE_MUTEX=pthread ./configure |
---|
51 | - name: store config.log |
---|
52 | uses: actions/upload-artifact@v1 |
---|
53 | if: failure() |
---|
54 | with: |
---|
55 | name: ${{ env.artifact_prefix }}-config-log |
---|
56 | path: config.log |
---|
57 | - name: make |
---|
58 | run: make |
---|
59 | - name: make check |
---|
60 | run: VERBOSE=1 make check |
---|
61 | - name: store Apache logs |
---|
62 | uses: actions/upload-artifact@v2 |
---|
63 | if: failure() || cancelled() |
---|
64 | with: |
---|
65 | name: ${{ env.artifact_prefix }}-apache-logs |
---|
66 | path: test/logs/ |
---|
67 | - name: store test logs |
---|
68 | uses: actions/upload-artifact@v2 |
---|
69 | if: failure() || cancelled() |
---|
70 | with: |
---|
71 | name: ${{ env.artifact_prefix }}-test-logs |
---|
72 | path: test/test-*.log |
---|
73 | - name: make distcheck |
---|
74 | run: VERBOSE=1 make distcheck |
---|
75 | |
---|
76 | coverage: |
---|
77 | runs-on: ubuntu-latest |
---|
78 | container: debian:sid |
---|
79 | name: coverage |
---|
80 | steps: |
---|
81 | - uses: actions/checkout@v2 |
---|
82 | - name: install dependencies |
---|
83 | run: | |
---|
84 | apt-get update |
---|
85 | apt-get -y install python3-yaml apache2-bin apache2-dev curl gnutls-bin libapr1-dev libgnutls28-dev openssl pkg-config procps softhsm2 clang llvm |
---|
86 | - name: network overview |
---|
87 | run: | |
---|
88 | ip addr show |
---|
89 | cat /etc/hosts |
---|
90 | - name: find usable IPs for tests |
---|
91 | run: | |
---|
92 | echo "::set-env name=test_ips::$(python3 test/check_test_ips.py -H localhost)" |
---|
93 | - name: autoreconf |
---|
94 | run: autoreconf -fiv |
---|
95 | - name: configure |
---|
96 | run: CC=clang TEST_IP="${test_ips}" APACHE_MUTEX=pthread ./configure --enable-clang-coverage |
---|
97 | - name: store config.log |
---|
98 | uses: actions/upload-artifact@v1 |
---|
99 | if: failure() |
---|
100 | with: |
---|
101 | name: coverage-config-log |
---|
102 | path: config.log |
---|
103 | - name: make |
---|
104 | run: make |
---|
105 | - name: make check |
---|
106 | run: VERBOSE=1 make check |
---|
107 | - name: store Apache logs |
---|
108 | uses: actions/upload-artifact@v2 |
---|
109 | if: failure() || cancelled() |
---|
110 | with: |
---|
111 | name: coverage-apache-logs |
---|
112 | path: test/logs/ |
---|
113 | - name: store test logs |
---|
114 | uses: actions/upload-artifact@v2 |
---|
115 | if: failure() || cancelled() |
---|
116 | with: |
---|
117 | name: coverage-test-logs |
---|
118 | path: test/test-*.log |
---|
119 | - name: generate coverage report |
---|
120 | working-directory: ./test |
---|
121 | run: make coverage |
---|
122 | - name: store coverage report |
---|
123 | uses: actions/upload-artifact@v2 |
---|
124 | with: |
---|
125 | name: coverage-report |
---|
126 | path: test/coverage/ |
---|