Skip to content

Commit

Permalink
Update inplace.yml workflow (#954)
Browse files Browse the repository at this point in the history
* Update and rename inplace.yml to ci.yml
- Some restructuring
- Test more OSes
- Run tests with mpiexec
- Don't fail all environments if one test environment fails
  • Loading branch information
rieder committed Apr 26, 2023
1 parent 19e0b28 commit 913c28c
Showing 1 changed file with 54 additions and 13 deletions.
67 changes: 54 additions & 13 deletions .github/workflows/inplace.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,64 +1,104 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: inplace
name: ci

on:
push:
branches: [ main ]
branches:
- main
pull_request:
branches: [ main ]
branches:
- main
workflow_dispatch:

jobs:
build:

runs-on: ubuntu-latest
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
mpi: [ 'mpich', 'openmpi']
name: Test AMUSE with ${{ matrix.mpi }}
mpi:
- mpich
- openmpi
os:
- ubuntu-22.04
- ubuntu-20.04
# macOS is not ready yet - needs other setup of prerequisites
# - macos-12
# - macos-11
python:
- 3.7

steps:
- uses: actions/checkout@v3

- name: Checkout
uses: actions/checkout@v3

- name: Setup MPI
id: setup-mpi
uses: mpi4py/setup-mpi@v1
with:
mpi: ${{ matrix.mpi }}

- name: Show MPI name
run: echo "${{ steps.setup-mpi.outputs.mpi }}"

- name: Show MPI info
run: mpichversion
if: ${{ matrix.mpi == 'mpich' }}

- name: Show MPI info
run: ompi_info
if: ${{ matrix.mpi == 'openmpi' }}

- name: Set up JDK 1.8
uses: actions/setup-java@v3.9.0
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '17'
- name: Set up Python 3.8

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: ${{ matrix.python }}
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
sudo apt-get install gfortran libopenblas-dev libhdf5-openmpi-dev libgsl0-dev cmake libfftw3-3 libfftw3-dev libmpfr6 libmpfr-dev
pip install numpy scipy matplotlib docutils mpi4py pytest pytest-timeout
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Install amuse
run: |
pip install -e .
./configure
- name: build AMUSE framework
run: |
make framework
- name: build SSE and BHTree
run: |
make sse.code bhtree.code
- name: check installation
run: |
amusifier --get-amuse-configmk
pip list
- name: archive build log
uses: actions/upload-artifact@v3.1.1
with:
name: buildlog
path: build.log

- name: test core_tests
run: |
pytest --pyargs amuse.test.suite.core_tests -s
- name: test compile_tests
run: |
ip link show
Expand All @@ -67,10 +107,11 @@ jobs:
env:
OMPI_MCA_rmaps_base_oversubscribe: 1
OMPI_MCA_btl_tcp_if_include: lo

- name: test code_tests
run: |
pytest --pyargs amuse.test.suite.codes_tests.test_bhtree -sv
pytest --pyargs amuse.test.suite.codes_tests.test_sse -sv
mpiexec -n 1 pytest --pyargs amuse.test.suite.codes_tests.test_bhtree -sv
mpiexec -n 1 pytest --pyargs amuse.test.suite.codes_tests.test_sse -sv
env:
OMPI_MCA_rmaps_base_oversubscribe: 1
OMPI_MCA_btl_tcp_if_include: lo
Expand Down

0 comments on commit 913c28c

Please sign in to comment.