Merge pull request #122 from pynbody/gadgethdf #183
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
name: Build and Test | |
on: [push, pull_request] | |
env: | |
HOMEBREW_NO_AUTO_UPDATE: 1 | |
CPATH: /usr/local/include | |
LPATH: /usr/local/lib | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.10"] | |
cxx: [g++-10, g++-11, g++-12] | |
include: | |
- os: macos-latest | |
python-version: "3.10" | |
cxx: g++-12 | |
runs-on: ${{ matrix.os }} | |
env: | |
CXX: ${{ matrix.cxx }} | |
steps: | |
- name: Install Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
if: matrix.os == 'ubuntu-latest' | |
shell: bash | |
run: | | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test | |
sudo apt-get update -qq | |
sudo apt install libfftw3-dev libgsl0-dev | |
sudo apt install gcc-10 g++-10 gcc-11 g++-11 gcc-12 g++-12 | |
- name: Install dependencies | |
if: matrix.os == 'macos-latest' | |
shell: bash | |
run: | | |
brew install gcc@12 fftw gsl | |
brew link gsl | |
- name: Compile code | |
working-directory: genetIC | |
run: make | |
- name: Install python dependencies | |
shell: bash | |
run: | | |
export CC=gcc-10 | |
python -m pip install --upgrade pip setuptools wheel | |
python -m pip install numpy scipy cython | |
python -m pip install pynbody | |
- name: Run tests | |
shell: bash | |
working-directory: genetIC/tests | |
run: ./run_tests.sh | |
- name: Run mapper tests | |
shell: bash | |
working-directory: genetIC/tests | |
run: ./run_mapper_tests.sh |