Fixed CI error #107
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Python package | |
on: | |
push: | |
branches: [ "Milan" ] | |
pull_request: | |
branches: [ "Milan" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create Build repository | |
run: mkdir ${{github.workspace}}/cpp/Build | |
- name: CMake | |
run: | | |
sudo apt-get install cmake g++ gfortran intel-mkl libmkl-intel-lp64 libmkl-core libmkl-intel-thread libsdl2-dev libsdl2-image-dev nvidia-opencl-dev libclfft-dev libfftw3-dev | |
cd ${{github.workspace}}/cpp/Build | |
cmake .. -DWITH_SDL=ON -DWITH_FFTW=ON | |
- name: Make | |
# Build your program with the given configuration | |
run: | | |
cd ${{github.workspace}}/cpp/Build | |
make | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install flake8 pytest numpy logging matplotlib | |
if [ -f cpp/tests/python_tests/requirements.txt ]; then pip install -r cpp/tests/python_tests/requirements.txt; fi | |
- name: Test with pytest | |
run: | | |
python3 -m pytest tests/ -vvv |