forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 12
90 lines (89 loc) · 3.39 KB
/
release.yaml
File metadata and controls
90 lines (89 loc) · 3.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Cloud Hypervisor Linux Release
on: [create]
jobs:
release:
if: github.event_name == 'create' && github.event.ref_type == 'tag'
name: Release
runs-on: ubuntu-22.04
steps:
- name: Code checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install build tools
run: sudo apt install build-essential flex bison libssl-dev libelf-dev bc gcc-aarch64-linux-gnu gcc-riscv64-linux-gnu
- name: Configure (aarch64)
run: ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make ch_defconfig
- name: Build (aarch64)
run: ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make Image.gz -j `nproc`
- name: Configure (riscv64)
run: ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- make ch_defconfig
- name: Build (riscv64)
run: ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- make Image.gz -j `nproc`
- name: Configure (x86-64)
run: make ch_defconfig
- name: Build kernel (x86-64)
run: CFLAGS="-Wa,-mx86-used-note=no" make bzImage -j `nproc`
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: true
- name: Upload bzImage for x86_64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: arch/x86/boot/bzImage
asset_name: bzImage-x86_64
asset_content_type: application/octet-stream
- name: Upload vmlinux for x86_64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: vmlinux
asset_name: vmlinux-x86_64
asset_content_type: application/octet-stream
- name: Upload Image.gz for aarch64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: arch/arm64/boot/Image.gz
asset_name: Image-arm64.gz
asset_content_type: application/octet-stream
- name: Upload Image for aarch64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: arch/arm64/boot/Image
asset_name: Image-arm64
asset_content_type: application/octet-stream
- name: Upload Image.gz for riscv64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: arch/riscv/boot/Image.gz
asset_name: Image-riscv.gz
asset_content_type: application/octet-stream
- name: Upload Image for riscv64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: arch/riscv/boot/Image
asset_name: Image-riscv
asset_content_type: application/octet-stream