source: mod_gnutls/.github/workflows/build.yaml @ 51b8964

asyncio
Last change on this file since 51b8964 was 51b8964, checked in by Fiona Klute <fiona.klute@…>, 12 months ago

Use DEBIAN_FRONTEND=noninteractive for package installation

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