5151
5252
5353jobs :
54- build-osx :
55- runs-on : macos-13
56- # skip scheduled runs from forks
57- if : ${{ !( github.repository != 'ReactionMechanismGenerator/RMG-Py' && github.event_name == 'schedule' ) }}
58- defaults :
59- run :
60- shell : bash -l {0}
61- steps :
62- - name : Checkout RMG-Py
63- uses : actions/checkout@v4
64-
65- # Step to create a custom condarc.yml before setting up conda
66- - name : Create custom conda config file
67- run : |
68- RUNNER_CWD=$(pwd)
69- echo "channels:" > $RUNNER_CWD/condarc.yml
70- echo " - conda-forge" >> $RUNNER_CWD/condarc.yml
71- echo " - rmg" >> $RUNNER_CWD/condarc.yml
72- echo " - cantera" >> $RUNNER_CWD/condarc.yml
73- echo "show_channel_urls: true" >> $RUNNER_CWD/condarc.yml
74-
75- # configures the mamba environment manager and builds the environment
76- - name : Setup Miniforge Python 3.7
77- uses : conda-incubator/setup-miniconda@v3
78- with :
79- environment-file : environment.yml
80- miniforge-variant : Miniforge3
81- miniforge-version : latest
82- python-version : 3.7
83- condarc-file : condarc.yml
84- activate-environment : rmg_env
85- use-mamba : true
86-
87- # list the environment for debugging purposes
88- - name : mamba info
89- run : |
90- mamba info
91- mamba list
92-
93- # Clone RMG-database
94- - name : Clone RMG-database
95- run : |
96- cd ..
97- git clone -b $RMG_DATABASE_BRANCH https://github.com/ReactionMechanismGenerator/RMG-database.git
98-
99- # modify env variables as directed in the RMG installation instructions
100- - name : Set Environment Variables
101- run : |
102- RUNNER_CWD=$(pwd)
103- echo "PYTHONPATH=$RUNNER_CWD/RMG-Py:$PYTHONPATH" >> $GITHUB_ENV
104- echo "$RUNNER_CWD/RMG-Py" >> $GITHUB_PATH
105-
106- # RMG build step
107- - name : make RMG
108- run : |
109- make clean
110- make
111-
112- build-and-test-linux :
113- runs-on : ubuntu-latest
54+ build-and-test :
55+ strategy :
56+ fail-fast : false
57+ matrix :
58+ python-version : ["3.9"]
59+ os : [macos-13, macos-latest, ubuntu-latest]
60+ runs-on : ${{ matrix.os }}
61+ name : ${{ matrix.os }} Build and Test Python ${{ matrix.python-version }}
11462 # skip scheduled runs from forks
11563 if : ${{ !( github.repository != 'ReactionMechanismGenerator/RMG-Py' && github.event_name == 'schedule' ) }}
11664 env :
@@ -123,27 +71,17 @@ jobs:
12371 - name : Checkout RMG-Py
12472 uses : actions/checkout@v4
12573
126- # Step to create a custom condarc.yml before setting up conda
127- - name : Create custom condarc.yml
128- run : |
129- RUNNER_CWD=$(pwd)
130- echo "channels:" > $RUNNER_CWD/condarc.yml
131- echo " - conda-forge" >> $RUNNER_CWD/condarc.yml
132- echo " - rmg" >> $RUNNER_CWD/condarc.yml
133- echo " - cantera" >> $RUNNER_CWD/condarc.yml
134- echo "show_channel_urls: true" >> $RUNNER_CWD/condarc.yml
135-
136- # configures the mamba environment manager and builds the environment
137- - name : Setup Miniforge Python 3.7
74+ - name : Setup Miniforge Python ${{ matrix.python-version }}
13875 uses : conda-incubator/setup-miniconda@v3
13976 with :
14077 environment-file : environment.yml
14178 miniforge-variant : Miniforge3
14279 miniforge-version : latest
143- python-version : 3.7
144- condarc-file : condarc.yml
80+ python-version : ${{ matrix.python-version }}
14581 activate-environment : rmg_env
14682 use-mamba : true
83+ show-channel-urls : true
84+ channels : conda-forge,cantera,rmg
14785
14886 # list the environment for debugging purposes
14987 - name : mamba info
@@ -386,7 +324,7 @@ jobs:
386324 # who knows ¯\_(ツ)_/¯
387325 #
388326 # taken from https://github.com/docker/build-push-action
389- needs : build-and-test-linux
327+ needs : build-and-test
390328 runs-on : ubuntu-latest
391329 if : github.ref == 'refs/heads/main' && github.repository == 'ReactionMechanismGenerator/RMG-Py'
392330 steps :
0 commit comments