Skip to content

Commit

Permalink
Added XFS test to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mtelvers committed Aug 29, 2023
1 parent 32cab08 commit 816e287
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,32 @@ sudo chmod a+x /usr/local/bin/uname
opam exec -- make

case "$1" in
xfs)
sudo chmod a+x /usr/local/bin/runc

dd if=/dev/zero of=/tmp/xfs.img bs=100M count=100
XFS_LOOP=$(sudo losetup -f)
sudo losetup -P "$XFS_LOOP" /tmp/xfs.img
sudo mkfs.xfs -f "$XFS_LOOP"
sudo mkdir /xfs
sudo mount -t xfs "$XFS_LOOP" /xfs
sudo chown "$(whoami)" /xfs

opam exec -- dune exec -- obuilder healthcheck --store=xfs:/xfs
opam exec -- dune exec -- ./stress/stress.exe --store=xfs:/xfs

# Populate the caches from our own GitHub Actions cache
mkdir -p /xfs/cache/c-opam-archives
cp -r ~/.opam/download-cache/* /xfs/cache/c-opam-archives/
sudo chown -R 1000:1000 /xfs/cache/c-opam-archives

opam exec -- dune exec -- obuilder build -f example.spec . --store=xfs:/xfs --color=always

sudo umount /xfs
sudo losetup -d "$XFS_LOOP"
sudo rm -f /tmp/xfs.img
;;

btrfs)
sudo chmod a+x /usr/local/bin/runc

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: btrfs-progs zfs-dkms zfsutils-linux
packages: btrfs-progs zfs-dkms zfsutils-linux xfsprogs
version: 2

- name: Checkout code
Expand All @@ -57,6 +57,7 @@ jobs:
- run: $GITHUB_WORKSPACE/.github/workflows/main.sh btrfs
- run: $GITHUB_WORKSPACE/.github/workflows/main.sh zfs
- run: $GITHUB_WORKSPACE/.github/workflows/main.sh xfs

build_rsync:
strategy:
Expand Down

0 comments on commit 816e287

Please sign in to comment.