Skip to content

Commit 16cd4f3

Browse files
committed
github: Add binary kernel binary build and upload
Signed-off-by: Rob Bradford <[email protected]>
1 parent 6596583 commit 16cd4f3

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/release.yaml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Cloud Hypervisor Linux Release
2+
on: [create, push]
3+
4+
jobs:
5+
release:
6+
#if: github.event_name == 'create' && github.event.ref_type == 'tag'
7+
name: Release
8+
runs-on: ubuntu-22.04
9+
steps:
10+
- name: Code checkout
11+
uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 1
14+
- name: Install build tools
15+
run: sudo apt install build-essential flex bison libssl-dev libelf-dev bc
16+
- name: Download config
17+
run: curl https://raw.githubusercontent.com/cloud-hypervisor/cloud-hypervisor/main/resources/linux-config-x86_64 -o .config
18+
- name: Build kernel
19+
run: CFLAGS="-Wa,-mx86-used-note=no" make bzImage -j `nproc`
20+
- name: Create release
21+
id: create_release
22+
uses: actions/create-release@v1
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
with:
26+
tag_name: ${{ github.ref }}
27+
release_name: ${{ github.ref }}
28+
draft: true
29+
# - name: Upload bzImage for x86_64
30+
# id: upload-release-hypervisor-fw
31+
# uses: actions/upload-release-asset@v1
32+
# env:
33+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
# with:
35+
# upload_url: ${{ steps.create_release.outputs.upload_url }}
36+
# asset_path: arch/x86/boot/bzImage
37+
# asset_name: bzImage
38+
# asset_content_type: application/octet-stream
39+
# - name: Upload vmlinux for x86_64
40+
# id: upload-release-hypervisor-fw
41+
# uses: actions/upload-release-asset@v1
42+
# env:
43+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
# with:
45+
# upload_url: ${{ steps.create_release.outputs.upload_url }}
46+
# asset_path: vmlinux
47+
# asset_name: vmlinux
48+
# asset_content_type: application/octet-stream

0 commit comments

Comments
 (0)