Skip to content

Commit

Permalink
Merge PR #2456 to fix Continous Integration testing
Browse files Browse the repository at this point in the history
Closes #2455.
The problem is conda-forge upgraded from
libstdcxx-ng              12.3.0               h0f45ef3_0
to
libstdcxx-ng              13.1.0               hfd8a6a1_0
which is incompatible with something in our stack (maybe julia, though perhaps not).
The solution is, until this is fixed, patch the environment.yml to require libstdcxx-ng = 12.

This PR adds a matrix build to the CI so that we continue to test ubuntu-latest with version 13
so we'll notice if it starts to work again. Then we can remove this hackery.
  • Loading branch information
rwest committed Jun 7, 2023
2 parents d57bb10 + bb0af43 commit 211f034
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 11 deletions.
28 changes: 20 additions & 8 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@
# a push is made to a non-main branch. The new proposed changes are referred to as "Dynamic".
#
# Changelog:
# April 2023 - Jackson Burns - Added this header, regression tests, cleanup of action in
# in general, and documentation throughout the file.
#
# May 2023 - added Docker build steps
#
# May 12 2023 - added changes to allow running on forks
# 2023-04 - Jackson Burns - Added this header, regression tests, cleanup of action in
# in general, and documentation throughout the file.
# 2023-05 - added Docker build steps
# 2023-05-12 - added changes to allow running on forks
# 2023-06-06 - added matrix build for libstdcxx-ng versions 12 and 13 on ubuntu. Only expect 12 to work.
name: Constant Integration

on:
Expand All @@ -41,8 +40,17 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
libstdcxx-ng: [null, 12, 13]
exclude:
- os: macos-latest
libstdcxx-ng: 12
- os: macos-latest
libstdcxx-ng: 13
- os: ubuntu-latest
libstdcxx-ng: null
runs-on: ${{ matrix.os }}
# skip scheduled runs on main from forks
continue-on-error: ${{ matrix.libstdcxx-ng == 13 }} # allow (expect) this to fail
# skip scheduled runs from forks
if: ${{ !( github.repository != 'ReactionMechanismGenerator/RMG-Py' && github.event_name == 'schedule' ) }}
env: # update this if needed to match a pull request on the RMG-database
RMG_DATABASE_BRANCH: main
Expand All @@ -51,7 +59,11 @@ jobs:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3

- name: Patch the environment file
if: ${{ matrix.libstdcxx-ng }}
run: |
echo -e "\n - libstdcxx-ng = ${{ matrix.libstdcxx-ng }}\n" >> environment.yml
cat environment.yml
# configures the mamba environment manager and builds the environment
- name: Setup Mambaforge Python 3.7
uses: conda-incubator/setup-miniconda@v2
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ jobs:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- name: Patch the environment file
run: |
echo -e "\n - libstdcxx-ng < 13\n" >> environment.yml
cat environment.yml
- name: Setup Mambaforge Python 3.7
uses: conda-incubator/setup-miniconda@v2
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,17 @@ Installation by Source Using Anaconda Environment for Unix-based Systems: Linux
conda config --env --set subdir osx-64
conda env update -f environment.yml

#. Create the conda environment for RMG-Py ::
#. Modify the environment file for Linux (eg. Ubuntu). If you are using MacOS, you should skip this step.::

echo -e "\n - libstdcxx-ng<13\n" >> environment.yml

Details: Recently (June 2023) conda-forge have a GNU C++ library version 13,
which is incompatible with some of the other binaries in the environment.
By specifying that we want a version of the library less than 13, we ensure
compatibility. MacOS does not use the conda-forge g++ libraries, so this line
would fail if we included it in the environment.yml file for everyone.

#. Create the conda environment for RMG-Py::

conda env create -f environment.yml

Expand Down
4 changes: 2 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#
# Changelog:
# - May 15, 2023 Added this changelog, added inline documentation,
# made depdency list more explicit (@JacksonBurns).
# made dependency list more explicit (@JacksonBurns).
#
name: rmg_env
channels:
Expand Down Expand Up @@ -106,4 +106,4 @@ dependencies:
# it here the environment creation would fail on Mac. The way it ends up working behind
# the scenes is that conda will find a different package for Mac that provides gfortran,
# but because we cannot specify per-platform requirements in this file we simply leave
# it out.
# it out.

0 comments on commit 211f034

Please sign in to comment.