Mooseherder Integration #82
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: Install from source and linting | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
check-lint: | |
name: Lint Code | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt install libegl1 | |
sudo apt install libgl1 libxext6 libx11-6 | |
python -m pip install --upgrade pip | |
pip install pylint | |
pip install -e . | |
- name: Lint with pylint | |
run: | | |
pylint src/pyvale --fail-under=7.0 | |
install: | |
name: Test Installation ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-13, macos-14] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install libomp and set compiler on macos-13 | |
if: matrix.os == 'macos-13' | |
run: | | |
brew install libomp | |
echo "CC=$(brew --prefix llvm@15)/bin/clang" >> $GITHUB_ENV | |
echo "CXX=$(brew --prefix llvm@15)/bin/clang++" >> $GITHUB_ENV | |
echo "LDFLAGS=-L$(brew --prefix libomp)/lib" >> $GITHUB_ENV | |
echo "CPPFLAGS=-I$(brew --prefix libomp)/include" >> $GITHUB_ENV | |
- name: Install libomp and set compiler on macos-14 | |
if: matrix.os == 'macos-14' | |
run: | | |
brew install libomp | |
echo "CC=$(brew --prefix llvm@15)/bin/clang" >> $GITHUB_ENV | |
echo "CXX=$(brew --prefix llvm@15)/bin/clang++" >> $GITHUB_ENV | |
echo "LDFLAGS=-L$(brew --prefix libomp)/lib" >> $GITHUB_ENV | |
echo "CPPFLAGS=-I$(brew --prefix libomp)/include" >> $GITHUB_ENV | |
- name: Install dependencies for ubuntu-latest | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt update | |
sudo apt install libegl1 | |
sudo apt install libgl1 libxext6 libx11-6 | |
- name: Test package installation | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e . | |
- name: Smoke test | |
run: | | |
python -c "import pyvale" |