Skip to content

Commit

Permalink
Fix and update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mtelvers committed Feb 28, 2024
1 parent 1500147 commit c8a984e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
22 changes: 21 additions & 1 deletion .github/workflows/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,26 @@ sudo chmod a+x /usr/local/bin/uname
opam exec -- make

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

sudo mkdir /overlayfs
sudo mount -t tmpfs -o size=10G tmpfs /overlayfs
sudo chown "$(whoami)" /overlayfs

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

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

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

sudo umount /overlayfs
;;

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

Expand Down Expand Up @@ -165,6 +185,6 @@ case "$1" in
;;

*)
printf "Usage: .run-gha-tests.sh [btrfs|rsync_hardlink|rsync_copy|zfs]" >&2
printf "Usage: .run-gha-tests.sh [btrfs|rsync_hardlink|rsync_copy|zfs|overlayfs]" >&2
exit 1
esac
8 changes: 2 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,9 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
# The ppa is needed because of https://www.mail-archive.com/[email protected]/msg5972997.html
- run: |
sudo add-apt-repository ppa:jonathonf/zfs && \
sudo apt-get --allow-releaseinfo-change update
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: btrfs-progs zfs-dkms zfsutils-linux xfsprogs
packages: btrfs-progs zfsutils-linux xfsprogs
version: 2

- name: Checkout code
Expand All @@ -55,6 +50,7 @@ jobs:
run: |
sudo wget https://github.com/opencontainers/runc/releases/download/$RUNC_VERSION/runc.amd64 -O /usr/local/bin/runc
- run: $GITHUB_WORKSPACE/.github/workflows/main.sh overlayfs
- run: $GITHUB_WORKSPACE/.github/workflows/main.sh btrfs
- run: $GITHUB_WORKSPACE/.github/workflows/main.sh zfs
- run: $GITHUB_WORKSPACE/.github/workflows/main.sh xfs
Expand Down

0 comments on commit c8a984e

Please sign in to comment.