Skip to content

Commit 3c7360d

Browse files
committed
corrections v2
1 parent 25d9501 commit 3c7360d

File tree

7 files changed

+51
-66
lines changed

7 files changed

+51
-66
lines changed

.github/docker/ubuntu-20.04.Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,10 @@ COPY .github/scripts/install_hwloc.sh /opt/umf/install_hwloc.sh
5656
RUN apt-get update \
5757
&& apt-get install -y --no-install-recommends \
5858
${BASE_DEPS} \
59-
${UMF_DEPS} \
6059
${TEST_DEPS} \
6160
${MISC_DEPS} \
6261
${HWLOC_DEPS} \
63-
&& dos2unix /opt/umf/install_hwloc.sh \
64-
&& bash -x /opt/umf/install_hwloc.sh \
62+
&& bash /opt/umf/install_hwloc.sh \
6563
&& ldconfig \
6664
&& rm -rf /var/lib/apt/lists/* \
6765
&& apt-get clean all
@@ -70,10 +68,11 @@ RUN apt-get update \
7068
RUN mkdir -p --mode 777 /opt/umf/
7169

7270
# Additional dependencies (installed via pip)
73-
COPY third_party/requirements.txt /opt/umf/requirements.txt
7471
# It's actively used and tested only on selected distros. Be aware
7572
# they may not work, because pip packages list differ from OS to OS.
73+
COPY third_party/requirements.txt /opt/umf/requirements.txt
7674

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

.github/docker/ubuntu-22.04.Dockerfile

Lines changed: 3 additions & 5 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 20.04
15+
ENV OS_VER 22.04
1616
ENV NOTTY 1
1717
ENV DEBIAN_FRONTEND noninteractive
1818

@@ -38,7 +38,7 @@ ARG TEST_DEPS="\
3838
ARG MISC_DEPS="\
3939
automake \
4040
clang \
41-
g++-11 \
41+
g++ \
4242
python3-pip \
4343
sudo \
4444
whois \
@@ -56,12 +56,10 @@ COPY .github/scripts/install_hwloc.sh /opt/umf/install_hwloc.sh
5656
RUN apt-get update \
5757
&& apt-get install -y --no-install-recommends \
5858
${BASE_DEPS} \
59-
${UMF_DEPS} \
6059
${TEST_DEPS} \
6160
${MISC_DEPS} \
6261
${HWLOC_DEPS} \
63-
&& dos2unix /opt/umf/install_hwloc.sh \
64-
&& bash -x /opt/umf/install_hwloc.sh \
62+
&& bash /opt/umf/install_hwloc.sh \
6563
&& ldconfig \
6664
&& rm -rf /var/lib/apt/lists/* \
6765
&& apt-get clean all

.github/docker/ubuntu-24.04.Dockerfile

Lines changed: 3 additions & 5 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 20.04
15+
ENV OS_VER 24.04
1616
ENV NOTTY 1
1717
ENV DEBIAN_FRONTEND noninteractive
1818

@@ -38,7 +38,7 @@ ARG TEST_DEPS="\
3838
ARG MISC_DEPS="\
3939
automake \
4040
clang \
41-
g++-11 \
41+
g++ \
4242
python3-pip \
4343
sudo \
4444
whois \
@@ -56,12 +56,10 @@ COPY .github/scripts/install_hwloc.sh /opt/umf/install_hwloc.sh
5656
RUN apt-get update \
5757
&& apt-get install -y --no-install-recommends \
5858
${BASE_DEPS} \
59-
${UMF_DEPS} \
6059
${TEST_DEPS} \
6160
${MISC_DEPS} \
6261
${HWLOC_DEPS} \
63-
&& dos2unix /opt/umf/install_hwloc.sh \
64-
&& bash -x /opt/umf/install_hwloc.sh \
62+
&& bash /opt/umf/install_hwloc.sh \
6563
&& ldconfig \
6664
&& rm -rf /var/lib/apt/lists/* \
6765
&& apt-get clean all

.github/workflows/build_ci_container.yml renamed to .github/workflows/build_dockers.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ permissions:
1010
contents: read
1111

1212
jobs:
13-
build-ci-container:
13+
build-dockers:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
1717
ubuntu-version: [20.04, 22.04, 24.04]
1818
outputs:
1919
status: ${{ job.status }}
2020
env:
21-
GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }}
21+
GHCR_TOKEN: ${{ secrets.BB_GHCR_TOKEN }} # ${{ secrets.GHCR_TOKEN }}
2222
IMG: ghcr.io/${{ github.actor }}/umf-ubuntu-${{ matrix.ubuntu-version }}:latest
2323

2424
steps:
@@ -31,8 +31,8 @@ jobs:
3131
uses: docker/login-action@30f019fb76bb54d03ec1e716054622be511a13b2 # v3.2.0
3232
with:
3333
registry: ghcr.io
34-
username: ${{ github.actor }} # ${{ sys_bb-umf }}
35-
password: ${{ env.GHCR_TOKEN }}
34+
username: ${{ github.bb-ur }} # ${{ github.actor }}
35+
password: ${{ env.BB_GHCR_TOKEN }} # ${{ env.GHCR_TOKEN }}
3636

3737
- name: Build and push ubuntu-${{ matrix.ubuntu-version }} Docker image
3838
run: |

.github/workflows/pr_push.yml

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,34 +23,45 @@ jobs:
2323
uses: ./.github/workflows/reusable_docs_build.yml
2424
DetectChanges:
2525
runs-on: ubuntu-latest
26-
outputs:
27-
changed_files: ${{ steps.changed-files.outputs.all_changed_files }}
26+
outputs:
27+
changed_files: ${{ steps.get-changes.outputs.all_changed_files }}
2828
steps:
2929
- name: Checkout code
3030
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3131
with:
32-
fetch-depth: 0
33-
34-
- name: Get changed files
35-
id: changed-files
36-
uses: tj-actions/[email protected]
32+
fetch-depth: 2
3733

3834
- name: List all changed files
39-
env:
40-
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
35+
id: get-changes
36+
run: |
37+
git diff --name-only HEAD^ HEAD > all_changed_files.txt
38+
changed_files=$(cat all_changed_files.txt | tr '\n' ' ')
39+
echo "changed_files=$changed_files" >> $GITHUB_ENV
40+
echo "::set-output name=all_changed_files::$changed_files"
41+
42+
- name: all changed files
4143
run: |
42-
echo "Changed files: ${{ steps.changed-files.outputs.all_changed_files }}"
44+
echo "changed files: ${{ needs.DetectChanges.outputs.changed_files }}"
45+
Check:
46+
runs-on: ubuntu-latest
47+
needs: [DetectChanges]
48+
steps:
49+
- name: check changed files
50+
run: |
51+
echo "all_changed_files: ${{ needs.DetectChanges.outputs.changed_files }}"
52+
echo "all_changed_files: ${{ contains(join(needs.DetectChanges.outputs.changed_files, ' '), '.github/docker/') }}"
53+
4354
BuildDockers:
4455
if: ${{ contains(join(needs.DetectChanges.outputs.changed_files, ' '), '.github/docker/') }}
4556
needs: [DetectChanges]
4657
permissions:
4758
contents: read
4859
packages: write
4960
secrets: inherit
50-
uses: ./.github/workflows/build_ci_container.yml
61+
uses: ./.github/workflows/build_dockers.yml
5162
FastBuild:
5263
if: always() && (needs.BuildDockers.result == 'skipped' || needs.BuildDockers.result == 'success')
53-
needs: [CodeChecks, DocsBuild, BuildDockers]
64+
needs: [ CodeChecks, DocsBuild, BuildDockers]
5465
uses: ./.github/workflows/reusable_fast.yml
5566
Build:
5667
name: Basic builds

.github/workflows/reusable_basic.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
image: ${{ matrix.image }}
2222
options: --user root --privileged
2323
volumes:
24-
- /home/runner/work/unified-memory-framework/unified-memory-framework:/home/runner/work/unified-memory-framework/unified-memory-framework
24+
- ${{ github.workspace }}:${{ github.workspace }}
2525
strategy:
2626
matrix:
2727
image: ['ghcr.io/rbanka1/umf-ubuntu-20.04:latest', 'ghcr.io/rbanka1/umf-ubuntu-22.04:latest' ]
@@ -133,15 +133,6 @@ jobs:
133133
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
134134
sudo apt-get update
135135
sudo apt-get install -y intel-oneapi-ippcp-devel intel-oneapi-ipp-devel intel-oneapi-common-oneapi-vars intel-oneapi-compiler-dpcpp-cpp
136-
137-
- name: Install TBB apt package
138-
if: matrix.install_tbb == 'OFF'
139-
run: |
140-
sudo apt-get install -y libtbb-dev
141-
142-
- name: Install g++-7
143-
if: matrix.compiler.cxx == 'g++-7'
144-
run: sudo apt-get install -y ${{matrix.compiler.cxx}}
145136
146137
- name: Install libhwloc
147138
run: .github/scripts/install_hwloc.sh
@@ -505,4 +496,4 @@ jobs:
505496
--build-type ${{env.BUILD_TYPE}}
506497
--proxy
507498
--umf-version ${{env.UMF_VERSION}}
508-
--shared-library
499+
--shared-library

.github/workflows/reusable_fast.yml

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,33 +14,30 @@ env:
1414
jobs:
1515
ubuntu-build:
1616
name: Linux
17-
runs-on: ubuntu-latest
17+
runs-on: ${{ github.repository_owner == 'oneapi-src' && 'intel-ubuntu-22.04' || 'ubuntu-22.04' }}
1818
container:
1919
image: ${{ matrix.image }}
2020
options: --user root --privileged
2121
volumes:
22-
- /home/runner/work/unified-memory-framework/unified-memory-framework:/home/runner/work/unified-memory-framework/unified-memory-framework
23-
24-
env:
25-
VCPKG_PATH: "${{github.workspace}}/build/vcpkg/packages/hwloc_x64-windows;${{github.workspace}}/build/vcpkg/packages/tbb_x64-windows;${{github.workspace}}/build/vcpkg/packages/jemalloc_x64-windows"
22+
- ${{ github.workspace }}:${{ github.workspace }}
2623
strategy:
2724
matrix:
2825
include:
2926
- image: ghcr.io/rbanka1/umf-ubuntu-22.04:latest
3027
build_tests: 'ON'
31-
extra_build_options: '-DCMAKE_BUILD_TYPE=Release -DUMF_BUILD_BENCHMARKS=ON -DUMF_BUILD_BENCHMARKS_MT=ON'
28+
extra_build_options: ' -DUMF_BUILD_BENCHMARKS=ON -DUMF_BUILD_BENCHMARKS_MT=ON'
3229
simple_cmake: 'OFF'
30+
# pure C build
3331
- image: ghcr.io/rbanka1/umf-ubuntu-22.04:latest
3432
build_tests: 'OFF'
35-
extra_build_options: '-DCMAKE_BUILD_TYPE=Release -DUMF_BUILD_BENCHMARKS=ON'
33+
extra_build_options: '-DUMF_BUILD_BENCHMARKS=ON'
3634
simple_cmake: 'OFF'
35+
# simplest CMake on ubuntu-latest
3736
- image: ghcr.io/rbanka1/umf-ubuntu-22.04:latest
3837
build_tests: 'ON'
39-
extra_build_options: '-DCMAKE_BUILD_TYPE=Release'
4038
simple_cmake: 'ON'
4139
- image: ghcr.io/rbanka1/umf-ubuntu-20.04:latest
4240
build_tests: 'ON'
43-
extra_build_options: '-DCMAKE_BUILD_TYPE=Release'
4441
simple_cmake: 'ON'
4542

4643
steps:
@@ -54,11 +51,9 @@ jobs:
5451
run: >
5552
cmake
5653
-B ${{env.BUILD_DIR}}
57-
-DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}"
58-
-DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}"
54+
-DCMAKE_BUILD_TYPE=Release
5955
-DUMF_FORMAT_CODE_STYLE=OFF
6056
-DUMF_DEVELOPER_MODE=ON
61-
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=${{matrix.disjoint}}
6257
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
6358
-DUMF_BUILD_TESTS=${{matrix.build_tests}}
6459
-DUMF_BUILD_EXAMPLES=ON
@@ -73,13 +68,12 @@ jobs:
7368
run: >
7469
cmake
7570
-B ${{env.BUILD_DIR}}
76-
-DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}"
7771
-DUMF_BUILD_SHARED_LIBRARY=ON
7872
-DUMF_TESTS_FAIL_ON_SKIP=ON
7973
${{matrix.extra_build_options}}
8074
8175
- name: Build
82-
run: cmake --build ${{env.BUILD_DIR}} --config Release -j
76+
run: cmake --build ${{env.BUILD_DIR}} --config Release -j $(nproc)
8377

8478
- name: Run examples
8579
working-directory: ${{env.BUILD_DIR}}
@@ -99,14 +93,12 @@ jobs:
9993
strategy:
10094
matrix:
10195
include:
102-
- os: windows-latest
103-
disjoint: 'OFF'
104-
build_tests: 'ON'
96+
- build_tests: 'ON'
10597
simple_cmake: 'OFF'
106-
- os: windows-latest
107-
disjoint: 'OFF'
108-
build_tests: 'OFF'
98+
- build_tests: 'OFF'
10999
simple_cmake: 'OFF'
100+
# - build_tests: 'OFF'
101+
# simple_cmake: 'ON'
110102

111103
steps:
112104
- name: Checkout repository
@@ -121,7 +113,7 @@ jobs:
121113
vcpkgDirectory: ${{env.BUILD_DIR}}/vcpkg
122114
vcpkgJsonGlob: '**/vcpkg.json'
123115

