source: mod_gnutls/.github/workflows/build.yaml @ 31e25ad

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

Replace set-env workflow command with writing to $GITHUB_ENV

As recommended in the security advisory:
https://github.com/actions/toolkit/security/advisories/GHSA-mfwh-5m23-j46w

  • Property mode set to 100644
File size: 4.2 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          apt-get update
29          apt-get -y install python3-yaml apache2-bin apache2-dev curl gnutls-bin libapr1-dev libgnutls28-dev openssl pandoc pkg-config procps softhsm2
30      - name: install dependencies (Fedora)
31        if: startsWith(matrix.container, 'fedora')
32        run: |
33          dnf -y install bzip2 curl gcc gnutls-devel gnutls-utils httpd-devel iproute libtool make pkgconf-pkg-config python3-pyyaml redhat-rpm-config softhsm
34      - name: install dependencies (Alpine)
35        if: startsWith(matrix.container, 'alpine')
36        run: |
37          apk add apache2 apache2-dev apache2-proxy autoconf automake build-base gnutls-dev gnutls-utils libtool pkgconfig python3 py3-yaml
38      - name: network overview
39        run: |
40          ip addr show
41          cat /etc/hosts
42      - name: find usable IPs for tests
43        run: |
44          echo "test_ips=$(python3 test/check_test_ips.py -H localhost)" >> ${GITHUB_ENV}
45      - name: set prefix for container-specific artifacts
46        # this is because upload-artifact doesn't like ":" in file names
47        env:
48          CONTAINER_NAME: ${{ matrix.container }}
49        run: |
50          echo "artifact_prefix=$(echo ${CONTAINER_NAME} | sed s/:/-/)" >> ${GITHUB_ENV}
51      - name: autoreconf
52        run: autoreconf -fiv
53      - name: configure
54        run: TEST_IP="${test_ips}" APACHE_MUTEX=pthread ./configure
55      - name: store config.log
56        uses: actions/upload-artifact@v2
57        if: failure()
58        with:
59          name: ${{ env.artifact_prefix }}-config-log
60          path: config.log
61      - name: make
62        run: make
63      - name: make check
64        run: VERBOSE=1 make check
65      - name: store test logs
66        uses: actions/upload-artifact@v2
67        if: failure() || cancelled()
68        with:
69          name: ${{ env.artifact_prefix }}-test-logs
70          path: |
71            test/test-*.log
72            test/logs/
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 "test_ips=$(python3 test/check_test_ips.py -H localhost)" >> ${GITHUB_ENV}
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@v2
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 test logs
108        uses: actions/upload-artifact@v2
109        if: failure() || cancelled()
110        with:
111          name: coverage-test-logs
112          path: |
113            test/test-*.log
114            test/logs/
115      - name: generate coverage report
116        working-directory: ./test
117        run: make coverage
118      - name: store coverage report
119        uses: actions/upload-artifact@v2
120        with:
121          name: coverage-report
122          path: test/coverage/
123      - name: coverage summary
124        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.