Skip to content

Commit ed99c21

Browse files
authored
Merge pull request #2608 from JacksonBurns/ci-julia-patch
Continuous Integration, Documentation Build, and Dockerfile Fixes
2 parents 551c3eb + 51924d9 commit ed99c21

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

.github/workflows/CI.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ jobs:
6262
uses: actions/checkout@v3
6363

6464
# configures the mamba environment manager and builds the environment
65+
- name: Patch Environment File
66+
run: sed -i '' 's/ - conda-forge::julia>=1.8.5,!=1.9.0/ - conda-forge::julia=1.9.1/' environment.yml
6567
- name: Setup Mambaforge Python 3.7
6668
uses: conda-incubator/setup-miniconda@v2
6769
with:
@@ -112,6 +114,8 @@ jobs:
112114
uses: actions/checkout@v3
113115

114116
# configures the mamba environment manager and builds the environment
117+
- name: Patch Environment File
118+
run: sed -i 's/ - conda-forge::julia>=1.8.5,!=1.9.0/ - conda-forge::julia=1.9.1/' environment.yml
115119
- name: Setup Mambaforge Python 3.7
116120
uses: conda-incubator/setup-miniconda@v2
117121
with:

.github/workflows/docs.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
shell: bash -l {0}
1717
steps:
1818
- uses: actions/checkout@v2
19+
- name: Patch Environment File
20+
run: sed -i 's/ - conda-forge::julia>=1.8.5,!=1.9.0/ - conda-forge::julia=1.9.1/' environment.yml
1921
- name: Setup Mambaforge Python 3.7
2022
uses: conda-incubator/setup-miniconda@v2
2123
with:
@@ -59,8 +61,8 @@ jobs:
5961
- name: Make documentation - to publish
6062
if: ${{ github.event_name == 'push' && github.repository == 'ReactionMechanismGenerator/RMG-Py' }}
6163
run: |
62-
git config user.name github-actions
63-
git config user.email github-actions@github.com
64+
git config user.name "github-actions"
65+
git config user.email "github-actions@github.com"
6466
cd documentation
6567
make html
6668
- name: Check documentation links
@@ -72,4 +74,4 @@ jobs:
7274
if: ${{ github.event_name == 'push' && github.repository == 'ReactionMechanismGenerator/RMG-Py' }}
7375
run: |
7476
touch build/html/.nojekyll
75-
cd build/html; git add -A .; git commit -m "Automated documentation rebuild"; git push official gh-pages
77+
cd build/html; git add -A .; git commit -m "Automated documentation rebuild"; git push origin gh-pages

Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ WORKDIR /rmg
4242
RUN git clone --single-branch --branch main --depth 1 https://github.com/ReactionMechanismGenerator/RMG-Py.git && \
4343
git clone --single-branch --branch main --depth 1 https://github.com/ReactionMechanismGenerator/RMG-database.git
4444

45-
# build the conda environment
4645
WORKDIR /rmg/RMG-Py
46+
# patch the env file to a specific version of Julia that we know to be working on all platforms
47+
RUN sed -i 's/ - conda-forge::julia>=1.8.5,!=1.9.0/ - conda-forge::julia=1.9.4/' environment.yml
48+
# build the conda environment
4749
RUN conda env create --file environment.yml && \
4850
conda clean --all --yes
4951

@@ -61,6 +63,8 @@ ENV PATH="$RUNNER_CWD/RMG-Py:$PATH"
6163

6264
# 1. Build RMG
6365
# 2. Install and link Julia dependencies for RMS
66+
# setting this env variable fixes an issue with Julia precompilation on Windows
67+
ENV JULIA_CPU_TARGET="x86-64,haswell,skylake,broadwell,znver1,znver2,znver3,cascadelake,icelake-client,cooperlake,generic"
6468
RUN make && \
6569
julia -e 'using Pkg; Pkg.add(PackageSpec(name="PyCall",rev="master")); Pkg.add(PackageSpec(name="ReactionMechanismSimulator",rev="main")); using ReactionMechanismSimulator' && \
6670
python -c "import julia; julia.install(); import diffeqpy; diffeqpy.install()"

0 commit comments

Comments
 (0)