aboutsummaryrefslogtreecommitdiff
blob: d3d1ae227b86c1cf9c404ef3ceea32c7ac07ed3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# GitHub actions workflow.
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions

name: Build+Test CI

on:
  push:
    branches:
      - master
    tags:
      - v*
  pull_request:
    types:
      - opened
    branches:
      - master

jobs:
  make-check-ubuntu-x64:
    strategy:
      matrix:
        os:
          - ubuntu-latest
        cc:
          - gcc
          - clang
        features:
          - --enable-qmanifest --enable-qtegrity
          - --disable-qmanifest --enable-qtegrity
          - --enable-qmanifest --disable-qtegrity
          - --disable-qmanifest --disable-qtegrity
          - ""
    runs-on: ${{ matrix.os }}
    env:
      CC: ${{ matrix.cc }}
    steps:
      - name: install deps
        run: >
          sudo apt-get install -y
          libgpgme-dev gnupg2 liblz4-tool lzop zstd lzip brotli libb2-dev
      - uses: actions/checkout@v2
      - name: configure variant ${{ matrix.features }}
        run: >
          ./configure
          --disable-maintainer-mode --disable-openmp
          ${{ matrix.features }}
      - name: make variant ${{ matrix.features }}
        run: make CFLAGS="-O3 -Wall -Wshadow -pipe" V=1 check

  make-check-macos-x64:
    strategy:
      matrix:
        os:
          - macos-latest
        cc:
          - clang
    runs-on: ${{ matrix.os }}
    env:
      CC: ${{ matrix.cc }}
    steps:
      - name: install deps
        run: brew install gpgme gnupg gnu-sed coreutils bash openssl
      - name: add homebrew utils to PATH
        run: |
          echo "$(brew --prefix)/opt/coreutils/libexec/gnubin" >> $GITHUB_PATH
          echo "$(brew --prefix)/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH
          echo "$(brew --prefix)/opt/openssl@3/bin" >> $GITHUB_PATH
      - name: add homebrew utils to ENV
        run: |
          echo 'LDFLAGS="-L'"$(brew --prefix)/opt/openssl@3/lib ${LDFLAGS}"'"' >> $GITHUB_ENV
          echo 'CPPFLAGS="-I'"$(brew --prefix)/opt/openssl@3/include ${CPPFLAGS}"'"' >> $GITHUB_ENV
          echo 'PKG_CONFIG_PATH="'"$(brew --prefix)/opt/openssl@3/lib/pkgconfig:${PKG_CONFIG_PATH}"'"' >> $GITHUB_ENV
      - uses: actions/checkout@v2
      - name: configure
        # we need to disable qmanifest for we cannot get b2sum and
        # coreutils installed at the same time :/
        run: >
          ./configure
          --disable-maintainer-mode --disable-openmp --disable-qmanifest
      - name: make
        run: make CFLAGS="-O3 -Wall -Wshadow -pipe" V=1 check

  coverity:
    runs-on: ubuntu-latest
    steps:
      - name: install deps
        run: >
          sudo apt-get install -y
          libgpgme-dev gnupg2 liblz4-tool lzop zstd lzip brotli libb2-dev
      - uses: actions/checkout@v2
      - name: configure
        run: >
          ./configure
          --disable-maintainer-mode --disable-openmp
          --enable-qmanifest --enable-qtegrity
      - uses: vapier/coverity-scan-action@v1
        with:
          email: ${{ secrets.COVERITY_SCAN_EMAIL }}
          token: ${{ secrets.COVERITY_SCAN_TOKEN }}

  valgrind:
    runs-on: ubuntu-latest
    steps:
      - name: install deps
        run: >
          sudo apt-get install -y
          libgpgme-dev gnupg2 liblz4-tool lzop zstd lzip brotli libb2-dev
          valgrind
      - uses: actions/checkout@v2
      - name: configure
        run: >
          ./configure
          --disable-maintainer-mode --disable-openmp
          --enable-qmanifest --enable-qtegrity
      - name: make
        run: make CFLAGS="-g -pipe" Q_RUN_WITH_VALGRIND=1 V=1 check