svalinn / DAGMC

Direct Accelerated Geometry Monte Carlo Toolkit
https://svalinn.github.io/DAGMC
Other
96 stars 63 forks source link

Adding safe folder to allow CI to compile DAGMC #816

Closed shimwell closed 2 years ago

shimwell commented 2 years ago

Description

Attempt to fix the CI that builds and publishes the docker images

Motivation and Context

Why is this change required? What problem does it solve? The latest action to publish the docker image failed with this error message

CMake Warning at CMakeLists.txt:27 (message):
-- Submodule update
  Could not determine the commit SHA for DAGMC.
fatal: unsafe repository ('/__w/DAGMC/DAGMC' is owned by someone else)
To add an exception for this directory, call:
    git config --global --add safe.directory /__w/DAGMC/DAGMC
CMake Error at CMakeLists.txt:38 (message):
  git submodule update --init --recursive failed with 128, please checkout
  submodules
-- Configuring incomplete, errors occurred!
See also "/root/build_dir/DAGMC-static/bld/CMakeFiles/CMakeOutput.log".

https://github.com/svalinn/DAGMC/actions/runs/2637740871

This PR adds the folder to the safe directory folders

Changes

bug fix

Behavior

What is the current behavior? What is the new behavior? broken CI - hopefully a fixed CI (I can't be sure as file owership issues in the CI can't be fully reproduced)

gonuke commented 2 years ago

Judging from the action logs in your account, I don't think this works. I think it needs to be added with a git command as in changelog_test.yml

shimwell commented 2 years ago

Judging from the action logs in your account, I don't think this works. I think it needs to be added with a git command as in changelog_test.yml

Rerunning the docker build CI on my fork https://github.com/shimwell/DAGMC/actions/runs/2672087279

shimwell commented 2 years ago

Looks like there is another error while compiling moab in the docker file.

error: bad install directory or PYTHONPATH
bam241 commented 2 years ago

I think the root problem occurred before:

[ 55%] Building CXX object test/CMakeFiles/file_options_test.dir/__/src/FileOptions.cpp.o
[1479](https://github.com/shimwell/DAGMC/runs/7348179098?check_suite_focus=true#step:5:1480)
The directory '/github/home/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
[1480](https://github.com/shimwell/DAGMC/runs/7348179098?check_suite_focus=true#step:5:1481)
The directory '/github/home/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
[1481](https://github.com/shimwell/DAGMC/runs/7348179098?check_suite_focus=true#step:5:1482)
Obtaining file:///root/build_dir/moab/bld/pymoab

I think we need to declare as safe both the build dir and the install dir.

shimwell commented 2 years ago

Looks like the latest error is due to PyMoab being installed into a folder that is not in the PYTHONPATH and also the PYTHONPATH is empty :eyes:

https://github.com/shimwell/DAGMC/runs/7362738426?check_suite_focus=true

gonuke commented 2 years ago

I guess that didn't work - Maybe try the 5.3.2 release candidate now?

shimwell commented 2 years ago

Looks like adding the PYTHONPATH resulted in the dockerfiles building https://github.com/shimwell/DAGMC/actions/runs/2780302592

Nice work @bam241

gonuke commented 2 years ago

Thanks @shimwell - we'll go with this pending a future change in MOAB