Skip to content

Fixed some mass ranges #82

Fixed some mass ranges

Fixed some mass ranges #82

Workflow file for this run

name: python extensions
on:
push:
pull_request:
branches:
- master
workflow_dispatch:
jobs:
build:
name: Building python extension on ${{ matrix.os }} with (${{ matrix.compiler }}, python-${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest"]
compiler: [gcc-9, gcc-12, clang]
python-version: ["3.8", "3.9", "3.10", "3.11"]
exclude:
# Only run with 'clang' on OSX
- os: "macos-latest"
compiler: gcc-9
- os: "macos-latest"
compiler: gcc-12
# Don't use 'clang' on linux
- os: "ubuntu-latest"
compiler: clang
env:
CC: ${{ matrix.compiler }}
LD: ${{ matrix.compiler }}
CI: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
auto-activate-base: false
miniconda-version: 'latest'
python-version: ${{ matrix.python-version }}
- name: Install dependencies
shell: bash -l {0}
run: |
conda create -q --yes -n test python=${{ matrix.python-version }}
conda activate test
conda install -q -c conda-forge hdf5 gsl
python -m pip install -r requirements.txt
- name: Display PATH, compiler, python
shell: bash -l {0}
run: |
conda activate test
echo "PATH = " $PATH
echo "COMPILER = " ${{ matrix.compiler }}
echo "COMPILER location = " `which ${{ matrix.compiler }}`
echo "COMPILER VERSION = " `${{ matrix.compiler }} --version`
echo "PYTHON = " `which python`
echo "(PYTHON) version = " `python -c "import sys; print(sys.version); "`
- name: build libs
shell: bash -l {0}
run: |
make libs -r CC=${{ matrix.compiler }}
- name: build python extension
shell: bash -l {0}
run: |
make pyext
- name: check libs on osx
if: matrix.os == 'macOS-latest'
shell: bash -l {0}
run: |
otool -L libsage.so `ls _sage_cffi*.so`
- name: check libs on linux
if: matrix.os == 'ubuntu-latest'
shell: bash -l {0}
run: |
ldd libsage.so `ls _sage_cffi*.so`
- name: import python extension
shell: bash -l {0}
run: python -c "from _sage_cffi import ffi, lib;"