Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run Complete CI on MacOS and Ubuntu #2648

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
59 changes: 9 additions & 50 deletions .github/workflows/CI.yml
Expand Up @@ -50,55 +50,14 @@ env:


jobs:
build-osx:
runs-on: macos-latest
# skip scheduled runs from forks
if: ${{ !( github.repository != 'ReactionMechanismGenerator/RMG-Py' && github.event_name == 'schedule' ) }}
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout RMG-Py
uses: actions/checkout@v4

# configures the mamba environment manager and builds the environment
- name: Setup Mambaforge Python 3.7
uses: conda-incubator/setup-miniconda@v2
with:
environment-file: environment.yml
miniforge-variant: Mambaforge
miniforge-version: latest
python-version: 3.7
activate-environment: rmg_env
use-mamba: true

# list the environment for debugging purposes
- name: mamba info
run: |
mamba info
mamba list

# Clone RMG-database
- name: Clone RMG-database
run: |
cd ..
git clone -b $RMG_DATABASE_BRANCH https://github.com/ReactionMechanismGenerator/RMG-database.git

# modify env variables as directed in the RMG installation instructions
- name: Set Environment Variables
run: |
RUNNER_CWD=$(pwd)
echo "PYTHONPATH=$RUNNER_CWD/RMG-Py:$PYTHONPATH" >> $GITHUB_ENV
echo "$RUNNER_CWD/RMG-Py" >> $GITHUB_PATH

# RMG build step
- name: make RMG
run: |
make clean
make

build-and-test-linux:
runs-on: ubuntu-latest
build-and-test:
continue-on-error: true
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} Build and Test
# skip scheduled runs from forks
if: ${{ !( github.repository != 'ReactionMechanismGenerator/RMG-Py' && github.event_name == 'schedule' ) }}
env:
Expand Down Expand Up @@ -360,7 +319,7 @@ jobs:
# who knows ¯\_(ツ)_/¯
#
# taken from https://github.com/docker/build-push-action
needs: build-and-test-linux
needs: build-and-test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && github.repository == 'ReactionMechanismGenerator/RMG-Py'
steps:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -59,7 +59,7 @@ decython:
find . -name *.pyc -exec rm -f '{}' \;

test-all:
python-jl -m pytest
python-jl -m pytest -s

test test-unittests:
python-jl -m pytest -m "not functional and not database"
Expand Down