-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (69 loc) · 2.33 KB
/
Copy pathbuild-vmlinux.yml
File metadata and controls
82 lines (69 loc) · 2.33 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
name: Create a new Release
on:
workflow_dispatch:
permissions:
contents: write
concurrency:
group: build-vmlinux
cancel-in-progress: false
jobs:
prepare:
runs-on: ubuntu-24.04
outputs:
matrix: ${{ steps.gen.outputs.matrix }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: turtlequeue/setup-babashka@d78ec6570aea3b614bc695cafcceb82eb45c2af9 # v1.8.0
with:
babashka-version: 1.12.218
- name: Generate build matrix from manifest.clj
id: gen
run: |
set -euo pipefail
matrix="$(bb gha-matrix-json)"
echo "matrix=$matrix" >> "$GITHUB_OUTPUT"
echo "$matrix"
build:
needs: prepare
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.prepare.outputs.matrix) }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Install build dependencies (cached)
uses: awalsh128/cache-apt-pkgs-action@681749ae568c81c2037cb9185e38b709b261bd2f # v1.6.1
with:
packages: build-essential bc bison flex libssl-dev libelf-dev xz-utils curl
version: 1
- uses: turtlequeue/setup-babashka@d78ec6570aea3b614bc695cafcceb82eb45c2af9 # v1.8.0
with:
babashka-version: 1.12.218
- name: Build kernel and stage artifact
env:
NAME: ${{ matrix.name }}
run: bb build "$NAME"
- name: Upload build outputs
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: out-${{ matrix.name }}
path: out/
if-no-files-found: error
publish:
needs: build
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: turtlequeue/setup-babashka@d78ec6570aea3b614bc695cafcceb82eb45c2af9 # v1.8.0
with:
babashka-version: 1.12.218
- name: Download all build outputs
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
pattern: out-*
path: dist
- name: Publish release
env:
GH_TOKEN: ${{ github.token }}
GIT_SHA: ${{ github.sha }}
run: bb release dist "$GIT_SHA"