-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker workflow #1105
base: main
Are you sure you want to change the base?
Docker workflow #1105
Conversation
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
d1700d4
to
527baa9
Compare
@@ -29,7 +29,10 @@ ARG UMF_DEPS="\ | |||
|
|||
# Dependencies for tests (optional) | |||
ARG TEST_DEPS="\ | |||
libnuma-dev" | |||
libnuma-dev \ | |||
libhwloc-dev \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libhwloc and libtbb are already included in UMF_DEPS
- in all Dockerfiles
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you have right, I will remove it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
heh, nope - you should not remove the UMF_DEPS
. These ARGs are not only to list all dependencies, this is also to show which ones are required for using the library, and which are required e.g. for testing.
I believe tbb is not required to compile UMF, but it's required for tests. hwloc is required for UMF, so could be removed from test deps.
Okay that's said - there's another issue that's connected.
libhwloc-dev should be installed only on newer Ubuntu, here on Ubuntu-20.04 we should not install it and only install it via our script.
So in this OS, pls move HWLOC_DEPS up, add no UMF_DEPS, but please make a comment that hwloc is required as UMF dependency.
On other OSes, please remove the hwloc script and HWLOC_DEPS, and use UMF_DEPS equal to libhwloc-dev.
contents: read | ||
|
||
jobs: | ||
build-ci-container: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this job shall be limited to upstream only:
if: github.repository == 'oneapi-src/unified-memory-framework'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure for that. As we were talking, I left it untouched
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you try and add that, pls? I think it should work just fine; at least we should test it.
Of course as long as you're testing you can omit adding it 😉
.github/workflows/reusable_basic.yml
Outdated
image: ${{ matrix.image }} | ||
options: --user root --privileged | ||
volumes: | ||
- /home/runner/work/unified-memory-framework/unified-memory-framework:/home/runner/work/unified-memory-framework/unified-memory-framework |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can ${{github.workspace}}
be used in case it differs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, i replaced it
.github/workflows/reusable_fast.yml
Outdated
${{matrix.extra_build_options}} | ||
|
||
- name: Build | ||
run: cmake --build ${{env.BUILD_DIR}} --config Release -j |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-j $(nproc)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
.github/workflows/reusable_fast.yml
Outdated
strategy: | ||
matrix: | ||
include: | ||
- os: windows-latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this var as there is only one OS tested
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
.github/workflows/reusable_fast.yml
Outdated
@@ -91,6 +134,7 @@ jobs: | |||
-DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CMAKE_INSTALL_PREFIX
not used, remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also left it because it wouldn't work without it https://github.com/rbanka1/unified-memory-framework/actions/runs/13549985319/job/37871871137
@@ -29,7 +29,10 @@ ARG UMF_DEPS="\ | |||
|
|||
# Dependencies for tests (optional) | |||
ARG TEST_DEPS="\ | |||
libnuma-dev" | |||
libnuma-dev \ | |||
libhwloc-dev \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
heh, nope - you should not remove the UMF_DEPS
. These ARGs are not only to list all dependencies, this is also to show which ones are required for using the library, and which are required e.g. for testing.
I believe tbb is not required to compile UMF, but it's required for tests. hwloc is required for UMF, so could be removed from test deps.
Okay that's said - there's another issue that's connected.
libhwloc-dev should be installed only on newer Ubuntu, here on Ubuntu-20.04 we should not install it and only install it via our script.
So in this OS, pls move HWLOC_DEPS up, add no UMF_DEPS, but please make a comment that hwloc is required as UMF dependency.
On other OSes, please remove the hwloc script and HWLOC_DEPS, and use UMF_DEPS equal to libhwloc-dev.
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} | ||
run: | | ||
echo "Changed files: ${{ steps.changed-files.outputs.all_changed_files }}" | ||
BuildDockers: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls verify if detectChanges works properly when we merge a PR - pls test scenarios when you merged PR with and without any docker changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm tbh I'm not sure what has been tested here...? these were not a "test PRs" being merged into main, right? I was thinking - you push your new workflow (with building docker) into your main, then open 2 PRs on your fork and see if they are working properly (on PR). Later, test if after merging they are still working properly.
// for testing purpose I feel like you have to use different actor and set token in secrets
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} | ||
run: | | ||
echo "Changed files: ${{ steps.changed-files.outputs.all_changed_files }}" | ||
BuildDockers: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm tbh I'm not sure what has been tested here...? these were not a "test PRs" being merged into main, right? I was thinking - you push your new workflow (with building docker) into your main, then open 2 PRs on your fork and see if they are working properly (on PR). Later, test if after merging they are still working properly.
// for testing purpose I feel like you have to use different actor and set token in secrets
- name: Install g++-7 | ||
if: matrix.compiler.cxx == 'g++-7' | ||
run: sudo apt-get install -y ${{matrix.compiler.cxx}} | ||
|
||
- name: Install libhwloc | ||
run: .github/scripts/install_hwloc.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this step shouldn't be here - it's already covered in docker
@@ -181,11 +168,11 @@ jobs: | |||
${{ matrix.compiler.cxx == 'icpx' && '. /opt/intel/oneapi/setvars.sh' || true }} | |||
LD_LIBRARY_PATH="${{env.BUILD_DIR}}/lib/:${LD_LIBRARY_PATH}" ctest --output-on-failure | |||
|
|||
- name: Check coverage | |||
- name: Check os coverage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this change in name?
with: | ||
registry: ghcr.io | ||
username: bb-ur | ||
password: ${{ secrets.BB_GHCR_TOKEN }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sooo, I just realized - this job won't work on PR, as there's no access to secrets. So, if I'm changing anything in the docker there's no way it's going to pass...
please propose some solution, as this will be a blocker (GHA cache? connecting docker building with Basic/Fast jobs execution...? something else...?)
if: ${{ matrix.build_type == 'Debug' && matrix.compiler.c == 'gcc' }} | ||
working-directory: ${{env.BUILD_DIR}} | ||
run: | | ||
export COVERAGE_FILE_NAME=${{env.COVERAGE_NAME}}-${{matrix.os}}-shared-${{matrix.shared_library}}-no_hwloc-${{matrix.disable_hwloc}} | ||
export COVERAGE_FILE_NAME=${{env.COVERAGE_NAME}}-${{matrix.ubuntu_ver}}-shared-${{matrix.shared_library}}-no_hwloc-${{matrix.disable_hwloc}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, that's not good - the name of the artifact will be cov-22.04-shared...
- we should definitely keep the old name with "ubuntu" in it - as we may have more OSes than just ubuntu - perhaps you should use the var as before os
instead of ubuntu_ver
-- so basically turn back what it was in matrix - os: ['ubuntu-20.04', 'ubuntu-22.04']
For unity, the same approach in FastBuilds - os: ['ubuntu-20.04', 'ubuntu-22.04']
instead of ubuntu_ver: <number>
ARG UMF_DEPS="\ | ||
libhwloc-dev \ | ||
libtbb-dev" | ||
# libhwloc-dev is required |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this comment should be a little more verbose - saying that it's installed here via script, as the hwloc version is too old on this OS
and please move HWLOC_DEPS
and # Copy hwloc
here, above.
@@ -111,45 +118,25 @@ jobs: | |||
install_tbb: 'ON' | |||
disable_hwloc: 'OFF' | |||
link_hwloc_statically: 'ON' | |||
runs-on: ${{matrix.os}} | |||
|
|||
steps: | |||
- name: Checkout | |||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |||
with: | |||
fetch-depth: 0 | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still missing tbb removal for matrix.install_tbb == 'OFF'
Add Docker workflow
changes:
Checklist