From fddacbf462e3dfb7f91a3655eca33b90aae2da2d Mon Sep 17 00:00:00 2001 From: Jackson Burns Date: Thu, 8 Feb 2024 10:39:40 -0500 Subject: [PATCH 1/2] patch the environment file to pin Julia to 1.9.5 + git syntax fix git syntax fixes - quotes around sign in, default upstream is origin modify mac sed command because apparently the syntax is different thanks stackoverflow https://stackoverflow.com/a/19457213 switch julia to 1.9.1 in CI --- .github/workflows/CI.yml | 4 ++++ .github/workflows/docs.yml | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c02c67a985..43a9d7ad60 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -62,6 +62,8 @@ jobs: uses: actions/checkout@v3 # configures the mamba environment manager and builds the environment + - name: Patch Environment File + run: sed -i '' 's/ - conda-forge::julia>=1.8.5,!=1.9.0/ - conda-forge::julia=1.9.1/' environment.yml - name: Setup Mambaforge Python 3.7 uses: conda-incubator/setup-miniconda@v2 with: @@ -112,6 +114,8 @@ jobs: uses: actions/checkout@v3 # configures the mamba environment manager and builds the environment + - name: Patch Environment File + run: sed -i 's/ - conda-forge::julia>=1.8.5,!=1.9.0/ - conda-forge::julia=1.9.1/' environment.yml - name: Setup Mambaforge Python 3.7 uses: conda-incubator/setup-miniconda@v2 with: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 046b22fcdb..d3c9de06eb 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -16,6 +16,8 @@ jobs: shell: bash -l {0} steps: - uses: actions/checkout@v2 + - name: Patch Environment File + run: sed -i 's/ - conda-forge::julia>=1.8.5,!=1.9.0/ - conda-forge::julia=1.9.1/' environment.yml - name: Setup Mambaforge Python 3.7 uses: conda-incubator/setup-miniconda@v2 with: @@ -59,8 +61,8 @@ jobs: - name: Make documentation - to publish if: ${{ github.event_name == 'push' && github.repository == 'ReactionMechanismGenerator/RMG-Py' }} run: | - git config user.name github-actions - git config user.email github-actions@github.com + git config user.name "github-actions" + git config user.email "github-actions@github.com" cd documentation make html - name: Check documentation links @@ -72,4 +74,4 @@ jobs: if: ${{ github.event_name == 'push' && github.repository == 'ReactionMechanismGenerator/RMG-Py' }} run: | touch build/html/.nojekyll - cd build/html; git add -A .; git commit -m "Automated documentation rebuild"; git push official gh-pages + cd build/html; git add -A .; git commit -m "Automated documentation rebuild"; git push origin gh-pages From 51924d98ed65bac069cbbde0ab7c894979c567a5 Mon Sep 17 00:00:00 2001 From: Jackson Burns Date: Thu, 8 Feb 2024 10:57:37 -0500 Subject: [PATCH 2/2] update Docker image with stable Julia version - patch the environment file when building Docker image to a version that @calvinp0 manually tested to work on windows - set an env variable before building RMS to fix an issue with precompilation Thanks Calvin! --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 803374c02a..a5c38c33b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,8 +42,10 @@ WORKDIR /rmg RUN git clone --single-branch --branch main --depth 1 https://github.com/ReactionMechanismGenerator/RMG-Py.git && \ git clone --single-branch --branch main --depth 1 https://github.com/ReactionMechanismGenerator/RMG-database.git -# build the conda environment WORKDIR /rmg/RMG-Py +# patch the env file to a specific version of Julia that we know to be working on all platforms +RUN sed -i 's/ - conda-forge::julia>=1.8.5,!=1.9.0/ - conda-forge::julia=1.9.4/' environment.yml +# build the conda environment RUN conda env create --file environment.yml && \ conda clean --all --yes @@ -61,6 +63,8 @@ ENV PATH="$RUNNER_CWD/RMG-Py:$PATH" # 1. Build RMG # 2. Install and link Julia dependencies for RMS +# setting this env variable fixes an issue with Julia precompilation on Windows +ENV JULIA_CPU_TARGET="x86-64,haswell,skylake,broadwell,znver1,znver2,znver3,cascadelake,icelake-client,cooperlake,generic" RUN make && \ julia -e 'using Pkg; Pkg.add(PackageSpec(name="PyCall",rev="master")); Pkg.add(PackageSpec(name="ReactionMechanismSimulator",rev="main")); using ReactionMechanismSimulator' && \ python -c "import julia; julia.install(); import diffeqpy; diffeqpy.install()"