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

Streamline and simplify CI building #880

Merged
merged 33 commits into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
e888f32
started changes but found problems in images
gonuke Apr 30, 2023
3de7026
first thoughts on updating build
gonuke May 6, 2023
ecbc650
try simple test strategy
gonuke May 7, 2023
26254d7
dumb typo in stage name
gonuke May 8, 2023
89f5ab7
correct/add PR numbers
gonuke May 8, 2023
23f681a
Update Changelog for this PR
gonuke May 8, 2023
901d290
test tagging options
gonuke May 8, 2023
6932898
add step to retag final images on merge
gonuke Jul 20, 2023
3f221ea
fix workflow structure
gonuke Jul 20, 2023
398be8c
temporarily serialize moab build
gonuke Jul 20, 2023
18f13de
serialize the correct build!
gonuke Jul 20, 2023
eb50145
minor dockerfile tweak to force rebuild from scratch
gonuke Jul 21, 2023
9734b55
restore parallel moab build and constrain cython version
gonuke Jul 21, 2023
b57e445
try github.actor?
gonuke Jul 22, 2023
9c08669
allow package writing for github.actor?
gonuke Jul 22, 2023
1de8a71
revert to repo owner with public packages
gonuke Aug 5, 2023
0de1bb4
add a test using the std build/push
gonuke Aug 5, 2023
584f977
need to push
gonuke Aug 5, 2023
d56cd76
first test of CI build tests using new images
gonuke Aug 6, 2023
3961006
remove testing workflow
gonuke Aug 6, 2023
cfe32d5
minor formatting fix
gonuke Aug 7, 2023
f3de165
revert install order to avoid docker rebuild
gonuke Aug 13, 2023
1ca8cb6
remove unneeded env and print env for debugging
gonuke Aug 13, 2023
41618ec
fix badly named job
gonuke Aug 13, 2023
26d234a
update ubuntu versions
gonuke Aug 13, 2023
c238d5e
remove submodule checkout
gonuke Aug 13, 2023
f22c535
restore submodules
gonuke Aug 13, 2023
9ad1611
debug pwd
gonuke Aug 13, 2023
8d94528
fix directory ownership confusion
gonuke Aug 13, 2023
b75e6bf
run tests in the right place
gonuke Aug 13, 2023
14fab28
removing extra debugging shell output
gonuke Aug 13, 2023
7f48fbc
add PR number to Changelog
gonuke Aug 13, 2023
cac65e6
less parallel builds
gonuke Aug 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 24 additions & 22 deletions .github/workflows/linux_build_test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Linux Build/Test
name: Linux Build/Test for PR and collaborator push

on:
# allows us to run workflows manually
Expand Down Expand Up @@ -27,15 +27,12 @@ on:
jobs:
BuildTest:
runs-on: ubuntu-latest
env:
hdf5_versions: ${{ matrix.hdf5_versions }}
hdf5_build_dir: hdf5_build_dir

strategy:
matrix:
ubuntu_versions : [
18.04,
20.04,
22.04,
]
compiler : [
gcc,
Expand All @@ -49,32 +46,37 @@ jobs:
]

container:
image: ghcr.io/svalinn/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler }}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}:stable
image: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}/moab:latest

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

- name: Setup
run: |
echo "MOAB_VERSION=${{ matrix.moab_versions }}" >> $GITHUB_ENV
echo "COMPILER=${{ matrix.compiler }}" >> $GITHUB_ENV
echo "HDF5_VERSION=${{ matrix.hdf5_versions }}" >> $GITHUB_ENV
echo "REPO_SLUG=${GITHUB_REPOSITORY}" >> $GITHUB_ENV
echo "PULL_REQUEST=$(echo $GITHUB_REF | cut -d"/" -f3)" >> $GITHUB_ENV
echo "DOUBLE_DOWN="OFF"" >> $GITHUB_ENV
echo "PYTHONPATH=/root/build_dir/moab/bld/pymoab/lib/python3.8/site-packages:${PYTHONPATH}" >> $GITHUB_ENV
ln -s $GITHUB_WORKSPACE /root/build_dir/DAGMC

- name: Building DAGMC
run: |
cd $GITHUB_WORKSPACE
git config --global --add safe.directory /__w/DAGMC/DAGMC
CI/scripts/install.sh
ln -s $GITHUB_WORKSPACE /root/build_dir/DAGMC
shimwell marked this conversation as resolved.
Show resolved Hide resolved
mkdir -p ./build
cd ./build
git config --global --add safe.directory $GITHUB_WORKSPACE
shimwell marked this conversation as resolved.
Show resolved Hide resolved
cmake ../ -DMOAB_DIR=${moab_install_dir} \
-DBUILD_GEANT4=ON \
-DGEANT4_DIR=${geant4_install_dir} \
-DBUILD_CI_TESTS=ON \
-DBUILD_MW_REG_TESTS=OFF \
-DBUILD_STATIC_EXE=OFF \
-DBUILD_STATIC_LIBS=OFF \
-DCMAKE_C_COMPILER=${CC} \
-DCMAKE_CXX_COMPILER=${CXX} \
-DCMAKE_Fortran_COMPILER=gfortran \
-DCMAKE_INSTALL_PREFIX=${install_dir}/dagmc \
-DDOUBLE_DOWN=${double_down} \
-Ddd_ROOT=${double_down_install_dir} && \
make -j4 && \
shimwell marked this conversation as resolved.
Show resolved Hide resolved
make install
Copy link
Member

@shimwell shimwell Aug 14, 2023

Choose a reason for hiding this comment

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

Suggested change
make install
make install
PATH=${install_dir}/dagmc/bin:${PATH} CTEST_OUTPUT_ON_FAILURE=1 make test

is it worth testing here

Copy link
Member Author

Choose a reason for hiding this comment

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

It's in the next step of this job - do you think there is a reason to move it?

Copy link
Member

@shimwell shimwell Aug 15, 2023

Choose a reason for hiding this comment

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

I was thinking it could save a few lines of yaml, in particular that env varible called $GITHUB_WORKSPACE would not be needed


- name: Testing DAGMC
run: |
cd $GITHUB_WORKSPACE
CI/scripts/tests.sh
shimwell marked this conversation as resolved.
Show resolved Hide resolved
cd $GITHUB_WORKSPACE/build
PATH=${install_dir}/dagmc/bin:${PATH} CTEST_OUTPUT_ON_FAILURE=1 make test
shimwell marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 2 additions & 1 deletion doc/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ Next version
* Update Pyne submodule (#845)
* Update Pyne submodule (#848)
* Minor typo fixes in documentation (#851)
* Moved scripts to Dockerfile and parallel CI (#822)
* Moved scripts to Dockerfile and parallel CI (#863)
* Removed unused Circle CI yml (#859)
* Added configuration options to CMake configuration file (#867)
* Change test-on-merge against MOAB master/develop to be optional (#870)
* Introduced logger to better manage console output (#876)
* Streamline CI to take advantage of better docker image management (#880)

**Fixed:**
* Patch to compile with Geant4 10.6 (#803)
Expand Down