-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (68 loc) · 2.67 KB
/
ci-ubuntu.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# This workflow will install Python dependencies, run tests with a variety of Python versions
name: CI-Ubuntu
on:
push:
branches: [ '*' ]
paths-ignore: # Skip CI in this case
- README.md
pull_request:
branches: [ master ]
schedule:
# * is a special character in YAML so you have to quote this string
# run at 02:01 on the 10th of each month
- cron: '1 2 10 * *'
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
EASTEREIG_USE_FPOLY: ['True', 'False']
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3.1.0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy setuptools wheel
# - name: Lint with flake8
# run: |
# pip install flake8
# # stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Install the package
env:
EASTEREIG_USE_FPOLY: ${{ matrix.EASTEREIG_USE_FPOLY }}
run: |
pip install -e .
# Check if .so is there
ls -lrt eastereig/fpoly
- name: Run test without petsc
run: |
python -m eastereig
python -c "from eastereig.fpoly import polyvalnd"
# # Since pip 23.1 trouble with pip installation of petsc4py
# - name: Install petsc and their dependencies (support for parallel matrices)
# run: |
# sudo apt update --yes
# # On 22.04 fails with mpich, but works on 20.04
# # sudo apt-get install mpich libmpich-dev --yes
# sudo apt install -y -q openmpi-bin libopenmpi-dev
# pip install mpi4py
# export PETSC_CONFIGURE_OPTIONS='--download-f2cblaslapack=1 --download-scalapack --download-mumps --with-scalar-type=complex'
# pip install petsc petsc4py
# pip install slepc slepc4py
# - name: Run test with petsc
# run: |
# mpiexec --version
# # No mpi call (check that it breaks nothing)
# python -m eastereig
# # Explicit mpi call
# mpiexec -n 2 python eastereig/examples/WGimpedance_petsc.py