Skip to content

Commit

Permalink
simplified workflows for github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
dtamayo committed Jan 24, 2024
1 parent 1170ae4 commit 9867c62
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/c.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: REBOUNDx (C)

on: [push, pull_request, repository_dispatch]
on: [push, pull_request]

jobs:
build:
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/ipynb.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: REBOUNDx (ipynb)

on: [push, pull_request, repository_dispatch]
on: [push, pull_request]

jobs:
build:
Expand All @@ -21,23 +21,11 @@ jobs:
python -m pip install --upgrade pip
pip install pytest matplotlib scipy
pip install wheel setuptools
- name: Clone REBOUND repo # in case we need to checkout version that triggered REBOUNDx CI
uses: actions/checkout@v4
with:
repository: hannorein/rebound
ref: ${{ github.event.client_payload.sha }}
path: ./rebound
- name: Default PyPI REBOUND install
if: github.event_name != 'repository_dispatch' # if not triggered by REBOUND, use latest PyPI version
run: pip install rebound
- name: Trigger REBOUND version install
if: github.event_name == 'repository_dispatch' # if triggered, installed version checked out above
run: |
echo "Installing REBOUND SHA: ${{ github.event.client_payload.sha }}"
pip install ./rebound
- name: Install REBOUNDx
run: |
pip install --no-build-isolation -e . -v
pip install -e . -v
- name: Running jupyter notebooks
run: |
cd ipython_examples
Expand Down
25 changes: 4 additions & 21 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: REBOUNDx (python)

on: [push, pull_request, repository_dispatch]
on: [push, pull_request]

jobs:
build:
Expand All @@ -22,26 +22,9 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
pip install numpy matplotlib
pip install wheel setuptools
- name: Clone REBOUND repo # in case we need to checkout version that triggered REBOUNDx CI
uses: actions/checkout@v4
with:
repository: hannorein/rebound
ref: ${{ github.event.client_payload.sha }}
path: ./rebound
- name: Default PyPI REBOUND install
if: github.event_name != 'repository_dispatch' # if not triggered by REBOUND, use latest PyPI version
run: pip install rebound
- name: Trigger REBOUND version install
if: github.event_name == 'repository_dispatch' # if triggered, installed version checked out above
run: |
echo "Installing REBOUND SHA: ${{ github.event.client_payload.sha }}"
pip install ./rebound
- name: Install REBOUNDx
run: |
pip install --no-build-isolation -e . -v
pip install pytest wheel setuptools numpy matplotlib
pip install rebound
pip install -e . -v
- name: Output package contents
run: pip show reboundx -vf
- name: Run unit tests
Expand Down

0 comments on commit 9867c62

Please sign in to comment.