Skip to content

Commit 25d9501

Browse files
committed
corrections
1 parent 527baa9 commit 25d9501

File tree

7 files changed

+128
-129
lines changed

7 files changed

+128
-129
lines changed

.github/docker/ubuntu-20.04.Dockerfile

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ ARG UMF_DEPS="\
2929

3030
# Dependencies for tests (optional)
3131
ARG TEST_DEPS="\
32-
libnuma-dev"
32+
libnuma-dev \
33+
libhwloc-dev \
34+
libtbb-dev\
35+
valgrind"
3336

3437
# Miscellaneous for our builds/CI (optional)
3538
ARG MISC_DEPS="\
@@ -38,7 +41,16 @@ ARG MISC_DEPS="\
3841
g++-7 \
3942
python3-pip \
4043
sudo \
41-
whois"
44+
whois \
45+
lcov"
46+
47+
# Hwloc installation dependencies
48+
ARG HWLOC_DEPS="\
49+
dos2unix \
50+
libtool"
51+
52+
# Copy hwloc
53+
COPY .github/scripts/install_hwloc.sh /opt/umf/install_hwloc.sh
4254

4355
# Update and install required packages
4456
RUN apt-get update \
@@ -47,34 +59,21 @@ RUN apt-get update \
4759
${UMF_DEPS} \
4860
${TEST_DEPS} \
4961
${MISC_DEPS} \
62+
${HWLOC_DEPS} \
63+
&& dos2unix /opt/umf/install_hwloc.sh \
64+
&& bash -x /opt/umf/install_hwloc.sh \
65+
&& ldconfig \
5066
&& rm -rf /var/lib/apt/lists/* \
5167
&& apt-get clean all
5268

53-
# Install hwloc
54-
COPY .github/scripts/install_hwloc.sh /opt/umf/install_hwloc.sh
55-
RUN apt-get update \
56-
&& apt-get install -y dos2unix libtool \
57-
&& dos2unix /opt/umf/install_hwloc.sh \
58-
&& bash -x /opt/umf/install_hwloc.sh \
59-
&& ldconfig \
60-
&& rm -f /opt/umf/install_hwloc.sh
61-
62-
# Install valgrind
63-
RUN apt-get update && \
64-
apt-get install -y valgrind cmake hwloc libhwloc-dev libnuma-dev libtbb-dev
65-
66-
# Install lcov
67-
RUN apt-get update && \
68-
apt-get install lcov -y
69-
7069
# Prepare a dir (accessible by anyone)
7170
RUN mkdir -p --mode 777 /opt/umf/
7271

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

77-
# Add a new (non-root) 'test_user'
7877
ENV USER test_user
7978
ENV USERPASS pass
8079
RUN useradd -m "${USER}" -g sudo -p "$(mkpasswd ${USERPASS})"

.github/docker/ubuntu-22.04.Dockerfile

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ FROM registry.hub.docker.com/library/ubuntu@sha256:e6173d4dc55e76b87c4af8db8821b
1212

1313
# Set environment variables
1414
ENV OS ubuntu
15-
ENV OS_VER 22.04
15+
ENV OS_VER 20.04
1616
ENV NOTTY 1
1717
ENV DEBIAN_FRONTEND noninteractive
1818

@@ -29,15 +29,28 @@ ARG UMF_DEPS="\
2929

3030
# Dependencies for tests (optional)
3131
ARG TEST_DEPS="\
32-
libnuma-dev"
32+
libnuma-dev \
33+
libhwloc-dev \
34+
libtbb-dev\
35+
valgrind"
3336

3437
# Miscellaneous for our builds/CI (optional)
3538
ARG MISC_DEPS="\
3639
automake \
3740
clang \
41+
g++-11 \
3842
python3-pip \
3943
sudo \
40-
whois"
44+
whois \
45+
lcov"
46+
47+
# Hwloc installation dependencies
48+
ARG HWLOC_DEPS="\
49+
dos2unix \
50+
libtool"
51+
52+
# Copy hwloc
53+
COPY .github/scripts/install_hwloc.sh /opt/umf/install_hwloc.sh
4154

4255
# Update and install required packages
4356
RUN apt-get update \
@@ -46,26 +59,13 @@ RUN apt-get update \
4659
${UMF_DEPS} \
4760
${TEST_DEPS} \
4861
${MISC_DEPS} \
62+
${HWLOC_DEPS} \
63+
&& dos2unix /opt/umf/install_hwloc.sh \
64+
&& bash -x /opt/umf/install_hwloc.sh \
65+
&& ldconfig \
4966
&& rm -rf /var/lib/apt/lists/* \
5067
&& apt-get clean all
5168

52-
# Install hwloc
53-
COPY .github/scripts/install_hwloc.sh /opt/umf/install_hwloc.sh
54-
RUN apt-get update \
55-
&& apt-get install -y dos2unix libtool \
56-
&& dos2unix /opt/umf/install_hwloc.sh \
57-
&& bash -x /opt/umf/install_hwloc.sh \
58-
&& ldconfig \
59-
&& rm -f /opt/umf/install_hwloc.sh
60-
61-
# Install valgrind
62-
RUN apt-get update && \
63-
apt-get install -y valgrind cmake hwloc libhwloc-dev libnuma-dev libtbb-dev
64-
65-
# Install lcov
66-
RUN apt-get update && \
67-
apt-get install lcov -y
68-
6969
# Prepare a dir (accessible by anyone)
7070
RUN mkdir -p --mode 777 /opt/umf/
7171

.github/docker/ubuntu-24.04.Dockerfile

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ FROM registry.hub.docker.com/library/ubuntu@sha256:72297848456d5d37d1262630108ab
1212

1313
# Set environment variables
1414
ENV OS ubuntu
15-
ENV OS_VER 24.04
15+
ENV OS_VER 20.04
1616
ENV NOTTY 1
1717
ENV DEBIAN_FRONTEND noninteractive
1818

@@ -29,15 +29,28 @@ ARG UMF_DEPS="\
2929

3030
# Dependencies for tests (optional)
3131
ARG TEST_DEPS="\
32-
libnuma-dev"
32+
libnuma-dev \
33+
libhwloc-dev \
34+
libtbb-dev\
35+
valgrind"
3336

3437
# Miscellaneous for our builds/CI (optional)
3538
ARG MISC_DEPS="\
3639
automake \
3740
clang \
41+
g++-11 \
3842
python3-pip \
3943
sudo \
40-
whois"
44+
whois \
45+
lcov"
46+
47+
# Hwloc installation dependencies
48+
ARG HWLOC_DEPS="\
49+
dos2unix \
50+
libtool"
51+
52+
# Copy hwloc
53+
COPY .github/scripts/install_hwloc.sh /opt/umf/install_hwloc.sh
4154

4255
# Update and install required packages
4356
RUN apt-get update \
@@ -46,34 +59,21 @@ RUN apt-get update \
4659
${UMF_DEPS} \
4760
${TEST_DEPS} \
4861
${MISC_DEPS} \
62+
${HWLOC_DEPS} \
63+
&& dos2unix /opt/umf/install_hwloc.sh \
64+
&& bash -x /opt/umf/install_hwloc.sh \
65+
&& ldconfig \
4966
&& rm -rf /var/lib/apt/lists/* \
5067
&& apt-get clean all
5168

52-
# Install hwloc
53-
COPY .github/scripts/install_hwloc.sh /opt/umf/install_hwloc.sh
54-
RUN apt-get update \
55-
&& apt-get install -y dos2unix libtool \
56-
&& dos2unix /opt/umf/install_hwloc.sh \
57-
&& bash -x /opt/umf/install_hwloc.sh \
58-
&& ldconfig \
59-
&& rm -f /opt/umf/install_hwloc.sh
60-
61-
# Install valgrind
62-
RUN apt-get update && \
63-
apt-get install -y valgrind clang cmake hwloc libhwloc-dev libnuma-dev libtbb-dev
64-
65-
# Install lcov
66-
RUN apt-get update && \
67-
apt-get install lcov -y
68-
6969
# Prepare a dir (accessible by anyone)
7070
RUN mkdir -p --mode 777 /opt/umf/
7171

7272
# Additional dependencies (installed via pip)
7373
COPY third_party/requirements.txt /opt/umf/requirements.txt
7474
RUN pip3 install --no-cache-dir --break-system-packages -r /opt/umf/requirements.txt
7575

76-
# Add a new (non-root) 'test_user'
76+
# Add a new (non-root) 'test_user'
7777
ENV USER test_user
7878
ENV USERPASS pass
7979
RUN useradd -m "${USER}" -g sudo -p "$(mkpasswd ${USERPASS})"

.github/workflows/build_ci_container.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
name: BuildCIContainer
1+
# Build and push Docker images to GHCR
2+
name: BuildDockers
23

34
on:
45
workflow_call:
@@ -17,7 +18,8 @@ jobs:
1718
outputs:
1819
status: ${{ job.status }}
1920
env:
20-
GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }}
21+
GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }}
22+
IMG: ghcr.io/${{ github.actor }}/umf-ubuntu-${{ matrix.ubuntu-version }}:latest
2123

2224
steps:
2325
- name: Checkout repository
@@ -26,13 +28,13 @@ jobs:
2628
fetch-depth: 0
2729

2830
- name: Login to GitHub Container Registry
29-
uses: docker/login-action@v3
31+
uses: docker/login-action@30f019fb76bb54d03ec1e716054622be511a13b2 # v3.2.0
3032
with:
3133
registry: ghcr.io
32-
username: ${{ github.actor }}
34+
username: ${{ github.actor }} # ${{ sys_bb-umf }}
3335
password: ${{ env.GHCR_TOKEN }}
3436

3537
- name: Build and push ubuntu-${{ matrix.ubuntu-version }} Docker image
3638
run: |
37-
docker build -f .github/docker/ubuntu-${{ matrix.ubuntu-version }}.Dockerfile -t ghcr.io/${{ github.actor }}/umf2-ubuntu-${{ matrix.ubuntu-version }}:latest .
38-
docker push ghcr.io/${{ github.actor }}/umf2-ubuntu-${{ matrix.ubuntu-version }}:latest
39+
docker build -f .github/docker/ubuntu-${{ matrix.ubuntu-version }}.Dockerfile -t ${{ env.IMG }} .
40+
docker push ${{ env.IMG }}

.github/workflows/pr_push.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ concurrency:
1414

1515
permissions:
1616
contents: read
17-
packages: write
17+
packages: read
1818

1919
jobs:
2020
CodeChecks:
2121
uses: ./.github/workflows/reusable_checks.yml
2222
DocsBuild:
2323
uses: ./.github/workflows/reusable_docs_build.yml
24-
PrintModifiedFiles:
24+
DetectChanges:
2525
runs-on: ubuntu-latest
2626
outputs:
2727
changed_files: ${{ steps.changed-files.outputs.all_changed_files }}
@@ -40,14 +40,17 @@ jobs:
4040
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
4141
run: |
4242
echo "Changed files: ${{ steps.changed-files.outputs.all_changed_files }}"
43-
BuildCIContainer:
44-
if: ${{ contains(join(needs.PrintModifiedFiles.outputs.changed_files, ' '), '.github/docker/') }}
45-
needs: [PrintModifiedFiles]
43+
BuildDockers:
44+
if: ${{ contains(join(needs.DetectChanges.outputs.changed_files, ' '), '.github/docker/') }}
45+
needs: [DetectChanges]
46+
permissions:
47+
contents: read
48+
packages: write
4649
secrets: inherit
4750
uses: ./.github/workflows/build_ci_container.yml
4851
FastBuild:
49-
if: always() && (needs.BuildCIContainer.result == 'skipped' || needs.BuildCIContainer.result == 'success')
50-
needs: [CodeChecks, DocsBuild, BuildCIContainer]
52+
if: always() && (needs.BuildDockers.result == 'skipped' || needs.BuildDockers.result == 'success')
53+
needs: [CodeChecks, DocsBuild, BuildDockers]
5154
uses: ./.github/workflows/reusable_fast.yml
5255
Build:
5356
name: Basic builds

0 commit comments

Comments
 (0)