dropped python2 #504
Workflow file for this run
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: GitHub CI | |
on: [push, pull_request] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: On ${{ matrix.os }} with (${{ matrix.compiler }}, python-${{ matrix.python-version }}, numpy-${{ matrix.numpy-version }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-20.04", "ubuntu-latest", "macos-latest"] | |
compiler: [gcc-7, gcc-9, clang] | |
python-version: ["3.9", "3.12"] | |
numpy-version: ["1.20", "2.0.1"] | |
include: | |
- numpy-version: "1.23" | |
compiler: gcc-10 | |
python-version: "3.10" | |
os: ubuntu-latest | |
- numpy-version: "1.23" | |
compiler: gcc-11 | |
python-version: "3.10" | |
os: ubuntu-latest | |
- numpy-version: "1.23" | |
compiler: gcc-10 | |
python-version: "3.10" | |
os: ubuntu-latest | |
- numpy-version: "1.23" | |
compiler: gcc-11 | |
python-version: "3.10" | |
os: ubuntu-latest | |
- numpy-version: "1.23" | |
compiler: gcc-10 | |
python-version: "3.11" | |
os: ubuntu-latest | |
- numpy-version: "1.23" | |
compiler: gcc-11 | |
python-version: "3.11" | |
os: ubuntu-latest | |
- numpy-version: "1.23" | |
compiler: gcc-12 | |
python-version: "3.11" | |
os: ubuntu-latest | |
- numpy-version: "1.23" | |
compiler: gcc-10 | |
python-version: "3.11" | |
os: ubuntu-latest | |
- numpy-version: "1.23" | |
compiler: gcc-11 | |
python-version: "3.11" | |
os: ubuntu-latest | |
- numpy-version: "1.23" | |
compiler: gcc-12 | |
python-version: "3.11" | |
os: ubuntu-latest | |
exclude: | |
# Only run with 'clang' on OSX | |
- os: "macos-latest" | |
compiler: gcc-7 | |
- os: "macos-latest" | |
compiler: gcc-9 | |
# Don't use 'clang' on linux | |
- os: "ubuntu-20.04" | |
compiler: clang | |
- os: "ubuntu-latest" | |
compiler: clang | |
# only gcc-10 on latest | |
- os: "ubuntu-latest" | |
compiler: gcc-9 | |
- os: "ubuntu-latest" | |
compiler: gcc-7 | |
# Only use latest numpy on ubuntu-latest | |
- os: "ubuntu-latest" | |
numpy-version: 1.20 | |
# python3.10 only on ubuntu-latest | |
# - os: "ubuntu-20.04" | |
# python-version: "3.10" | |
# - os: "macos-latest" | |
# python-version: "3.10" | |
- python-version: "3.9" | |
numpy-version: "2.0.1" | |
- python-version: "3.12" | |
numpy-version: "1.20" | |
env: | |
CC: ${{ matrix.compiler }} | |
CORRFUNC_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 }} | |
# This was needed on 18.04 but not on 20.04 | |
# - name: Install binutils on linux | |
# shell: bash -l {0} | |
# if: matrix.os == 'ubuntu-18.04' | |
# run: | | |
# sudo apt-get update | |
# sudo apt-get install binutils | |
- name: Install gcc-7 on ubuntu-20.04 | |
shell: bash -l {0} | |
if: matrix.os == 'ubuntu-20.04' | |
run: | | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test | |
sudo apt-get update | |
sudo apt-get install gcc-7 | |
- name: Install dependencies | |
shell: bash -l {0} | |
run: | | |
conda create -q --yes -n test python=${{ matrix.python-version }} nomkl | |
conda activate test | |
conda install -q --yes -c conda-forge numpy=${{ matrix.numpy-version }} gsl | |
- name: Display PATH, compiler, python | |
shell: bash -l {0} | |
run: | | |
conda activate test | |
echo "PATH = " $PATH | |
echo "COMPILER = " `which ${{ matrix.compiler }}` | |
echo "COMPILER VERSION = " `${{ matrix.compiler }} --version` | |
echo "PYTHON = " `which python` | |
echo "(PYTHON, NUMPY) version = " `python -c "import sys; import numpy as np; print(sys.version); print(np.__version__);"` | |
echo "Preprocessor defs:" | |
echo `${{ matrix.compiler }} -dM -E - -march=native` | |
- name: lscpu on Linux | |
if: matrix.os != 'macos-latest' | |
run: | | |
lscpu | |
- name: sysctl machdep.cpu on OSX | |
if: matrix.os == 'macos-latest' | |
run: | | |
sysctl machdep.cpu | |
# - name: Add linker flag to OSX + gcc | |
# shell: bash -l {0} | |
# if: matrix.os == 'osx-latest' && startswith(matrix.compiler, 'gcc') | |
# run: export CLINK = '-lgomp' | |
- name: compile | |
shell: bash -l {0} | |
run: make -r CC=${{ matrix.compiler }} | |
- name: install | |
shell: bash -l {0} | |
run: make install CC=${{ matrix.compiler }} | |
- name: compile and install python extensions | |
shell: bash -l {0} | |
run: | | |
echo "CC = " $CC | |
export CC=${{ matrix.compiler }} | |
python -m pip install -e . | |
- name: tests | |
shell: bash -l {0} | |
run: make tests CC=${{ matrix.compiler }} | |
- name: doctests | |
shell: bash -l {0} | |
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10' && matrix.numpy-version == '1.16' | |
run: | | |
python -m pip install 'sphinx>=1.8' | |
make -C docs doctest | |
- name: Python tests | |
shell: bash -l {0} | |
run: | | |
python -m pip install pytest | |
python -m pytest -v |