]> git.proxmox.com Git - mirror_lxcfs.git/blob - .github/workflows/test.yml
github: Drop 16.04
[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-18.04
16 - ubuntu-20.04
17 runs-on: ${{ matrix.os }}
18 steps:
19 - name: Checkout code
20 uses: actions/checkout@v2
21
22 - name: Install dependencies
23 run: |
24 sudo apt-get update -qq
25 sudo apt-get install -qq gcc clang
26 sudo apt-get install -qq libfuse-dev uuid-runtime
27 sudo apt-get install -qq python3 python3-setuptools
28 sudo pip3 install meson==0.55.1 ninja
29
30 - name: Compiler version
31 env:
32 CC: ${{ matrix.compiler }}
33 run: |
34 ${CC} --version
35
36 - name: Build
37 env:
38 CC: ${{ matrix.compiler }}
39 run: |
40 meson setup -Dtests=true -Dinit-script=systemd -Dprefix=/usr build/
41 ninja -C build
42 - name: Test
43 env:
44 CC: ${{ matrix.compiler }}
45 run: |
46 echo 1 | sudo tee /sys/fs/cgroup/cpuset/cgroup.clone_children || true
47 sudo -E PATH="${PATH}" LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" build/tests/main.sh