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 localhost $(hostname))" |
---|
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 |
---|