Skip to content

Commit

Permalink
ci: attempt to simplify test configs
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarrison committed Feb 12, 2025
1 parent 002fc15 commit ac65eb1
Showing 1 changed file with 12 additions and 111 deletions.
123 changes: 12 additions & 111 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,96 +13,19 @@ jobs:
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
os: ["ubuntu-24.04", "macos-14"]
compiler: [gcc, clang]
python-version: ["3.9", "3.13"]
numpy-version: ["1", "2"]

exclude:
# Only run with 'clang' on OSX
- os: "macos-latest"
compiler: gcc-7
- os: "macos-latest"
compiler: gcc-9
- os: "macos-14"
compiler: gcc

# Don't use 'clang' on linux
- os: "ubuntu-20.04"
- os: "ubuntu-24.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 }}
Expand All @@ -117,31 +40,14 @@ jobs:
with:
auto-update-conda: true
auto-activate-base: false
miniconda-version: 'latest'
miniforge-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 create -q --yes -n test python=${{ matrix.python-version }} numpy=${{ matrix.numpy-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}
Expand All @@ -156,20 +62,15 @@ jobs:
echo `${{ matrix.compiler }} -dM -E - -march=native`
- name: lscpu on Linux
if: matrix.os != 'macos-latest'
if: matrix.os != 'macos-14'
run: |
lscpu
- name: sysctl machdep.cpu on OSX
if: matrix.os == 'macos-latest'
if: matrix.os == 'macos-14'
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 }}
Expand All @@ -191,7 +92,7 @@ jobs:

- name: doctests
shell: bash -l {0}
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10' && matrix.numpy-version == '1.16'
if: matrix.os == 'ubuntu-24.04' && matrix.python-version == '3.13' && matrix.numpy-version == '2'
run: |
python -m pip install 'sphinx>=1.8'
make -C docs doctest
Expand Down

0 comments on commit ac65eb1

Please sign in to comment.