11name : Cloud Hypervisor edk2 release
2- on : [create,push]
2+ on : [create, push]
33
44jobs :
5- build :
6- name : Build
7- runs-on : ubuntu-22 .04
5+ build-x64 :
6+ name : Build x86-64
7+ runs-on : ubuntu-24 .04
88 steps :
99 - name : Code checkout
10- uses : actions/checkout@v2
10+ uses : actions/checkout@v4
1111 with :
1212 fetch-depth : 0
1313 - name : Install dependencies
14- run : sudo apt-get update && sudo apt-get -y install uuid-dev iasl build-essential python3-distutils git libbrotli-dev
14+ run : sudo apt-get update && sudo apt-get -y install uuid-dev iasl build-essential git libbrotli-dev
1515 - name : Install nasm
1616 run : |
1717 wget https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/nasm-2.15.05.tar.xz
@@ -23,38 +23,57 @@ jobs:
2323 popd
2424 - name : Init submodules
2525 run : git submodule update --init --recursive
26- - name : Create environment variables
27- run : source edksetup.sh
28- - name : Build BaseTools
29- run : make -C BaseTools
30- - name : Build CLOUDHV
31- run : OvmfPkg/build.sh -p OvmfPkg/CloudHv/CloudHvX64.dsc -a X64 -b DEBUG
32- - name : Create release
26+ - name : Build BaseTools and firmware
27+ run : |
28+ source edksetup.sh
29+ make -C BaseTools
30+ OvmfPkg/build.sh -p OvmfPkg/CloudHv/CloudHvX64.dsc -a X64 -b DEBUG
31+ - name : Upload x86-64 artifact
3332 if : github.event_name == 'create' && github.event.ref_type == 'tag'
34- id : create_release
35- uses : actions/create-release@v1
36- env :
37- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
33+ uses : actions/upload-artifact@v4
3834 with :
39- tag_name : ${{ github.ref }}
40- release_name : ${{ github.ref }}
41- draft : true
42- - name : Upload CLOUDHV.fd
35+ name : cloudhv-x64
36+ path : Build/CloudHvX64/DEBUG_GCC5/FV/CLOUDHV.fd
37+
38+ build-aarch64 :
39+ name : Build AArch64
40+ runs-on : ubuntu-24.04
41+ steps :
42+ - name : Code checkout
43+ uses : actions/checkout@v4
44+ with :
45+ fetch-depth : 0
46+ - name : Install dependencies
47+ run : sudo apt-get update && sudo apt-get -y install uuid-dev iasl build-essential git libbrotli-dev gcc-aarch64-linux-gnu
48+ - name : Init submodules
49+ run : git submodule update --init --recursive
50+ - name : Build BaseTools and firmware
51+ run : |
52+ source edksetup.sh
53+ make -C BaseTools
54+ export GCC5_AARCH64_PREFIX=aarch64-linux-gnu-
55+ build -p ArmVirtPkg/ArmVirtCloudHv.dsc -a AARCH64 -t GCC5 -b DEBUG
56+ - name : Upload AArch64 artifact
4357 if : github.event_name == 'create' && github.event.ref_type == 'tag'
44- uses : actions/upload-release-asset@v1
45- env :
46- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
58+ uses : actions/upload-artifact@v4
4759 with :
48- upload_url : ${{ steps.create_release.outputs.upload_url }}
49- asset_path : Build/CloudHvX64/DEBUG_GCC5/FV/CLOUDHV.fd
50- asset_name : CLOUDHV.fd
51- asset_content_type : application/octet-stream
52-
53-
54-
55-
56-
57-
58-
59-
60+ name : cloudhv-aarch64
61+ path : Build/ArmVirtCloudHv-AARCH64/DEBUG_GCC5/FV/CLOUDHV_EFI.fd
6062
63+ release :
64+ name : Release
65+ if : github.event_name == 'create' && github.event.ref_type == 'tag'
66+ needs : [build-x64, build-aarch64]
67+ runs-on : ubuntu-latest
68+ permissions :
69+ contents : write
70+ steps :
71+ - name : Download artifacts
72+ uses : actions/download-artifact@v4
73+ - name : Create release
74+ uses : softprops/action-gh-release@v2
75+ with :
76+ draft : true
77+ files : |
78+ cloudhv-x64/CLOUDHV.fd
79+ cloudhv-aarch64/CLOUDHV_EFI.fd
0 commit comments