Skip to content

test-units: Don't fail fsverity test if /dev/loop-control is missing #236

test-units: Don't fail fsverity test if /dev/loop-control is missing

test-units: Don't fail fsverity test if /dev/loop-control is missing #236

Workflow file for this run

name: Test with meson
on: [push, pull_request]
permissions:
actions: read
jobs:
build:
runs-on: ubuntu-latest
name: "Build with ASAN"
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies
run: sudo ./hacking/installdeps.sh
- name: Install fsck.erofs
run: sudo apt install erofs-utils
- name: Install go-md2man
run: sudo apt install go-md2man
- name: Configure
run: meson setup build --prefix=/usr --werror -Db_sanitize=address,undefined
- name: Build
run: meson compile -C build
- name: Unit tests
run: meson test -C build
- name: Capture build
run: DESTDIR=$(pwd)/instroot meson install -C build && tar -C instroot -czf composefs.tar .
- name: Upload binary
uses: actions/upload-artifact@v2
with:
name: composefs.tar
path: composefs.tar
# This build doesn't enable ASAN, which e.g. makes it easier to use with Rust
build-noasan:
runs-on: ubuntu-latest
name: "Build without ASAN"
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies
run: sudo ./hacking/installdeps.sh
- name: Configure
run: meson setup build --prefix=/usr --werror
- name: Build
run: meson compile -C build
- name: Capture build
run: DESTDIR=$(pwd)/instroot meson install -C build && tar -C instroot -czf composefs.tar .
- name: Upload binary
uses: actions/upload-artifact@v2
with:
name: composefs-noasan.tar
path: composefs.tar
build-baseline:
runs-on: ubuntu-latest
name: "Build on Ubuntu Focal"
container: ubuntu:focal
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
apt-get update -y
ALLOW_MISSING="libfsverity-dev" ./hacking/installdeps.sh
- name: Configure
run: meson setup build --werror
- name: Build
# focal's meson is too old for 'meson compile'
run: ninja -C build
build-unit-cross:
runs-on: ubuntu-latest
name: Build on ${{ matrix.arch }}
strategy:
matrix:
include:
- arch: armv7
distro: ubuntu_latest
- arch: aarch64
distro: ubuntu_latest
- arch: s390x
distro: ubuntu_latest
- arch: ppc64le
distro: ubuntu_latest
steps:
- uses: actions/[email protected]
with:
submodules: true
set-safe-directory: true
- uses: uraimo/[email protected]
name: Build
id: build
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
githubToken: ${{ github.token }}
run: |
apt-get update -y
./hacking/installdeps.sh
meson setup build --werror
meson compile -C build
meson test -C build --timeout-multiplier 10
integration:
needs: build
runs-on: ubuntu-latest
steps:
- run: sudo apt-get update -y
- name: Install erofs kmod
run: sudo apt install linux-modules-extra-$(uname -r)
- name: Install sanitizer dependencies
run: sudo apt install libasan6 libubsan1
- name: Checkout repository
uses: actions/checkout@v3
- name: Download
uses: actions/download-artifact@v2
with:
name: composefs.tar
- run: sudo tar -C / -xvf composefs.tar
- name: Integration tests
run: sudo ./tests/integration.sh
rust:
needs: build-noasan
runs-on: ubuntu-latest
steps:
- run: sudo apt-get update -y
- name: Checkout repository
uses: actions/checkout@v3
- name: Download
uses: actions/download-artifact@v2
with:
name: composefs-noasan.tar
- run: sudo tar -C / -xvf composefs.tar
- name: Cache Dependencies
uses: Swatinem/rust-cache@v2
with:
key: "rust-main"
- name: Rust (default features)
run: cargo test
- name: Rust (all features)
run: cargo test -F v1_0_4
clang-format:
runs-on: ubuntu-24.04
steps:
- name: checkout
uses: actions/checkout@v2
- name: install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y make clang-format
- name: check formatting
run: |
sudo docker build -t clang-format hacking/clang-format
sudo docker run --rm -w /src -v ${PWD}:/src clang-format
distcheck:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies
run: sudo ./hacking/installdeps.sh
- name: Configure
run: meson setup build --werror
- name: Run make distcheck
run: meson dist -C build