Skip to content

Commit 8fdcf9d

Browse files
committed
github: Add binary kernel binary build and upload
Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
1 parent 6596583 commit 8fdcf9d

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/release.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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 gcc-aarch64-linux-gnu
16+
- name: Download config (aarch64)
17+
run: curl https://raw.githubusercontent.com/cloud-hypervisor/cloud-hypervisor/main/resources/linux-config-aarch64 -o .config
18+
- name: Build (aarch64)
19+
run: ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make Image.gz -j `nproc`
20+
# - name: Download config
21+
# run: curl https://raw.githubusercontent.com/cloud-hypervisor/cloud-hypervisor/main/resources/linux-config-x86_64 -o .config
22+
# - name: Build kernel
23+
# run: CFLAGS="-Wa,-mx86-used-note=no" make bzImage -j `nproc`
24+
# - name: Create release
25+
# id: create_release
26+
# uses: actions/create-release@v1
27+
# env:
28+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
# with:
30+
# tag_name: ${{ github.ref }}
31+
# release_name: ${{ github.ref }}
32+
# draft: true
33+
# - name: Upload bzImage for x86_64
34+
# id: upload-release-hypervisor-fw
35+
# uses: actions/upload-release-asset@v1
36+
# env:
37+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
# with:
39+
# upload_url: ${{ steps.create_release.outputs.upload_url }}
40+
# asset_path: arch/x86/boot/bzImage
41+
# asset_name: bzImage
42+
# asset_content_type: application/octet-stream
43+
# - name: Upload vmlinux for x86_64
44+
# id: upload-release-hypervisor-fw
45+
# uses: actions/upload-release-asset@v1
46+
# env:
47+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
# with:
49+
# upload_url: ${{ steps.create_release.outputs.upload_url }}
50+
# asset_path: vmlinux
51+
# asset_name: vmlinux
52+
# asset_content_type: application/octet-stream

0 commit comments

Comments
 (0)