Skip to content

Commit 70feb95

Browse files
committed
[KLC-1919] ci(workflow): add GitHub Actions workflow for musl library builds
Automate musl library compilation for Alpine-based deployments through CI/CD pipeline with multi-architecture support. - Add libvmexeccapi-build-alpine.yml workflow - Configure matrix build for amd64 and arm64 platforms - Use Docker Buildx with QEMU for cross-platform compilation - Upload musl library artifacts for both architectures
1 parent abeb4d5 commit 70feb95

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: libvmexeccapi-build-alpine
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- klever
8+
pull_request:
9+
10+
jobs:
11+
build:
12+
name: Build musl library for ${{ matrix.platform }}
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
include:
17+
- platform: linux/amd64
18+
artifact_name: libvmexeccapi-musl.so
19+
artifact_suffix: amd64
20+
- platform: linux/arm64
21+
artifact_name: libvmexeccapi_arm-musl.so
22+
artifact_suffix: arm64
23+
steps:
24+
- name: Check out code
25+
uses: actions/checkout@v4
26+
with:
27+
fetch-depth: "0"
28+
29+
- name: Set up QEMU
30+
uses: docker/setup-qemu-action@v3
31+
32+
- name: Set up Docker Buildx
33+
uses: docker/setup-buildx-action@v3
34+
35+
- name: Build Docker image
36+
uses: docker/build-push-action@v5
37+
with:
38+
context: .
39+
load: true
40+
platforms: ${{ matrix.platform }}
41+
file: ./Docker/alpine.dockerfile
42+
tags: alpine-builder-${{ matrix.artifact_suffix }}
43+
44+
- name: Extract library from Docker image
45+
run: |
46+
mkdir -p output
47+
docker run --platform="${{ matrix.platform }}" --rm alpine-builder-${{ matrix.artifact_suffix }} cat /data/${{ matrix.artifact_name }} > $GITHUB_WORKSPACE/${{ matrix.artifact_name }}
48+
49+
- name: Save artifacts
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: libs-alpine-${{ matrix.artifact_suffix }}
53+
path: |
54+
${{ matrix.artifact_name }}
55+
if-no-files-found: error

0 commit comments

Comments
 (0)