From a9b7a3d064c89f2f916a575a9830556d7f00283e Mon Sep 17 00:00:00 2001 From: Richard West Date: Mon, 5 Jun 2023 15:19:57 -0400 Subject: [PATCH 1/4] Fix typo in environment.yml This is a combination of 12 commits, as we tried everything under the sun to debug the CI. But they all cancelled out when merged (apart from fixing a typo in a comment) - This is the 1st commit message: CI: trying to force ubuntu-20.04 instead of ubuntu-latest (temporary) While we figure out what's happening, let's try an older ubuntu. - This is commit message #2: fixup! CI: trying to force ubuntu-20.04 instead of ubuntu-latest (temporary) - This is the commit message #3: Switch back to ubuntu-latest But leave a 20.04 in the matrix build - This is the commit message #4: Trying libstdcxx-ng < 13 in Conda environment. Trying to debug. If this works it should be put in docker file too. Or, better, the real cause found and fixed. - This is the commit message #5: fix typo in env, undo ubuntu os changes, set gcc version in CI to 6 this system object of this version is being provided by gcc, and the runners no longer come prepackaged with it since its old (?) - This is the commit message #6: it wasn't the gcc version - This is the commit message #7: it was the julia version, 1.9.0 is brokey as reported at https://github.com/conda-forge/julia-feedstock/issues/253 the latest release of julia (1.9.0) is brokey, don't use it (put !=1.9.0 in the environment file) - This is the commit message #8: make mac and ubuntu use the same cxx library - This is the commit message #9: but what if it was rdkit all along? - This is the commit message #10: Revert "but what if it was rdkit all along?" because it wasn't - This is the commit message #11: Revert "make mac and ubuntu use the same cxx library" cos it didn't work - This is the commit message #12: Revert "it was the julia version, 1.9.0 is brokey" but it wasn't --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index f0b8db780e..7cc8ecc0ba 100644 --- a/environment.yml +++ b/environment.yml @@ -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: From b5ca1041510749ecf313f4a5ac5e9312acc4519e Mon Sep 17 00:00:00 2001 From: Richard West Date: Tue, 6 Jun 2023 11:58:56 -0400 Subject: [PATCH 2/4] Try patching the environment file to use libstdcxx-ng<13 for linux only. In the context of CI runner we patch the environment file and for developers, we update the installation instructions. See https://github.com/ReactionMechanismGenerator/RMG-Py/pull/2456 for extensive discussion. --- .github/workflows/CI.yml | 5 +++++ .github/workflows/docs.yml | 4 ++++ .../users/rmg/installation/anacondaDeveloper.rst | 12 +++++++++++- environment.yml | 2 +- 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 1a032b819e..079f536f13 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -52,6 +52,11 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Patch the environment file + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + echo -e "\n - libstdcxx-ng < 13\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 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 82c694d42b..3a1da9440e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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: diff --git a/documentation/source/users/rmg/installation/anacondaDeveloper.rst b/documentation/source/users/rmg/installation/anacondaDeveloper.rst index 5a94b79b94..5494d2661d 100644 --- a/documentation/source/users/rmg/installation/anacondaDeveloper.rst +++ b/documentation/source/users/rmg/installation/anacondaDeveloper.rst @@ -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 diff --git a/environment.yml b/environment.yml index 7cc8ecc0ba..7c36d14194 100644 --- a/environment.yml +++ b/environment.yml @@ -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. \ No newline at end of file + # it out. From b21b251f4613176dda0383ddd9bd528e42ac945e Mon Sep 17 00:00:00 2001 From: Richard West Date: Tue, 6 Jun 2023 13:28:31 -0400 Subject: [PATCH 3/4] Add a matrix build that tests libstdcxx-ng versions 12 and 13 For now we will only require v12 to pass, but it'd be nice to know when v13 starts to work again. (fingers crossed). Once it is passing, we can remove the patching that is done in the commits just prior to this one. --- .github/workflows/CI.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 079f536f13..c1b344fbce 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -41,8 +41,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 @@ -51,11 +60,10 @@ jobs: shell: bash -l {0} steps: - uses: actions/checkout@v3 - - name: Patch the environment file - if: ${{ matrix.os == 'ubuntu-latest' }} + if: ${{ matrix.libstdcxx-ng }} run: | - echo -e "\n - libstdcxx-ng < 13\n" >> environment.yml + 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 From bb0af4339923c347b739becf8d088d316bbaec39 Mon Sep 17 00:00:00 2001 From: Richard West Date: Tue, 6 Jun 2023 19:59:22 -0400 Subject: [PATCH 4/4] Updated CI.yml changelog Though I still think a git log is better, if we have this we should maintain it. --- .github/workflows/CI.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c1b344fbce..0480e53959 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -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: