summaryrefslogtreecommitdiff
path: root/.github/workflows/build.yml
blob: 93f1bb16dfb375b00b69dfb0ede2f9218b9e8154 (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
---
# vi: ts=2 sw=2 et:
# SPDX-License-Identifier: LGPL-2.1-or-later
#
name: Build test
on:
  pull_request:
  push:
    branches:
      - main

permissions:
  contents: read

jobs:
  build:
    runs-on: ubuntu-20.04
    concurrency:
      group: ${{ github.workflow }}-${{ matrix.python }}-${{ github.ref }}
      cancel-in-progress: true
    strategy:
      fail-fast: false
      matrix:
        python: [
          "3.7",
          "3.8",
          "3.9",
          "3.10",
          "3.11.0-rc.1",
        ]
    name: Python ${{ matrix.python }}
    steps:
      - name: Repository checkout
        uses: actions/checkout@v2

      - name: Configure Python ${{ matrix.python }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python }}
          architecture: x64

      - name: Install dependencies
        run: |
          sudo apt -y update
          sudo apt -y install gcc libsystemd-dev
          python -m pip install pytest sphinx

      - name: Build (Python ${{ matrix.python }})
        run: |
          set -x
          make -j
          make doc SPHINXOPTS="-W -v"

      - name: Test (Python ${{ matrix.python }})
        run: |
          make check