Skip to content

Does the FreeBSD VM have ZFS support? #71

Does the FreeBSD VM have ZFS support?

Does the FreeBSD VM have ZFS support? #71

Workflow file for this run

name: Build
on:
pull_request:
push:
# workflow_call:
# outputs:
# artifact_name:
# description: Name of the sanoid-portable artifact uploaded during the build.
# value: ${{ jobs.build.outputs.artifact_name }}
workflow_dispatch:
jobs:
# build:
# runs-on: ubuntu-latest
# outputs:
# artifact_name: ${{ steps.set_artifact_name.outputs.artifact_name }}
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# - name: Initialize build environment
# run: ./init.sh
# - name: Build sanoid-portable binary
# run: |
# # Build on Ubuntu
# # Add a new binfmt entry that matches APE's (Actually Portable Executable)'s
# # magic number to avoid execution by Ubuntu's built-in "MZ" binfmt
# # interpreter which "helpfully" tries to run the binary with Wine.
# sudo update-binfmts --install APE /bin/sh --magic MZqFpD
# ./build.sh
# - name: Set artifact name
# id: set_artifact_name
# run: echo "artifact_name=sanoid-portable.${{ github.sha }}.${{ github.run_number }}" >> $GITHUB_OUTPUT
# - name: Upload built sanoid-portable artifact
# uses: actions/upload-artifact@v4
# with:
# name: ${{ steps.set_artifact_name.outputs.artifact_name }}
# path: output/sanoid-portable
# if-no-files-found: error
# retention-days: 5
test:
# needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
# - name: Download sanoid-portable artifact
# uses: actions/download-artifact@v4
# with:
# name: ${{ needs.build.outputs.artifact_name }}
# - name: Test on Ubuntu
# run: |
# # Test on Ubuntu
# # Add a new binfmt entry that matches APE's (Actually Portable Executable)'s
# # magic number to avoid execution by Ubuntu's built-in "MZ" binfmt
# # interpreter which "helpfully" tries to run the binary with Wine.
# sudo update-binfmts --install APE /bin/sh --magic MZqFpD
# ./test.sh
- name: Test in FreeBSD
uses: vmactions/freebsd-vm@v1
with:
usesh: true
prepare: |
pkg install -y jq
run: |
# ./test.sh
which zpool
which zfs
which truncate
truncate -s 1G disk-production.raw
truncate -s 1G disk-backup.raw
zpool create production-pool $(realpath disk-production.raw)
zpool create backup-pool $(realpath disk-backup.raw)
zfs create production-pool/test
zfs create backup-pool/test
zpool status
zfs list -rt all