File: checks.yml

package info (click to toggle)
austin 3.7.0-7
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 11,444 kB
  • sloc: ansic: 8,622; python: 2,669; sh: 106; makefile: 54
file content (208 lines) | stat: -rw-r--r-- 5,382 bytes parent folder | download | duplicates (3)
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
name: Checks

on:
  push:
    branches:
      - master
      - devel
  pull_request:

jobs:
  check-manpage:
    runs-on: ubuntu-20.04
    name: Check docs
    steps:
      - uses: actions/checkout@v3

      - name: Install build dependencies
        run: |
          sudo add-apt-repository -y universe
          sudo add-apt-repository -y ppa:inkscape.dev/stable
          sudo apt-get update
          sudo apt-get -y install libunwind-dev binutils-dev libiberty-dev help2man inkscape

      - name: Compile Austin
        run: |
          autoreconf --install
          ./configure
          make

      - name: Generate docs
        run: bash doc/gen.sh

      - name: Check docs
        run: git diff -I".* DO NOT MODIFY.*" -I"[.]TH AUSTIN.*" --exit-code src/austin.1

  cppcheck-linux:
    runs-on: ubuntu-20.04
    name: Static code analysis (Linux)
    env:
      cppcheck-version: 2.10.3

    steps:
      - uses: actions/checkout@v3

      - name: Install build dependencies
        run: |
          sudo apt-get update
          sudo apt-get -y install libpcre3-dev

      - name: Restore cppcheck build
        id: cppcheck-build-restore
        uses: actions/cache/restore@v3
        with:
          path: |
            ${{ github.workspace }}/cppcheck
          key: ${{ runner.os }}-cppcheck-${{ env.cppcheck-version }}

      - name: Check out cppcheck
        uses: actions/checkout@v3
        with:
          repository: danmar/cppcheck
          ref: ${{ env.cppcheck-version }}
          path: ${{ github.workspace }}/cppcheck

      - name: Compile cppcheck
        run: |
          sudo apt-get update
          sudo apt-get -y install libpcre3-dev
          cd cppcheck
          make MATCHCOMPILER=yes FILESDIR=/usr/share/cppcheck HAVE_RULES=yes CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function"
          cd -

      - name: Save cppcheck build
        id: cppcheck-build-save
        uses: actions/cache/save@v3
        with:
          path: |
            ${{ github.workspace }}/cppcheck
          key: ${{ runner.os }}-cppcheck-${{ env.cppcheck-version }}

      - name: Check source code
        run: ${{ github.workspace }}/cppcheck/cppcheck -q -f --error-exitcode=1 --inline-suppr src

  cppcheck-macos:
    name: Static code analysis (macOS)
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v3
      
      - name: Install cppcheck
        run: brew install cppcheck
      
      - name: Check source code
        run: cppcheck -q -f --error-exitcode=1 --inline-suppr --check-level=exhaustive src

  codespell:
    runs-on: ubuntu-20.04
    name: Codespell
    steps:
      - uses: actions/checkout@v3

      - uses: "actions/setup-python@v4"
        with:
          python-version: "3.9"

      - name: Install codespell
        run: pip install codespell

      - name: Check source code spelling
        run: codespell -I .github/workflows/wordlist.txt -S "src/python/*" src

  formatting-tests:
    runs-on: ubuntu-20.04
    name: Formatting (tests)
    steps:
      - uses: actions/checkout@v3

      - uses: "actions/setup-python@v4"
        with:
          python-version: "3.10"

      - name: Install black
        run: pip install black

      - name: Check formatting
        run: black --check --exclude=test/targets test/

  linting-tests:
    runs-on: ubuntu-20.04
    name: Linting (tests)
    steps:
      - uses: actions/checkout@v3

      - uses: "actions/setup-python@v4"
        with:
          python-version: "3.10"

      - name: Install flake8
        run: pip install flake8

      - name: Lint code
        run: flake8 --config test/.flake8 test/

  coverage:
    runs-on: ubuntu-20.04
    name: Code coverage
    steps:
      - uses: actions/checkout@v3

      - name: Install build dependencies
        run: |
          sudo apt-get update
          sudo apt-get -y install libunwind-dev binutils-dev libiberty-dev gcovr

      - name: Install test dependencies
        run: |
          sudo add-apt-repository -y ppa:deadsnakes/ppa
          sudo apt-get update
          sudo apt-get -y install \
            valgrind \
            python3.{8..13} \
            python3.10-full python3.10-dev

          python3.10 -m venv .venv
          source .venv/bin/activate
          pip install --upgrade pip
          pip install -r test/requirements.txt

      - name: Compile Austin
        run: |
          autoreconf --install
          ./configure --enable-coverage
          make

      - name: Run tests
        run: |
          echo "core.%p" | sudo tee /proc/sys/kernel/core_pattern
          ulimit -c unlimited
          .venv/bin/pytest -sr fE -n auto || true
          sudo -E env PATH="$PATH" .venv/bin/pytest -sr fE -n auto || true

      - name: Generate Cobertura report
        run: gcovr --xml ./cobertura.xml -r src/

      - name: Upload report to Codecov
        uses: codecov/codecov-action@v2
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          files: ./cobertura.xml
          verbose: true

  check-cog:
    runs-on: ubuntu-20.04
    name: Check cog output
    steps:
      - uses: actions/checkout@v3

      - name: Install cog
        run: pip install cogapp

      - name: Compile Austin
        run: |
          autoreconf --install
          ./configure
          make

      - name: Run cog check
        run: bash scripts/cog.sh --check