Skip to content

Commit 9be83b4

Browse files
authored
Merge pull request #134 from teverett/master
Github actions CI for linux and OS X
2 parents be1309c + e4c583b commit 9be83b4

File tree

2 files changed

+109
-0
lines changed

2 files changed

+109
-0
lines changed

.github/workflows/main.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ '*' ]
6+
pull_request:
7+
branches: [ '*' ]
8+
jobs:
9+
build-macos:
10+
runs-on: macos-latest
11+
strategy:
12+
fail-fast: false
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: nasm
18+
run: brew install nasm
19+
20+
- name: install qemu
21+
run: brew install qemu
22+
23+
- name: install mtools
24+
run: brew install mtools
25+
26+
- name: install cdrtools
27+
run: brew install cdrtools
28+
29+
- name: Build
30+
run: ./baremetal.sh setup
31+
32+
# this is here just as a QA check to ensure it works on OS X
33+
- name: Build img
34+
run: ./baremetal.sh setup
35+
36+
# this is here just as a QA check to ensure it works on OS X
37+
- name: Build vdi
38+
run: ./baremetal.sh vdi
39+
40+
# this is here just as a QA check to ensure it works on OS X
41+
- name: Build vmdk
42+
run: ./baremetal.sh vmdk
43+
44+
# this is here just as a QA check to ensure it works on OS X
45+
- name: Build vpc
46+
run: ./baremetal.sh vpc
47+
48+
build-ubuntu:
49+
runs-on: ubuntu-latest
50+
strategy:
51+
fail-fast: false
52+
53+
steps:
54+
- uses: actions/checkout@v4
55+
56+
- name: install nasm
57+
run: sudo apt install nasm
58+
59+
- name: install qemu-utils
60+
run: sudo apt install qemu-utils
61+
62+
- name: install mtools
63+
run: sudo apt install mtools
64+
65+
- name: install mkisofs
66+
run: sudo apt install mkisofs
67+
68+
- name: Build img
69+
run: ./baremetal.sh setup
70+
71+
- name: Build vdi
72+
run: ./baremetal.sh vdi
73+
74+
- name: Build vmdk
75+
run: ./baremetal.sh vmdk
76+
77+
- name: Build vpc
78+
run: ./baremetal.sh vpc
79+
80+
- uses: actions/upload-artifact@v4
81+
with:
82+
name: BareMetal_OS.img
83+
path: sys/floppy.img
84+
85+
- uses: actions/upload-artifact@v4
86+
with:
87+
name: BareMetal_OS.vdi
88+
path: sys/BareMetal_OS.vdi
89+
90+
- uses: actions/upload-artifact@v4
91+
with:
92+
name: BareMetal_OS.vmdk
93+
path: sys/BareMetal_OS.vmdk
94+
95+
- uses: actions/upload-artifact@v4
96+
with:
97+
name: BareMetal_OS.vpc
98+
path: sys/BareMetal_OS.vpc

baremetal.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,12 @@ function baremetal_vmdk {
429429
qemu-img convert -O vmdk "$OUTPUT_DIR/baremetal_os.img" "$OUTPUT_DIR/BareMetal_OS.vmdk"
430430
}
431431

432+
function baremetal_vpc {
433+
baremetal_sys_check
434+
echo "Creating VPC image..."
435+
qemu-img convert -O vpc "$OUTPUT_DIR/baremetal_os.img" "$OUTPUT_DIR/BareMetal_OS.vpc"
436+
}
437+
432438
function baremetal_bnr {
433439
baremetal_build
434440
baremetal_install
@@ -471,6 +477,7 @@ function baremetal_help {
471477
echo "run-2 - Run a second instance of BareMetal for network testing"
472478
echo "vdi - Generate VDI disk image for VirtualBox"
473479
echo "vmdk - Generate VMDK disk image for VMware"
480+
echo "vpc - Generate VPC disk image for HyperV"
474481
echo "bnr - Build 'n Run"
475482
echo "bnr-uefi - Build 'n Run in UEFI mode"
476483
echo "*.app - Install and run an app"
@@ -515,6 +522,10 @@ elif [ $# -eq 1 ]; then
515522
baremetal_install_demos
516523
elif [ "$1" == "vdi" ]; then
517524
baremetal_vdi
525+
elif [ "$1" == "vmdk" ]; then
526+
baremetal_vmdk
527+
elif [ "$1" == "vpc" ]; then
528+
baremetal_vpc
518529
elif [ "$1" == "bnr" ]; then
519530
baremetal_bnr
520531
elif [ "$1" == "bnr-uefi" ]; then

0 commit comments

Comments
 (0)