Install openmp on macos #104
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: Tests | |
on: | |
push: | |
branches: [ master, dev ] | |
paths-ignore: | |
- 'docs/**' | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
env: | |
CYTHON_LINETRACE: true | |
strategy: | |
matrix: | |
python-version: [3.9] | |
os: [macos-13, windows-latest, ubuntu-latest] | |
# exclude: # Temporarily disable release for macos and python 3.8 as there is a bug with openblas | |
# - os: macos-latest | |
# python-version: 3.8 | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Add OpenMP flags (macOS) | |
if: runner.os == 'macOS' | |
run: | | |
brew install libomp -y | |
echo "LDFLAGS=${LDFLAGS} -L$(brew --prefix libomp)/lib" >> "$GITHUB_ENV" | |
echo "CPPFLAGS=${CPPFLAGS} -I$(brew --prefix libomp)/include" >> "$GITHUB_ENV" | |
- name: Show python info | |
shell: bash -e {0} | |
run: | | |
which python | |
python --version | |
- name: Build | |
shell: bash -e {0} | |
run: | | |
python -m pip install . -vv | |
- name: Install test dependencies | |
shell: bash -e {0} | |
run: | | |
python -m pip install -q pytest pylint pytest-pylint pytest-cov codecov pytest-mock pyteomics cython | |
- name: Install xvfb (Linux) | |
shell: bash -e {0} | |
run: python -m pip install pytest-xvfb | |
if: runner.os == 'Linux' | |
- name: Test with pytest | |
shell: bash -e {0} | |
run: | | |
cd tests | |
pytest --cov=libmetgem --cov-report=xml | |
- name: Upload coverage | |
if: success() | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
name: ${{ runner.os }} Python ${{ matrix.python-version }} |