BCF reader #28
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: Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: tests-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: ${{ matrix.platform }} py${{ matrix.python-version }} | |
| runs-on: ${{ matrix.platform }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: [ubuntu-latest, macos-14, windows-latest] | |
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Configure OpenMP (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libgomp1 | |
| echo "CC=gcc" >> $GITHUB_ENV | |
| echo "CFLAGS=-fopenmp" >> $GITHUB_ENV | |
| echo "LDFLAGS=-fopenmp" >> $GITHUB_ENV | |
| - name: Install OpenMP and CVXOPT dependencies (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew install libomp suite-sparse openblas | |
| LIBOMP_PREFIX=$(brew --prefix libomp) | |
| SUITESPARSE_PREFIX=$(brew --prefix suite-sparse) | |
| OPENBLAS_PREFIX=$(brew --prefix openblas) | |
| echo "CC=/usr/bin/clang" >> $GITHUB_ENV | |
| echo "CFLAGS=-Xpreprocessor -fopenmp -I${LIBOMP_PREFIX}/include" >> $GITHUB_ENV | |
| echo "LDFLAGS=-L${LIBOMP_PREFIX}/lib -lomp -Wl,-rpath,${LIBOMP_PREFIX}/lib" >> $GITHUB_ENV | |
| echo "DYLD_LIBRARY_PATH=${LIBOMP_PREFIX}/lib" >> $GITHUB_ENV | |
| echo "CVXOPT_SUITESPARSE_INC_DIR=${SUITESPARSE_PREFIX}/include" >> $GITHUB_ENV | |
| echo "CVXOPT_SUITESPARSE_LIB_DIR=${SUITESPARSE_PREFIX}/lib" >> $GITHUB_ENV | |
| echo "CVXOPT_BLAS_LIB_DIR=${OPENBLAS_PREFIX}/lib" >> $GITHUB_ENV | |
| - name: Configure OpenMP (Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| echo "CFLAGS=/openmp" >> $GITHUB_ENV | |
| - name: Install test dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install tox tox-gh-actions | |
| - name: Test with tox | |
| uses: GabrielBB/xvfb-action@v1 | |
| with: | |
| run: python -m tox | |
| env: | |
| PLATFORM: ${{ matrix.platform }} | |