Skip to content

Commit b668842

Browse files
committed
add dockers
1 parent 4b1a946 commit b668842

File tree

7 files changed

+303
-109
lines changed

7 files changed

+303
-109
lines changed

.github/docker/ubuntu-20.04.Dockerfile

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Copyright (C) 2024 Intel Corporation
1+
# Copyright (C) 2024-2025 Intel Corporation
22
# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
33
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44

55
#
66
# Dockerfile - a 'recipe' for Docker to build an image of ubuntu-based
7-
# environment for building the Unified Memory Framework project.
7+
# environment for building the Unified Memory Framework project.
88
#
99

1010
# Pull base image ("20.04")
@@ -22,14 +22,22 @@ ARG BASE_DEPS="\
2222
cmake \
2323
git"
2424

25+
# Hwloc installation dependencies
26+
ARG HWLOC_DEPS="\
27+
dos2unix \
28+
libtool"
29+
30+
# Copy hwloc
31+
COPY .github/scripts/install_hwloc.sh /opt/umf/install_hwloc.sh
32+
2533
# UMF's dependencies
26-
ARG UMF_DEPS="\
27-
libhwloc-dev \
28-
libtbb-dev"
34+
# libhwloc-dev is required - installed via script because hwloc verion is to old on this OS
2935

3036
# Dependencies for tests (optional)
3137
ARG TEST_DEPS="\
32-
libnuma-dev"
38+
libnuma-dev \
39+
libtbb-dev\
40+
valgrind"
3341

3442
# Miscellaneous for our builds/CI (optional)
3543
ARG MISC_DEPS="\
@@ -38,24 +46,27 @@ ARG MISC_DEPS="\
3846
g++-7 \
3947
python3-pip \
4048
sudo \
41-
whois"
49+
whois \
50+
lcov"
4251

