Skip to content

Commit 83f2dbb

Browse files
authored
Add GitHub Actions CI and update loader configs (#171)
Introduces a GitHub Actions workflow for building and releasing ISO images for multiple FreeBSD versions. Updates loader.conf.sample files to enable ZFS and VirtIO-BLK support, and modifies the mini Makefile to ignore failed reads when creating base tarballs.
1 parent 47aa9c1 commit 83f2dbb

File tree

4 files changed

+76
-1
lines changed

4 files changed

+76
-1
lines changed

.github/workflows/build.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: mfsBSD Build
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
freebsd: ['13.5', '14.3', '15.0']
14+
script:
15+
- build-std
16+
- build-se
17+
- build-mini
18+
19+
name: FreeBSD ${{ matrix.freebsd }} / ${{ matrix.script }}
20+
21+
steps:
22+
- uses: actions/checkout@v6
23+
24+
- name: Build inside FreeBSD VM
25+
uses: vmactions/freebsd-vm@v1.3.6
26+
with:
27+
release: ${{ matrix.freebsd }}
28+
usesh: true
29+
run: |
30+
freebsd-version -kru
31+
pkg update -f
32+
mkdir -p /tmp/freebsd-dist
33+
fetch -o /tmp/freebsd-dist https://download.freebsd.org/ftp/releases/amd64/${{ matrix.freebsd }}-RELEASE/base.txz
34+
fetch -o /tmp/freebsd-dist https://download.freebsd.org/ftp/releases/amd64/${{ matrix.freebsd }}-RELEASE/kernel.txz
35+
ci/ci.sh -b prepare
36+
ci/ci.sh -b ${{ matrix.script }}
37+
38+
- name: Upload ISO artifacts
39+
uses: actions/upload-artifact@v6
40+
with:
41+
name: iso-${{ matrix.freebsd }}-${{ matrix.script }}
42+
path: "*.iso"
43+
44+
release:
45+
runs-on: ubuntu-latest
46+
needs: build
47+
48+
steps:
49+
- uses: actions/checkout@v6
50+
51+
- name: Download all ISO artifacts
52+
uses: actions/download-artifact@v7
53+
with:
54+
path: dist
55+
56+
- name: Generate release tag
57+
id: date
58+
run: |
59+
echo "tag=v$(date -u +%Y%m%d-%H%M%S)" >> $GITHUB_OUTPUT
60+
61+
- name: Publish GitHub Release
62+
uses: softprops/action-gh-release@v2.5.0
63+
with:
64+
tag_name: ${{ steps.date.outputs.tag }}
65+
name: Release ${{ steps.date.outputs.tag }}
66+
files: dist/**/*.iso
67+
make_latest: true
68+
env:
69+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

conf/loader.conf.sample

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,6 @@ mfs_name="/mfsroot"
5252
ahci_load="YES"
5353
vfs.root.mountfrom="ufs:/dev/ufs/mfsroot"
5454
mfsbsd.autodhcp="YES"
55+
zfs_load="YES"
56+
# Support For VirtIO-BLK, like Aliyun
57+
kern.maxphys="65536"

mini/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ basetar: hierarchy rescuelinks ${WRKDIR}/.basetar_done
167167
${WRKDIR}/.basetar_done:
168168
${_v}echo -n "Creating tar of base libraries and binaries ..."
169169
${_v}-cd ${BASEDIR} && \
170-
${TAR} -cJf ${_ROOTDIR}/.mfs_base.txz \
170+
${TAR} --ignore-failed-read -cJf ${_ROOTDIR}/.mfs_base.txz \
171171
`${CAT} ${FILESDIR}/basedirs ${FILESDIR}/basefiles`
172172
${_v}${TOUCH} ${WRKDIR}/.basetar_done
173173
${_v}echo " done"

mini/conf/loader.conf.sample

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ mfs_load="YES"
22
mfs_type="mfs_root"
33
mfs_name="/mfsroot"
44
vfs.root.mountfrom="ufs:/dev/ufs/mfsroot"
5+
zfs_load="YES"
6+
# Support For VirtIO-BLK, like Aliyun
7+
kern.maxphys="65536"

0 commit comments

Comments
 (0)