Skip to content
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

Adding safe folder to allow CI to compile DAGMC #816

Merged
merged 16 commits into from Aug 18, 2022
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 14 additions & 8 deletions .github/workflows/docker_publish.yml
Expand Up @@ -8,7 +8,7 @@ on:
- 'CI/?ocker**'
- '.github/workflows/docker_publish.yml'


jobs:
build-base-img:
runs-on: ubuntu-latest
Expand All @@ -22,7 +22,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Build and push Dockerfile_1_housekeeping
uses: docker/build-push-action@v2
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Build and push Dockerfile_1_external_deps
uses: docker/build-push-action@v2
Expand Down Expand Up @@ -163,7 +163,7 @@ jobs:
1.10.4,
]
moab_versions : [
5.3.0,
5.4.0,
develop,
master,
]
Expand All @@ -182,7 +182,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Build and push Dockerfile_3_moab
uses: docker/build-push-action@v2
Expand Down Expand Up @@ -215,12 +215,13 @@ jobs:
name: Running Housekeeping scrips
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: recursive

- name: Setup
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
mkdir /root/build_dir/
echo "REPO_SLUG=${GITHUB_REPOSITORY}" >> $GITHUB_ENV
echo "PULL_REQUEST=$(echo $GITHUB_REF | cut -d"/" -f3)" >> $GITHUB_ENV
Expand Down Expand Up @@ -261,12 +262,17 @@ jobs:
name: Installing and Testing DAGMC
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: recursive

- name: Setup
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
git config --global --add safe.directory /github/home/
git config --global --add safe.directory /github/home/.cache
git config --global --add safe.directory /github/home/.cache/pip
git config --global --add safe.directory /github/home/.cache/pip/http
echo "MOAB_VERSION=${{ matrix.moab_versions }}" >> $GITHUB_ENV
echo "COMPILER=${{ matrix.compiler }}" >> $GITHUB_ENV
echo "HDF5_VERSION=${{ matrix.hdf5_versions }}" >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/housekeeping.yml
Expand Up @@ -14,7 +14,7 @@ jobs:
image: ghcr.io/svalinn/dagmc-ci-ubuntu-18.04-housekeeping:stable
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup environment
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux_build_test.yml
Expand Up @@ -58,7 +58,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: recursive

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mac_build_test.yml
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: macos-10.15

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Initial setup
shell: bash -l {0}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows_build_test.yml
Expand Up @@ -63,7 +63,7 @@ jobs:
cmake --build . --config Release
cmake --install . --config Release

- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: build DAGMC
shell: bash -l {0}
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
@@ -1,3 +1,3 @@
[submodule "src/pyne/pyne"]
path = src/pyne/pyne
url = https://github.com/pyne/pyne
url = https://github.com/pyne/pyne.git
2 changes: 2 additions & 0 deletions CI/Dockerfile
Expand Up @@ -80,6 +80,8 @@ RUN /root/etc/CI/docker/build_hdf5.sh

FROM hdf5 AS moab

ENV PYTHONPATH=/root/build_dir/moab/bld/pymoab/lib/python3.6/site-packages
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes me wonder if we are installing MOAB in the wrong place? Or not installing it at all? Or we are installing it in the right place and we should reference that place here instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could add a python import command to the dockerfile to see if it is found by python if that helps check it it was installed

python -c "import pymoab"

Copy link
Member

@bam241 bam241 Aug 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem does not come from us.
It comes from Moab.
when they build and install pymoab they install it locally with pip -e for testing purposes
The problem is this is prevented because /root/build_dir/moab/bld/pymoab/lib/python3.6/site-packages is not in our PYTHONPATH

see:
here in pymoab CMakelist.txt

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm… maybe the problem is that line 91 in the pymoab CMake is commented out?!?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like @pshriwise commented this out in 2018 🤣

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow that survived a long time


# Set MOAB env variable
ENV moab_build_dir=${build_dir}/moab
ENV moab_install_dir=${install_dir}/moab
Expand Down
1 change: 1 addition & 0 deletions doc/CHANGELOG.rst
Expand Up @@ -10,6 +10,7 @@ Next version
**Changed:**

* Using multi stage Dockerfile to reduce the number of Dockerfile (#813)
* Adding safe folder to allow CI to compile DAGMC (#814)
* Correction to CMake variable name in OpenMC install instructions (#817)


Expand Down