-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changes: - created docker build and push workflow - created ubuntu 24.04 docker image - modified reuseable_fast and basic to work on docker image - modified pr/push to run build image when needed - added few installation to docker files
- Loading branch information
Showing
7 changed files
with
313 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Copyright (C) 2025 Intel Corporation | ||
# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
# | ||
# Dockerfile - a 'recipe' for Docker to build an image of ubuntu-based | ||
# environment for building the Unified Memory Framework project. | ||
# | ||
|
||
# Pull base image ("24.04") | ||
FROM registry.hub.docker.com/library/ubuntu@sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782 | ||
|
||
# Set environment variables | ||
ENV OS ubuntu | ||
ENV OS_VER 24.04 | ||
ENV NOTTY 1 | ||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
# Base development packages | ||
ARG BASE_DEPS="\ | ||
build-essential \ | ||
cmake \ | ||
git" | ||
|
||
# UMF's dependencies | ||
ARG UMF_DEPS="\ | ||
libhwloc-dev \ | ||
libtbb-dev" | ||
|
||
# Dependencies for tests (optional) | ||
ARG TEST_DEPS="\ | ||
libnuma-dev" | ||
|
||
# Miscellaneous for our builds/CI (optional) | ||
ARG MISC_DEPS="\ | ||
automake \ | ||
clang \ | ||
python3-pip \ | ||
sudo \ | ||
whois" | ||
|
||
# Update and install required packages | ||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
${BASE_DEPS} \ | ||
${UMF_DEPS} \ | ||
${TEST_DEPS} \ | ||
${MISC_DEPS} \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& apt-get clean all | ||
|
||
# Install hwloc | ||
COPY .github/scripts/install_hwloc.sh /opt/umf/install_hwloc.sh | ||
RUN apt-get update \ | ||
&& apt-get install -y dos2unix libtool \ | ||
&& dos2unix /opt/umf/install_hwloc.sh \ | ||
&& bash -x /opt/umf/install_hwloc.sh \ | ||
&& ldconfig \ | ||
&& rm -f /opt/umf/install_hwloc.sh | ||
|
||
# Install valgrind | ||
RUN apt-get update && \ | ||
apt-get install -y valgrind clang cmake hwloc libhwloc-dev libnuma-dev libtbb-dev | ||
|
||
# Install lcov | ||
RUN apt-get update && \ | ||
apt-get install lcov -y | ||
|
||
# Prepare a dir (accessible by anyone) | ||
RUN mkdir -p --mode 777 /opt/umf/ | ||
|
||
# Additional dependencies (installed via pip) | ||
COPY third_party/requirements.txt /opt/umf/requirements.txt | ||
RUN pip3 install --no-cache-dir --break-system-packages -r /opt/umf/requirements.txt | ||
|
||
# Add a new (non-root) 'test_user' | ||
ENV USER test_user | ||
ENV USERPASS pass | ||
RUN useradd -m "${USER}" -g sudo -p "$(mkpasswd ${USERPASS})" | ||
USER test_user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: BuildCIContainer | ||
|
||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
packages: write | ||
contents: read | ||
|
||
jobs: | ||
build-ci-container: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
ubuntu-version: [20.04, 22.04, 24.04] | ||
outputs: | ||
status: ${{ job.status }} | ||
env: | ||
GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }} | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ env.GHCR_TOKEN }} | ||
|
||
- name: Build and push ubuntu-${{ matrix.ubuntu-version }} Docker image | ||
run: | | ||
docker build -f .github/docker/ubuntu-${{ matrix.ubuntu-version }}.Dockerfile -t ghcr.io/${{ github.actor }}/umf2-ubuntu-${{ matrix.ubuntu-version }}:latest . | ||
docker push ghcr.io/${{ github.actor }}/umf2-ubuntu-${{ matrix.ubuntu-version }}:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,50 +14,84 @@ concurrency: | |
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
jobs: | ||
CodeChecks: | ||
uses: ./.github/workflows/reusable_checks.yml | ||
DocsBuild: | ||
uses: ./.github/workflows/reusable_docs_build.yml | ||
PrintModifiedFiles: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
changed_files: ${{ steps.changed-files.outputs.all_changed_files }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/[email protected] | ||
|
||
- name: List all changed files | ||
env: | ||
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} | ||
run: | | ||
echo "Changed files: ${{ steps.changed-files.outputs.all_changed_files }}" | ||
BuildCIContainer: | ||
if: ${{ contains(join(needs.PrintModifiedFiles.outputs.changed_files, ' '), '.github/docker/') }} | ||
needs: [PrintModifiedFiles] | ||
secrets: inherit | ||
uses: ./.github/workflows/build_ci_container.yml | ||
FastBuild: | ||
name: Fast builds | ||
needs: [CodeChecks, DocsBuild] | ||
if: always() && (needs.BuildCIContainer.result == 'skipped' || needs.BuildCIContainer.result == 'success') | ||
needs: [CodeChecks, DocsBuild, BuildCIContainer] | ||
uses: ./.github/workflows/reusable_fast.yml | ||
Build: | ||
name: Basic builds | ||
if: always() && (needs.FastBuild.result == 'success') | ||
needs: [FastBuild] | ||
uses: ./.github/workflows/reusable_basic.yml | ||
DevDax: | ||
if: always() && (needs.FastBuild.result == 'success') | ||
needs: [FastBuild] | ||
uses: ./.github/workflows/reusable_dax.yml | ||
MultiNuma: | ||
if: always() && (needs.FastBuild.result == 'success') | ||
needs: [FastBuild] | ||
uses: ./.github/workflows/reusable_multi_numa.yml | ||
L0: | ||
if: always() && (needs.Build.result == 'success') | ||
needs: [Build] | ||
uses: ./.github/workflows/reusable_gpu.yml | ||
with: | ||
name: "LEVEL_ZERO" | ||
shared_lib: "['ON']" | ||
CUDA: | ||
if: always() && (needs.Build.result == 'success') | ||
needs: [Build] | ||
uses: ./.github/workflows/reusable_gpu.yml | ||
with: | ||
name: "CUDA" | ||
shared_lib: "['ON']" | ||
Sanitizers: | ||
if: always() && (needs.FastBuild.result == 'success') | ||
needs: [FastBuild] | ||
uses: ./.github/workflows/reusable_sanitizers.yml | ||
QEMU: | ||
if: always() && (needs.FastBuild.result == 'success') | ||
needs: [FastBuild] | ||
uses: ./.github/workflows/reusable_qemu.yml | ||
with: | ||
short_run: true | ||
ProxyLib: | ||
if: always() && (needs.Build.result == 'success') | ||
needs: [Build] | ||
uses: ./.github/workflows/reusable_proxy_lib.yml | ||
Valgrind: | ||
if: always() && (needs.Build.result == 'success') | ||
needs: [Build] | ||
uses: ./.github/workflows/reusable_valgrind.yml | ||
Coverage: | ||
|
@@ -70,16 +104,18 @@ jobs: | |
trigger: "${{github.event_name}}" | ||
Coverage_partial: | ||
# partial coverage (on forks) | ||
if: github.repository != 'oneapi-src/unified-memory-framework' | ||
if: github.repository != 'oneapi-src/unified-memory-framework' && always() && (needs.Build.result == 'success') | ||
needs: [Build, QEMU, ProxyLib] | ||
uses: ./.github/workflows/reusable_coverage.yml | ||
CodeQL: | ||
if: always() && (needs.Build.result == 'success') | ||
needs: [Build] | ||
permissions: | ||
contents: read | ||
security-events: write | ||
uses: ./.github/workflows/reusable_codeql.yml | ||
Trivy: | ||
if: always() && (needs.Build.result == 'success') | ||
needs: [Build] | ||
permissions: | ||
contents: read | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.