4352
# Update and install required packages
4453
RUN apt-get update \
4554
&& apt-get install -y --no-install-recommends \
4655
${BASE_DEPS} \
47-
${UMF_DEPS} \
4856
${TEST_DEPS} \
4957
${MISC_DEPS} \
58+
${HWLOC_DEPS} \
59+
&& /opt/umf/install_hwloc.sh \
5060
&& rm -rf /var/lib/apt/lists/* \
5161
&& apt-get clean all
5262

5363
# Prepare a dir (accessible by anyone)
54-
RUN mkdir --mode 777 /opt/umf/
64+
RUN mkdir -p --mode 777 /opt/umf/
5565

5666
# Additional dependencies (installed via pip)
67+
# It's actively used and tested only on selected distros. Be aware
68+
# they may not work, because pip packages list differ from OS to OS.
5769
COPY third_party/requirements.txt /opt/umf/requirements.txt
58-
RUN pip3 install --no-cache-dir -r /opt/umf/requirements.txt
5970

6071
# Add a new (non-root) 'test_user'
6172
ENV USER test_user

.github/docker/ubuntu-22.04.Dockerfile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2024 Intel Corporation
1+
# Copyright (C) 2024-2025 Intel Corporation
22
# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
33
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44

@@ -24,33 +24,35 @@ ARG BASE_DEPS="\
2424

2525
# UMF's dependencies
2626
ARG UMF_DEPS="\
27-
libhwloc-dev \
28-
libtbb-dev"
27+
libhwloc-dev"
2928

3029
# Dependencies for tests (optional)
3130
ARG TEST_DEPS="\
32-
libnuma-dev"
31+
libnuma-dev \
32+
libtbb-dev\
33+
valgrind"
3334

3435
# Miscellaneous for our builds/CI (optional)
3536
ARG MISC_DEPS="\
3637
automake \
3738
clang \
3839
python3-pip \
3940
sudo \
40-
whois"
41+
whois \
42+
lcov"
4143

4244
# Update and install required packages
4345
RUN apt-get update \
4446
&& apt-get install -y --no-install-recommends \
4547
${BASE_DEPS} \
46-
${UMF_DEPS} \
4748
${TEST_DEPS} \
4849
${MISC_DEPS} \
50+
${UMF_DEPS} \
4951
&& rm -rf /var/lib/apt/lists/* \
5052
&& apt-get clean all
5153

5254
# Prepare a dir (accessible by anyone)
53-
RUN mkdir --mode 777 /opt/umf/
55+
RUN mkdir -p --mode 777 /opt/umf/
5456

5557
# Additional dependencies (installed via pip)
5658
COPY third_party/requirements.txt /opt/umf/requirements.txt
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Copyright (C) 2025 Intel Corporation
2+
# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
3+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4+
5+
#
6+
# Dockerfile - a 'recipe' for Docker to build an image of ubuntu-based
7+
# environment for building the Unified Memory Framework project.
8+
#
9+
10+
# Pull base image ("24.04")
11+
FROM registry.hub.docker.com/library/ubuntu@sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782
12+
13+
# Set environment variables
14+
ENV OS ubuntu
15+
ENV OS_VER 24.04
16+
ENV NOTTY 1
17+
ENV DEBIAN_FRONTEND noninteractive
18+
19+
# Base development packages
20+
ARG BASE_DEPS="\
21+
build-essential \
22+
cmake \
23+
git"
24+
25+
# UMF's dependencies
26+
ARG UMF_DEPS="\
27+
libhwloc-dev"
28+
29+
# Dependencies for tests (optional)
30+
ARG TEST_DEPS="\
31+
libnuma-dev \
32+
libtbb-dev\
33+
valgrind"
34+
35+
# Miscellaneous for our builds/CI (optional)
36+
ARG MISC_DEPS="\
37+
automake \
38+
clang \
39+
python3-pip \
40+
sudo \
41+
whois \
42+
lcov"
43+
44+
# Update and install required packages
45+
RUN apt-get update \
46+
&& apt-get install -y --no-install-recommends \
47+
${BASE_DEPS} \
48+
${TEST_DEPS} \
49+
${MISC_DEPS} \
50+
${UMF_DEPS} \
51+
&& rm -rf /var/lib/apt/lists/* \
52+
&& apt-get clean all
53+
54+
# Prepare a dir (accessible by anyone)
55+
RUN mkdir -p --mode 777 /opt/umf/
56+
57+
# Additional dependencies (installed via pip)
58+
COPY third_party/requirements.txt /opt/umf/requirements.txt
59+
RUN pip3 install --no-cache-dir --break-system-packages -r /opt/umf/requirements.txt
60+
61+
# Add a new (non-root) 'test_user'
62+
ENV USER test_user
63+
ENV USERPASS pass
64+
RUN useradd -m "${USER}" -g sudo -p "$(mkpasswd ${USERPASS})"
65+
USER test_user

.github/workflows/pr_push.yml

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,67 @@ concurrency:
1414

1515
permissions:
1616
contents: read
17+
packages: read
1718

1819
jobs:
1920
CodeChecks:
2021
uses: ./.github/workflows/reusable_checks.yml
22+
DocsBuild:
23+
uses: ./.github/workflows/reusable_docs_build.yml
24+
DetectChanges:
25+
runs-on: ubuntu-latest
26+
outputs:
27+
changed_files: ${{ steps.changed-files.outputs.all_changed_files }}
28+
steps:
29+
- name: Checkout code
30+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
31+
with:
32+
fetch-depth: 0
33+
34+
- name: Get changed files
35+
id: changed-files
36+
uses: tj-actions/changed-files@v45.0.3
37+
38+
- name: List all changed files
39+
env:
40+
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
41+
run: |
42+
echo "Changed files: ${{ steps.changed-files.outputs.all_changed_files }}"
43+
BuildDockers:
44+
if: ${{ contains(join(needs.DetectChanges.outputs.changed_files, ' '), '.github/docker/') }}
45+
needs: [DetectChanges]
46+
permissions:
47+
contents: read
48+
packages: write
49+
secrets: inherit
50+
uses: ./.github/workflows/reusable_dockers_build.yml
2151
FastBuild:
22-
name: Fast builds
23-
needs: [CodeChecks]
52+
if: always() && (needs.BuildDockers.result == 'skipped' || needs.BuildDockers.result == 'success')
53+
needs: [CodeChecks, DocsBuild, BuildDockers]
2454
uses: ./.github/workflows/reusable_fast.yml
2555
Build:
2656
name: Basic builds
57+
if: always() && (needs.FastBuild.result == 'success')
2758
needs: [FastBuild]
2859
uses: ./.github/workflows/reusable_basic.yml
2960
DevDax:
61+
if: always() && (needs.FastBuild.result == 'success')
3062
needs: [FastBuild]
3163
uses: ./.github/workflows/reusable_dax.yml
3264
MultiNuma:
65+
if: always() && (needs.FastBuild.result == 'success')
3366
needs: [FastBuild]
3467
uses: ./.github/workflows/reusable_multi_numa.yml
3568
L0:
69+
if: always() && (needs.Build.result == 'success')
3670
needs: [Build]
3771
uses: ./.github/workflows/reusable_gpu.yml
3872
with:
3973
provider: "LEVEL_ZERO"
4074
runner: "L0"
4175
shared_lib: "['ON']"
4276
L0-BMG:
77+
if: always() && (needs.Build.result == 'success')
4378
needs: [Build]
4479
uses: ./.github/workflows/reusable_gpu.yml
4580
with:
@@ -48,24 +83,29 @@ jobs:
4883
shared_lib: "['ON']"
4984
os: "['Ubuntu']"
5085
CUDA:
86+
if: always() && (needs.Build.result == 'success')
5187
needs: [Build]
5288
uses: ./.github/workflows/reusable_gpu.yml
5389
with:
5490
provider: "CUDA"
5591
runner: "CUDA"
5692
shared_lib: "['ON']"
5793
Sanitizers:
94+
if: always() && (needs.FastBuild.result == 'success')
5895
needs: [FastBuild]
5996
uses: ./.github/workflows/reusable_sanitizers.yml
6097
QEMU:
98+
if: always() && (needs.FastBuild.result == 'success')
6199
needs: [FastBuild]
62100
uses: ./.github/workflows/reusable_qemu.yml
63101
with:
64102
short_run: true
65103
ProxyLib:
104+
if: always() && (needs.Build.result == 'success')
66105
needs: [Build]
67106
uses: ./.github/workflows/reusable_proxy_lib.yml
68107
Valgrind:
108+
if: always() && (needs.Build.result == 'success')
69109
needs: [Build]
70110
uses: ./.github/workflows/reusable_valgrind.yml
71111
Coverage:
@@ -78,22 +118,25 @@ jobs:
78118
trigger: "${{github.event_name}}"
79119
Coverage_partial:
80120
# partial coverage (on forks)
81-
if: github.repository != 'oneapi-src/unified-memory-framework'
121+
if: github.repository != 'oneapi-src/unified-memory-framework' && always() && (needs.Build.result == 'success')
82122
needs: [Build, QEMU, ProxyLib]
83123
uses: ./.github/workflows/reusable_coverage.yml
84124
CodeQL:
125+
if: always() && (needs.Build.result == 'success')
85126
needs: [Build]
86127
permissions:
87128
contents: read
88129
security-events: write
89130
uses: ./.github/workflows/reusable_codeql.yml
90131
Trivy:
132+
if: always() && (needs.Build.result == 'success')
91133
needs: [Build]
92134
permissions:
93135
contents: read
94136
security-events: write
95137
uses: ./.github/workflows/reusable_trivy.yml
96138
Compatibility:
139+
if: always() && (needs.Build.result == 'success')
97140
needs: [Build]
98141
uses: ./.github/workflows/reusable_compatibility.yml
99142
strategy:

0 commit comments

Comments
 (0)