Skip to content

Commit ea92252

Browse files
committed
Build UMF on Alpine image
1 parent 2c5f602 commit ea92252

File tree

3 files changed

+43
-15
lines changed

3 files changed

+43
-15
lines changed

.github/docker/alpine-3.20.Dockerfile

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,20 @@ ENV OS_VER 3.20
1818
ARG BASE_DEPS="\
1919
cmake \
2020
git \
21-
g++ \
22-
make"
21+
g++ \
22+
make"
2323

2424
# UMF's dependencies
2525
ARG UMF_DEPS="\
2626
hwloc-dev"
2727

28-
# Add a new (non-root) 'test_user'
29-
ENV USER test_user
30-
ENV USERPASS pass
31-
RUN useradd -m "${USER}" -g sudo -p "$(mkpasswd ${USERPASS})"
32-
USER test_user
28+
# Dependencies for tests
29+
ARG TEST_DEPS="\
30+
numactl-dev"
3331

3432
# Update and install required packages
3533
RUN apk update \
3634
&& apk add \
3735
${BASE_DEPS} \
36+
${TEST_DEPS} \
3837
${UMF_DEPS}
39-
40-
# clone the repository
41-
RUN git clone https://github.com/oneapi-src/unified-memory-framework.git
42-
43-
# build the project
44-
RUN cd unified-memory-framework \
45-
cmake -B build -DCMAKE_BUILD_TYPE=Release -DUMF_BUILD_TESTS=ON -DUMF_BUILD_EXAMPLES=OFF \
46-
cmake --build build

.github/scripts/alpine_build.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
# Copyright (C) 2025 Intel Corporation
3+
# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
4+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
5+
6+
# alpine_build.sh - Script for building UMF on Alpine image
7+
8+
set -e
9+
10+
cd unified-memory-framework
11+
12+
cmake -B build -DCMAKE_BUILD_TYPE=$1 -DUMF_BUILD_TESTS=ON -DUMF_BUILD_EXAMPLES=ON
13+
cmake --build build

.github/workflows/nightly.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ permissions:
1313
env:
1414
BUILD_DIR : "${{github.workspace}}/build"
1515
INSTALL_DIR: "${{github.workspace}}/build/install"
16+
HOST_WORKDIR: ${{github.workspace}}
17+
WORKDIR: /unified-memory-framework
1618

1719
jobs:
1820
fuzz-test:
@@ -370,3 +372,25 @@ jobs:
370372

371373
SYCL:
372374
uses: ./.github/workflows/reusable_sycl.yml
375+
376+
alpine:
377+
name: Alpine
378+
strategy:
379+
fail-fast: false
380+
matrix:
381+
build_type: [Debug, Release]
382+
runs-on: ubuntu-latest
383+
384+
steps:
385+
- name: Checkout repository
386+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
387+
with:
388+
fetch-depth: 0
389+
390+
- name: Build Alpine image
391+
run: |
392+
docker build . -f .github/docker/alpine-3.20.Dockerfile -t alpine_image
393+
394+
- name: Run UMF build on Alpine image
395+
run: |
396+
docker run --rm --name alpine_container -i -v $HOST_WORKDIR:$WORKDIR alpine_image $WORKDIR/.github/scripts/alpine_build.sh ${{matrix.build_type}}

0 commit comments

Comments
 (0)