summaryrefslogtreecommitdiffstats
path: root/.github/workflows/build-program.yml
blob: 8a8d177f9cb5646179a9a4be21b3171ff41f4880 (plain) (blame)
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
name: Build xloop program

on:
  push:
    branches:
      - master
  pull_request:
  release:

jobs:
  build:
    strategy:
      fail-fast: false
      matrix:
        config:
          - name: debug [default] on Ubuntu 20.04
            build-os: ubuntu-20.04
            build-type: "Debug"
          - name: release [default] on Ubuntu 20.04
            build-os: ubuntu-20.04
            build-type: "Release"
    name: Build xloop ${{ matrix.config.name }}
    runs-on: ${{ matrix.config.build-os }}
    steps:
      - name: Install xloop dependencies
        run: |
          sudo apt-get update -y -qq
          sudo apt-get install -y -qq make \
                                      clang-format \
                                      linux-headers-generic \
                                      libcap-dev \
                                      rpm
      - name: Checkout xloop repository
        uses: actions/checkout@v4
      - name: Fetch xloop repository tags
        run: git fetch --prune --unshallow
      - name: Configure xloop build
        run: |
          cmake -B ${{ github.workspace }}/build \
                -S ${{ github.workspace }} \
                -D CMAKE_BUILD_TYPE=${{ matrix.config.build-type }}
      - name: Build xloop artifacts
        working-directory: ${{ github.workspace }}/build
        run: make xlosetup