Merge pull request #225 from danielver02/kgk-cmplx-correction #476
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: Build and run tests | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install test dependencies | |
run: pip install numpy pytest | |
- name: Install MPI on Ubuntu | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: sudo apt-get install -y libopenmpi-dev | |
- name: Install BLAS, OPENBLAS, and LAPACK on Ubuntu | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: sudo apt-get install -y libopenblas-dev libblas-dev liblapack-dev | |
- name: Install FORTRAN and MPI on macOS | |
if: ${{ matrix.os == 'macos-latest' }} | |
run: | | |
brew install gcc openmpi | |
# For some reason GitHub actions can't find gfortran unless | |
# we explicitly link it | |
brew unlink gcc | |
brew link gcc | |
ln -s /usr/local/bin/gfortran-12 /usr/local/bin/gfortran | |
- name: Install autotools on MacOS | |
if: ${{ matrix.os == 'macos-latest' }} | |
run: brew install autoconf automake libtool | |
- name: Build ALPS | |
run: | | |
autoreconf -f -i | |
./configure | |
make | |
- name: Run ALPS test | |
run: | | |
cd tests | |
bash ./run_test.sh | |
pytest |