]> git.proxmox.com Git - mirror_lxcfs.git/blob - .github/workflows/test.yml
19d4803db7397e194843b9526ce2f10cd9212026
[mirror_lxcfs.git] / .github / workflows / test.yml
1 name: Build and test
2 on:
3 - push
4 - pull_request
5
6 jobs:
7 test:
8 strategy:
9 fail-fast: false
10 matrix:
11 compiler:
12 - gcc
13 - clang
14 os:
15 - ubuntu-16.04
16 - ubuntu-18.04
17 - ubuntu-20.04
18 exclude:
19 - os: ubuntu-16.04
20 compiler: gcc
21 runs-on: ${{ matrix.os }}
22 steps:
23 - name: Checkout code
24 uses: actions/checkout@v2
25
26 - name: Install dependencies
27 run: |
28 sudo apt-get update -qq
29 sudo apt-get install -qq gcc clang
30 sudo apt-get install -qq libfuse-dev uuid-runtime
31 sudo apt-get install -qq python3 python3-setuptools
32 sudo pip3 install meson==0.55.1 ninja
33
34 - name: Compiler version
35 env:
36 CC: ${{ matrix.compiler }}
37 run: |
38 ${CC} --version
39
40 - name: Build
41 env:
42 CC: ${{ matrix.compiler }}
43 run: |
44 meson setup -Dtests=true -Dinit-script=systemd -Dprefix=/usr build/
45 ninja -C build
46 - name: Test
47 env:
48 CC: ${{ matrix.compiler }}
49 run: |
50 echo 1 | sudo tee /sys/fs/cgroup/cpuset/cgroup.clone_children || true
51 sudo -E PATH="${PATH}" LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" build/tests/main.sh