Skip to content

Commit 1889a19

Browse files
committed
CI: add macOS job to verify mkfs.simplefs
Add a CI script to build mkfs.simplefs and format a test image on macOS runners. Signed-off-by: hsule <leann9001@gmail.com>
1 parent 04a801a commit 1889a19

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

.ci/test-mkfs-macos.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
IMAGE=test.img
6+
IMAGESIZE=50
7+
MKFS=mkfs.simplefs
8+
9+
function build_mkfs()
10+
{
11+
make $MKFS
12+
}
13+
14+
function test_mkfs()
15+
{
16+
dd if=/dev/zero of=$IMAGE bs=1M count=$IMAGESIZE 2>/dev/null
17+
./$MKFS $IMAGE
18+
}
19+
20+
build_mkfs
21+
test_mkfs

.github/workflows/main.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,13 @@ jobs:
2626
.ci/check-newline.sh
2727
.ci/check-format.sh
2828
shell: bash
29+
30+
mkfs_macos:
31+
runs-on: macos-latest
32+
steps:
33+
- name: checkout code
34+
uses: actions/checkout@v4
35+
- name: test mkfs.simplefs on macOS
36+
run: |
37+
.ci/test-mkfs-macos.sh
38+
shell: bash

0 commit comments

Comments
 (0)