]> git.ozlabs.org Git - ppp.git/blob - .github/workflows/ubuntu.yaml
CI: Update the 'checkout' action to V3 as V2 is being deprecated. (#437)
[ppp.git] / .github / workflows / ubuntu.yaml
1 name: Build and Test
2 on: [push, pull_request]
3
4 jobs:
5   build_and_test:
6     runs-on: ubuntu-latest
7     env:
8       configure_flags: --enable-multilink --enable-systemd --enable-cbcp
9
10     steps:
11     - uses: actions/checkout@v3
12
13     - name: install required packages
14       run: |
15         sudo DEBIAN_FRONTEND=noninteractive apt-get -y -qq update
16         sudo DEBIAN_FRONTEND=noninteractive apt-get -y -qq install \
17           build-essential autoconf automake pkg-config libtool m4 autoconf-archive \
18           libssl-dev libatm1-dev libpcap-dev libsystemd-dev libpam0g-dev
19
20     - name: configure
21       run: ./autogen.sh ${{ env.configure_flags }}
22
23     - name: build
24       run: make V=1 CFLAGS="-O2 -g -Wno-unused-result"
25
26     - name: run auto tests
27       run: VERBOSE=true make check
28
29     - name: distcheck
30       run: make distcheck DISTCHECK_CONFIGURE_FLAGS="${{ env.configure_flags }}"
31
32   build_and_test_asan:
33     runs-on: ubuntu-latest
34     env:
35       configure_flags: --enable-multilink --enable-systemd --enable-cbcp
36       CFLAGS: '-fsanitize=address -ggdb'
37       LDFLAGS: '-fsanitize=address'
38
39     steps:
40     - uses: actions/checkout@v3
41
42     - name: install required packages
43       run: |
44         sudo DEBIAN_FRONTEND=noninteractive apt-get -y -qq update
45         sudo DEBIAN_FRONTEND=noninteractive apt-get -y -qq install \
46           build-essential autoconf automake pkg-config libtool m4 autoconf-archive \
47           libssl-dev libatm1-dev libpcap-dev libsystemd-dev libpam0g-dev
48
49     - name: configure
50       run: ./autogen.sh ${{ env.configure_flags }}
51
52     - name: build
53       run: make V=1 CFLAGS="-O2 -g -Wno-unused-result"
54
55     - name: run auto tests
56       run: VERBOSE=true make check
57
58     - name: distcheck
59       run: make distcheck DISTCHECK_CONFIGURE_FLAGS="${{ env.configure_flags }}"
60