25
25
required : true
26
26
type : string
27
27
28
-
29
28
jobs :
30
29
test :
31
30
runs-on : ubuntu-22.04
@@ -42,36 +41,42 @@ jobs:
42
41
name : ${{ inputs.artifact-dir }}
43
42
path : ${{ inputs.artifact-dir }}
44
43
44
+ - name : Download rootfs artifacts
45
+ uses : actions/download-artifact@v4
46
+ with :
47
+ name : rootfs-${{ inputs.arch }}
48
+ path : rootfs
49
+
45
50
- run : ls -lR
46
51
47
- - name : Install common dependencies
48
- run : sudo apt update && sudo apt install -y debootstrap
52
+ # - name: Install common dependencies
53
+ # run: sudo apt update && sudo apt install -y debootstrap
49
54
50
55
- name : Install x86_64 dependencies
51
56
if : ${{ inputs.arch == 'x86_64' }}
52
- run : sudo apt install -y qemu-system-x86
57
+ run : sudo apt update && sudo apt install -y qemu-system-x86
53
58
54
59
- name : Install arm64 dependencies
55
60
if : ${{ inputs.arch == 'arm64' }}
56
- run : sudo apt install -y qemu-system-arm qemu-user-static binfmt-support
61
+ run : sudo apt update && sudo apt install -y qemu-system-arm # qemu-user-static binfmt-support
57
62
58
- - name : Initialize rootfs and initramfs
59
- shell : bash
60
- run : |
61
- set -x
63
+ # - name: Initialize rootfs and initramfs
64
+ # shell: bash
65
+ # run: |
66
+ # set -x
62
67
63
- make rootfs-init
68
+ # make rootfs-init
64
69
65
- ALPINE_ROOTFS=alpine-${{ inputs.arch }}.img
66
- UBUNTU_ROOTFS=ubuntu-jammy-${{ inputs.arch }}.img
70
+ # ALPINE_ROOTFS=alpine-${{ inputs.arch }}.img
71
+ # UBUNTU_ROOTFS=ubuntu-jammy-${{ inputs.arch }}.img
67
72
68
- ROOTFS=${ALPINE_ROOTFS} make rootfs-init
73
+ # ROOTFS=${ALPINE_ROOTFS} make rootfs-init
69
74
70
- scripts/ubuntu_debootstrap.sh jammy ${{ inputs.arch }}
71
- SUDO=1 ROOTFS_DIR=./rootfs/ubuntu-jammy-${{ inputs.arch }} CPIO_FILE=ubuntu-jammy-${{ inputs.arch }}.cpio.gz make rootfs-overlay
75
+ # scripts/ubuntu_debootstrap.sh jammy ${{ inputs.arch }}
76
+ # SUDO=1 ROOTFS_DIR=./rootfs/ubuntu-jammy-${{ inputs.arch }} CPIO_FILE=ubuntu-jammy-${{ inputs.arch }}.cpio.gz make rootfs-overlay
72
77
73
- echo "ALPINE_ROOTFS=$ALPINE_ROOTFS" >> $GITHUB_OUTPUT
74
- echo "UBUNTU_ROOTFS=$UBUNTU_ROOTFS" >> $GITHUB_OUTPUT
78
+ # echo "ALPINE_ROOTFS=$ALPINE_ROOTFS" >> $GITHUB_OUTPUT
79
+ # echo "UBUNTU_ROOTFS=$UBUNTU_ROOTFS" >> $GITHUB_OUTPUT
75
80
76
81
- name : Setup shared/init.sh
77
82
run : |
@@ -81,16 +86,32 @@ jobs:
81
86
82
87
- name : Run kernel
83
88
run : |
84
- export QEMU_KERNEL_IMAGE=${{ inputs.artifact-dir }}/${{ inputs.kernel-image-name }}
89
+ export QEMU_KERNEL_IMAGE=${{ inputs.artifact-dir }}/${{ inputs.kernel-image-name }}-${{ inputs.suffix }}
90
+
91
+ ALPINE_ROOTFS=alpine-${{ inputs.arch }}.img
92
+ UBUNTU_ROOTFS=ubuntu-jammy-${{ inputs.arch }}.img
93
+ UBUNTU_CPIO=ubuntu-jammy-${{ inputs.arch }}.cpio.gz
94
+
95
+ cp ./rootfs/${ALPINE_ROOTFS} ./${ALPINE_ROOTFS}
96
+ cp ./rootfs/${UBUNTU_CPIO} ./${UBUNTU_CPIO}
85
97
98
+ # Run with default alpine rootfs
86
99
make run
87
- ROOTFS=./rootfs/${{ env.UBUNTU_ROOTFS }} make run
100
+
101
+ # Run with ubuntu rootfs
102
+ ROOTFS=./rootfs/${UBUNTU_ROOTFS} make run
103
+
104
+ # Run with default alpine cpio
88
105
INITRD=1 make run
89
- INITRD=./ubuntu-jammy-${{ inputs.arch }}.cpio.gz make run
90
- CPU=2 MEM=2048M QEMU_EXTRA_ARGS="" QEMU_EXTRA_KERNEL_CMDLINE="nokaslr" ROOTFS=./${{ env.ALPINE_ROOTFS }} make run
91
106
92
- - name : Upload rootfs artifact
93
- uses : actions/upload-artifact@v4
94
- with :
95
- name : rootfs-${{ inputs.SUFFIX }}
96
- path : rootfs/${{ env.ALPINE_ROOTFS }}
107
+ # Run with ubuntu cpio in non-standard location
108
+ INITRD=./${UBUNTU_CPIO} make run
109
+
110
+ # Run with alpine rootfs in non-standard location, with additional options
111
+ CPU=2 MEM=2048M QEMU_EXTRA_ARGS="" QEMU_EXTRA_KERNEL_CMDLINE="nokaslr" ROOTFS=./${ALPINE_ROOTFS} make run
112
+
113
+ # - name: Upload rootfs artifact
114
+ # uses: actions/upload-artifact@v4
115
+ # with:
116
+ # name: rootfs-${{ inputs.SUFFIX }}
117
+ # path: rootfs/${{ env.ALPINE_ROOTFS }}
0 commit comments