Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Check

on: [push]

jobs:
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/${{ github.repository }}-builder:ci_pr
steps:
- name: Check out repository code
uses: actions/checkout@v4

- name: Build ouichefs
run: make -C /usr/src/linux-6.5.7/ M=$PWD

- name: Prepare disk image
run: make -C mkfs/ img IMG=a.img

- name: Cache built module
uses: actions/cache/save@v4
with:
path: ./
key: ${{ github.sha }}

check:
needs: build
runs-on: ubuntu-latest
container:
image: ghcr.io/${{ github.repository }}-builder:ci-pr
strategy:
matrix:
checks: [ouichefs_basic_behavior, ouichefs_fio]
timeout-minutes: 10
steps:
- name: Restore built module
uses: actions/cache/restore@v4
with:
key: ${{ github.sha }}
path: ./

- name: Prepare images
run: cp mkfs/a.img mkfs/b.img

- name: Check ${{ matrix.checks }}...
run: >
vng
--verbose
--run=/usr/src/linux-6.5.7
--qemu-opts='-drive file=mkfs/a.img,format=raw,if=virtio'
--qemu-opts='-drive file=mkfs/b.img,format=raw,if=virtio'
--exec='make -C /lib/modules/\`uname -r\`/build M=$PWD modules_install
&& source ./evaluation.sh
&& check_${{ matrix.checks }}'
43 changes: 43 additions & 0 deletions .github/workflows/container.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Create and publish a Docker image

on:
push:
paths:
- "Dockerfile"

env:
REGISTRY: ghcr.io

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}-builder

- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# The virtme-ng present in the latest LTS at the time of writing has a bug that causes
# the VM to shutdown unexpectedly.
FROM ubuntu:25.04

# deb-src repositories are required for `apt-get build-dep`.
RUN sed -i 's/Types: deb/Types: deb deb-src/g' /etc/apt/sources.list.d/ubuntu.sources

# iproute2, kbd and udev are required by virtme-ng
# nodejs is needed for the GitHub Actions cache scripts
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y virtme-ng iproute2 kbd udev fio nodejs && \
apt-get build-dep -y --no-install-recommends linux
WORKDIR /usr/src/
ADD https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.5.7.tar.xz /usr/src/
RUN tar xf linux-6.5.7.tar.xz
WORKDIR /usr/src/linux-6.5.7/
RUN vng --configitem CONFIG_DEBUG_KMEMLEAK=y --build
Loading