-
Notifications
You must be signed in to change notification settings - Fork 83
53 lines (47 loc) · 1.87 KB
/
reusable_build_packages.yaml
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
# This is a reusable workflow used by main and release CI
on:
workflow_call:
inputs:
makecommand:
description: Command used for make
required: true
type: string
suffix:
description: Suffix for uploading packages (dev or stable)
required: true
type: string
jobs:
build-packages:
name: build-packages-${{ matrix.arch }}
runs-on: ${{ (matrix.arch == 'aarch64' && 'ubuntu-22.04-arm') || 'ubuntu-22.04' }}
strategy:
matrix:
arch: [x86_64, aarch64]
# Upgrading to a newer debian version would make the build process generate
# binaries that require newer GLIBC version so we need to be based on bullseye for now
container: golang:1.23-bullseye
steps:
- name: Install deps
run: |
apt update
apt install -y --no-install-recommends git awscli make build-essential autoconf libelf-dev libtool pkg-config
- name: Install updated cmake version ⛓️
run: |
curl -L -o /tmp/cmake.tar.gz https://github.com/Kitware/CMake/releases/download/v3.22.5/cmake-3.22.5-linux-$(uname -m).tar.gz
gzip -d /tmp/cmake.tar.gz
tar -xpf /tmp/cmake.tar --directory=/tmp
cp -R /tmp/cmake-3.22.5-linux-$(uname -m)/* /usr
rm -rf /tmp/cmake-3.22.5-linux-$(uname -m)
- name: Checkout Plugins ⤵️
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Safe directory
run: git config --global --add safe.directory $GITHUB_WORKSPACE
- name: Run build 🏗️
run: ${{ inputs.makecommand }}
- name: Upload artifacts
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: plugins-${{ matrix.arch }}-${{ inputs.suffix }}.tar.gz
path: output/*.tar.gz