]> git.proxmox.com Git - mirror_lxcfs.git/blob - .github/workflows/tests.yml
github: enable ASAN and UBSAN during PR tests
[mirror_lxcfs.git] / .github / workflows / tests.yml
1 name: Tests
2 on:
3 - push
4 - pull_request
5
6 permissions:
7 contents: read
8
9 jobs:
10 fuse2:
11 name: FUSE2
12 strategy:
13 fail-fast: false
14 matrix:
15 compiler:
16 - gcc
17 - clang
18 os:
19 - ubuntu-18.04
20 - ubuntu-20.04
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 -Ddocs=false -Dtests=true -Dinit-script=systemd -Dprefix=/usr -Db_sanitize=address,undefined build/
45 meson compile -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
52
53 fuse3:
54 name: FUSE3
55 strategy:
56 fail-fast: false
57 matrix:
58 compiler:
59 - gcc
60 - clang
61 os:
62 - ubuntu-20.04
63 runs-on: ${{ matrix.os }}
64 steps:
65 - name: Checkout code
66 uses: actions/checkout@v2
67
68 - name: Install dependencies
69 run: |
70 sudo add-apt-repository universe
71 sudo apt-get update -qq
72 sudo apt-get install -qq gcc clang
73 sudo apt-get install -qq libfuse3-dev uuid-runtime
74 sudo apt-get install -qq python3 python3-setuptools
75 sudo pip3 install meson==0.55.1 ninja
76
77 - name: Compiler version
78 env:
79 CC: ${{ matrix.compiler }}
80 run: |
81 ${CC} --version
82
83 - name: Build
84 env:
85 CC: ${{ matrix.compiler }}
86 run: |
87 meson setup -Ddocs=false -Dtests=true -Dinit-script=systemd -Dprefix=/usr -Db_sanitize=address,undefined build/
88 meson compile -C build
89 - name: Test
90 env:
91 CC: ${{ matrix.compiler }}
92 run: |
93 echo 1 | sudo tee /sys/fs/cgroup/cpuset/cgroup.clone_children || true
94 sudo -E PATH="${PATH}" LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" build/tests/main.sh