-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (44 loc) · 1.47 KB
/
publish.yml
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
name: u-root-publish
on:
push:
tags:
- '*'
jobs:
publish:
strategy:
matrix:
template: ["core", "boot core", "world", "cpu"]
arch: [amd64, arm, arm64, riscv64]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Build
run: |
go install github.com/u-root/mkuimage/cmd/mkuimage@latest
go install github.com/hugelgupf/vmtest/tools/runvmtest@latest
GOARCH=${{ matrix.arch }} mkuimage -config=default \
-o "${{ matrix.arch }}-${{ matrix.template }}.cpio" \
${{ matrix.template }}
xz --check=crc32 -9 --lzma2=dict=1MiB \
--stdout "${{ matrix.arch }}-${{ matrix.template }}.cpio" | \
dd conv=sync bs=512 \
of="${{ matrix.arch }}-${{ matrix.template }}.cpio.xz"
runvmtest -- bash -c "cp \$VMTEST_KERNEL ./kernel-x86_64"
- name: Upload
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: "${{ matrix.arch }}-${{ matrix.template }}.cpio.xz"
asset_name: "u-root_${{ matrix.arch }}_${{ matrix.template }}.cpio.xz"
- name: Upload_kernels
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: kernel-x86_64
asset_name: kernel-x86_64