Update linux_and_macos.yml #88
This file contains hidden or 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
| name: tests on Ubuntu and MacOS | |
| on: [push, pull_request] | |
| concurrency: | |
| group: ${{ github.actor }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| # Avoid a warning | |
| # OMPI_MCA_btl_base_warn_component_unused: 0 | |
| # Prevent slowdown when oversubscribing (e.g. 4 ranks of 2 cores) | |
| # OMPI_MCA_mpi_yield_when_idle: 1 | |
| # OMPI_MCA_rmaps_base_oversubscribe: 1 | |
| # Allow run as root | |
| OMPI_ALLOW_RUN_AS_ROOT: 1 | |
| OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1 | |
| # Fix OpenMPI issue in Docker : https://github.com/open-mpi/ompi/issues/4948 | |
| # OMPI_MCA_btl_vader_single_copy_mechanism: none | |
| jobs: | |
| Run-on-Ubuntu: | |
| name: test-compile on Ubuntu | |
| runs-on: [ubuntu-22.04] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: build | |
| run: | | |
| sudo apt update | |
| sudo apt install pkg-config git libopenmpi-dev \ | |
| zlib1g zlib1g-dev libblas-dev libfftw3-dev libhdf5-openmpi-dev | |
| ./configure \ | |
| --with-fftw3 \ | |
| --with-hdf5 \ | |
| --with-blas \ | |
| --with-zlib \ | |
| MPIRUN="mpirun --oversubscribe" | |
| make | |
| make test | |
| Run-on-Mac: | |
| name: test-compile on Mac | |
| runs-on: [macos-latest] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: build | |
| run: | | |
| brew install gfortran | |
| brew info gfortran | |
| brew install open-mpi fftw hdf5-mpi | |
| brew info open-mpi | |
| mpicc -v | |
| mpif90 -v | |
| ./configure \ | |
| --with-fftw3 \ | |
| --with-hdf5 \ | |
| --with-blas \ | |
| --with-zlib \ | |
| MPIRUN="mpirun --oversubscribe" | |
| make | |
| make test | |