|
| 1 | +name: Build-Test-Multi-Scipy-Numpy |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: [release] |
| 5 | + pull_request: |
| 6 | + branches: [master, release] |
| 7 | + |
| 8 | +jobs: |
| 9 | + build: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + strategy: |
| 12 | + fail-fast: false |
| 13 | + matrix: |
| 14 | + numpy: ['2.0.1'] #['1.16.5', '1.18.5', '1.20.3', '1.22.4', '1.24.4', '1.26.4', '2.0.1'] |
| 15 | + scipy: ['1.14.0'] #['1.7.3', '1.8.1', '1.9.3', '1.10.1', '1.12.0', '1.14.0'] |
| 16 | + python-version: ['3.10'] #['3.7', '3.8', '3.9', '3.10'] |
| 17 | + os: [ubuntu-latest] |
| 18 | + architecture: ['x64'] |
| 19 | + include: |
| 20 | + - numpy: '1.18.5' |
| 21 | + scipy: '1.8.1' |
| 22 | + python-version: '3.8' |
| 23 | + - numpy: '1.18.5' |
| 24 | + scipy: '1.9.3' |
| 25 | + python-version: '3.8' |
| 26 | + - numpy: '1.20.3' |
| 27 | + scipy: '1.7.3' |
| 28 | + python-version: '3.8' |
| 29 | + - numpy: '1.20.3' |
| 30 | + scipy: '1.8.1' |
| 31 | + python-version: '3.8' |
| 32 | + - numpy: '1.20.3' |
| 33 | + scipy: '1.9.3' |
| 34 | + python-version: '3.8' |
| 35 | + - numpy: '1.20.3' |
| 36 | + scipy: '1.10.1' |
| 37 | + python-version: '3.8' |
| 38 | + - numpy: '1.22.4' |
| 39 | + scipy: '1.7.3' |
| 40 | + python-version: '3.8' |
| 41 | + - numpy: '1.22.4' |
| 42 | + scipy: '1.9.3' |
| 43 | + python-version: '3.8' |
| 44 | + - numpy: '1.22.4' |
| 45 | + scipy: '1.10.1' |
| 46 | + python-version: '3.8' |
| 47 | + - numpy: '1.24.4' |
| 48 | + scipy: '1.8.1' |
| 49 | + python-version: '3.8' |
| 50 | + - numpy: '1.24.4' |
| 51 | + scipy: '1.9.3' |
| 52 | + python-version: '3.10' |
| 53 | + - numpy: '1.24.4' |
| 54 | + scipy: '1.10.1' |
| 55 | + python-version: '3.8' |
| 56 | + - numpy: '1.24.4' |
| 57 | + scipy: '1.12.0' |
| 58 | + python-version: '3.9' |
| 59 | + - numpy: '1.26.4' |
| 60 | + scipy: '1.10.1' |
| 61 | + python-version: '3.9' |
| 62 | + - numpy: '1.26.4' |
| 63 | + scipy: '1.12.0' |
| 64 | + python-version: '3.9' |
| 65 | + - numpy: '1.26.4' |
| 66 | + scipy: '1.14.0' |
| 67 | + python-version: '3.10' |
| 68 | + - numpy: '2.0.1' |
| 69 | + scipy: '1.14.0' |
| 70 | + python-version: '3.10' |
| 71 | + steps: |
| 72 | + - uses: actions/checkout@v4 |
| 73 | + - name: Set up Python ${{ matrix.python-version }} ${{ matrix.architecture }} |
| 74 | + uses: actions/setup-python@v5 |
| 75 | + with: |
| 76 | + python-version: ${{ matrix.python-version }} |
| 77 | + architecture: ${{ matrix.architecture }} |
| 78 | + - name: cache Linux |
| 79 | + uses: actions/cache@v4 |
| 80 | + if: startsWith(runner.os, 'Linux') |
| 81 | + with: |
| 82 | + path: ~/.cache/pip |
| 83 | + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements_test.txt') }} |
| 84 | + restore-keys: | |
| 85 | + ${{ runner.os }}-${{ runner.architecture }}-${{ runner.python-version }}pip- |
| 86 | + - name: Install Ubuntu dependencies |
| 87 | + if: startsWith(runner.os, 'Linux') |
| 88 | + run: | |
| 89 | + # Taken from scipy |
| 90 | + sudo apt-get update |
| 91 | + sudo apt-get install -y libopenblas-dev libatlas-base-dev liblapack-dev gfortran libgmp-dev libmpfr-dev libsuitesparse-dev ccache libmpc-dev |
| 92 | + |
| 93 | + - name: Install dependencies |
| 94 | + run: | |
| 95 | + python -c "import platform; print(platform.platform()); print(platform.architecture())" |
| 96 | + python -m pip install --upgrade pip |
| 97 | + python -m pip install wheel |
| 98 | + pip install -r requirements_test.txt |
| 99 | + pip install numpy==${{ matrix.numpy }} scipy==${{ matrix.scipy }} |
| 100 | + - name: Add numba |
| 101 | + if: ${{ matrix.python-version == '3.8' || matrix.python-version == '3.9' || matrix.python-version == '3.10' || matrix.python-version == '3.11' || matrix.python-version == '3.12' }} |
| 102 | + run: | |
| 103 | + pip install numba |
| 104 | + - name: Install thermo |
| 105 | + run: | |
| 106 | + pip install . |
| 107 | + - name: Generate Files |
| 108 | + if: ${{ matrix.python-version == '3.8' || matrix.python-version == '3.9' || matrix.python-version == '3.10' || matrix.python-version == '3.11' || matrix.python-version == '3.12' || matrix.python-version == 'pypy3.9' }} |
| 109 | + run: | |
| 110 | + python dev/dump_UNIFAC_assignments_to_sqlite.py |
| 111 | + - name: Uninstall thermo |
| 112 | + run: | |
| 113 | + pip uninstall -y thermo |
| 114 | + - name: Test with pytest |
| 115 | + run: | |
| 116 | + pytest . -v --cov-report html --cov=thermo --cov-report term-missing -m "not online and not sympy and not numba and not CoolProp and not fuzz and not deprecated and not slow" |
| 117 | + env: |
| 118 | + COVERALLS_REPO_TOKEN: ${{ secrets.coveralls }} |
| 119 | + COVERALLS_PARALLEL: true |
| 120 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments