-
Notifications
You must be signed in to change notification settings - Fork 11
55 lines (54 loc) · 1.82 KB
/
build.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
52
53
54
55
on:
workflow_call:
inputs:
architecture:
required: true
type: string
description: Architecture string, for example aarch64
runner:
required: true
type: string
description: The runner to execute the build on, for example ubuntu-latest
workflow_dispatch:
inputs:
architecture:
required: true
type: string
description: Architecture string, for example aarch64
runner:
required: true
type: string
description: The runner to execute the build on, for example ubuntu-latest
jobs:
build:
name: Build
runs-on: ${{ inputs.runner }}
steps:
- uses: actions/checkout@v2
- name: Configure System
run: |
sudo apt-get update -y
sudo apt-get install -y qemu-user-static
env:
DEBIAN_FRONTEND: noninteractive
- name: Test Formatting
run: make test-format ARCH=${{inputs.architecture}}
- name: Test Build
run: make build ARCH=${{inputs.architecture}}
- name: Test Packaging
run: make package ARCH=${{inputs.architecture}}
- name: Test for source differences post-build
run: git diff --exit-code
- name: Set Version
id: version-generator
run: echo "ELASTIC_EBPF_VERSION=$(cat VERSION)" >> "$GITHUB_OUTPUT"
- name: Set Path
id: path-generator
run: echo "PWD=$(pwd)" >> "$GITHUB_OUTPUT"
- name: Archive Build Artifacts
uses: actions/upload-artifact@v4
with:
name: elastic-ebpf-${{ inputs.architecture }}
path: ${{ steps.path-generator.outputs.PWD }}/artifacts-${{ inputs.architecture }}/elastic-ebpf-${{ steps.version-generator.outputs.ELASTIC_EBPF_VERSION }}-SNAPSHOT.tar.gz
if-no-files-found: error
retention-days: 3