124-
- name: Install dependencies (windows-latest)
116+
- name: Install dependencies
125117
run: vcpkg install
126118
shell: pwsh
127119

@@ -134,15 +126,13 @@ jobs:
134126
-DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}"
135127
-DUMF_FORMAT_CODE_STYLE=OFF
136128
-DUMF_DEVELOPER_MODE=ON
137-
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=${{matrix.disjoint}}
138129
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
139130
-DUMF_BUILD_TESTS=${{matrix.build_tests}}
140131
-DUMF_BUILD_EXAMPLES=ON
141132
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
142133
-DUMF_BUILD_CUDA_PROVIDER=ON
143134
-DUMF_TESTS_FAIL_ON_SKIP=ON
144135
-DUMF_BUILD_SHARED_LIBRARY=ON
145-
${{matrix.extra_build_options}}
146136
147137
- name: Configure CMake (simple)
148138
if: matrix.simple_cmake == 'ON'
@@ -152,7 +142,6 @@ jobs:
152142
-DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}"
153143
-DUMF_BUILD_SHARED_LIBRARY=ON
154144
-DUMF_TESTS_FAIL_ON_SKIP=ON
155-
${{matrix.extra_build_options}}
156145
157146
- name: Build
158147
run: cmake --build ${{env.BUILD_DIR}} --config Release -j
@@ -170,7 +159,6 @@ jobs:
170159
# ref. https://superuser.com/questions/381276/what-are-some-nice-command-line-ways-to-inspect-dll-exe-details
171160

172161
- name: Print metadata of our dll's
173-
if: matrix.os == 'windows-latest'
174162
run: |
175163
get-command ${{github.workspace}}/build/bin/Release/umf.dll | format-list
176164
get-command ${{github.workspace}}/build/src/proxy_lib/Release/umf_proxy.dll | format-list

0 commit comments

Comments
 (0)