Interferometric module for Phoebe #152
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install dependencies and run tests on pull requests to all branches. | |
name: Python 3.8 test suite | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- 'master' | |
- 'feature-*' | |
- 'bugfix-*' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8"] | |
# astropy-version: ["3.0", "4.0", "5.0"] | |
astropy-version: ["3.0", "5.0"] | |
# numpy-version: ["1.18", "1.19", "1.20", "1.21", "1.22", "1.23", "1.24"] | |
numpy-version: ["1.18", "1.22", "1.24"] | |
# scipy-version: ["1.8", "1.9", "1.10"] | |
scipy-version: ["1.8", "1.10"] | |
# mpl-version: ["3.2", "3.3", "3.4", "3.5", "3.6"] | |
os: [ubuntu-latest, macos-11, macos-12] # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners | |
exclude: | |
- numpy-version: "1.18" # astropy failing to build. Ticket open. | |
scipy-version: "1.8" | |
astropy-version: "3.0" | |
- scipy-version: "1.10" # requires numpy 1.19.5+ | |
numpy-version: "1.18" | |
- astropy-version: "3.0" # requires numpy <=1.21 | |
numpy-version: "1.22" | |
# - astropy-version: "3.0" | |
# numpy-version: "1.23" | |
- astropy-version: "3.0" | |
numpy-version: "1.24" | |
# - astropy-version: "4.0" # needs numpy <=1.21 | |
# numpy-version: "1.22" | |
# - astropy-version: "4.0" | |
# numpy-version: "1.23" | |
# - astropy-version: "4.0" | |
# numpy-version: "1.24" | |
- astropy-version: "5.0" | |
numpy-version: "1.18" | |
# - astropy-version: "5.0" | |
# numpy-version: "1.19" | |
name: ${{ matrix.os }} python${{ matrix.python-version}} numpy ${{ matrix.numpy-version }} scipy ${{ matrix.scipy-version }} astropy ${{ matrix.astropy-version}} | |
steps: | |
- name: Checkout PHOEBE | |
uses: actions/checkout@v3 | |
- name: Setup python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: PHOEBE environment variables | |
run: | | |
export PHOEBE_ENABLE_PLOTTING='FALSE' | |
export PHOEBE_UPDATE_PASSBAND_IGNORE_VERSION='TRUE' | |
- name: Update pip | |
run: | | |
python -m pip install --upgrade pip | |
- name: Install numpy ${{ matrix.numpy-version }}, scipy ${{ matrix.scipy-version }}, astropy ${{ matrix.astropy-version }} and dependencies | |
run: | | |
python -m pip install "numpy==${{ matrix.numpy-version }}.*" --force-reinstall | |
python -m pip install "scipy==${{ matrix.scipy-version }}.*" --no-deps | |
python -m pip install "astropy==${{ matrix.astropy-version }}.*" --no-deps | |
python -m pip install rebound requests pytest sympy tqdm corner pyyaml pyerfa pipdeptree | |
- name: Run pipdeptree to see package dependencies | |
run: | | |
pipdeptree | |
- name: Test numpy, scipy, astropy install/versions | |
run: | | |
python -c "import numpy; print(f'numpy version: {numpy.__version__}')" | |
python -c "import scipy; print(f'scipy version: {scipy.__version__}')" | |
python -c "import astropy; print(f'astropy version: {astropy.__version__}')" | |
- name: Install PHOEBE from source | |
run: | | |
python setup.py build && python setup.py install --user | |
- name: Checkout photodynam | |
uses: actions/checkout@v3 | |
with: | |
repository: phoebe-project/photodynam | |
path: photodynam | |
- name: Install photodynam | |
run: | | |
cd photodynam | |
make | |
sudo cp photodynam /usr/local/bin/ | |
python setup.py build && python3 setup.py install --user | |
cd .. | |
- name: Test photodynam install | |
run: | | |
python -c "import photodynam" | |
- name: Setup GNU Fortran | |
uses: modflowpy/install-gfortran-action@v1 | |
- name: Install jktebop | |
run: | | |
wget https://www.astro.keele.ac.uk/jkt/codes/jktebop-v43.tgz | |
tar -xvzf jktebop-v43.tgz | |
cd jktebop43 | |
gfortran -o jktebop jktebop.f | |
echo $(pwd) >> $GITHUB_PATH | |
cd .. | |
- name: Test jktebop install | |
run: | | |
jktebop | |
- name: Run tests | |
run: | | |
pytest --verbose --capture=no tests/nosetests/ |