-
Notifications
You must be signed in to change notification settings - Fork 105
77 lines (66 loc) · 2.33 KB
/
pytest.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
75
76
77
name: Python Unit Tests
on: [push, pull_request]
jobs:
Ubuntu-Python-Unit-Test:
name: Ubuntu Python Unit Tests
strategy:
max-parallel: 4
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
platform: [ubuntu-20.04, ubuntu-22.04]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install -y libopenblas-dev
python -m pip install pip
python -m pip install --upgrade pip
- name: Install PECOS
run: |
make libpecos VFLAG=-v WARN_AS_ERROR=True
- name: Test with pytest
run: |
make test VFLAG=-v WARN_AS_ERROR=True
AmazonLinux-Python-Unit-Test:
name: AmazonLinux Python Unit Tests
strategy:
max-parallel: 4
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
runs-on: ubuntu-latest
container: amazonlinux:2
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: |
yum -y update
yum -y groupinstall 'Development Tools'
amazon-linux-extras install epel -y
yum install openblas-devel -y
- name: Set up Python ${{ matrix.python-version }} via miniconda
run: |
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o /tmp/miniconda.sh;
bash /tmp/miniconda.sh -b -p /tmp/miniconda
export PATH=/tmp/miniconda/bin:$PATH
conda create -n "py${{ matrix.python-version }}" python=${{ matrix.python-version }} -y
source activate "py${{ matrix.python-version }}"
rm /tmp/miniconda/envs/py${{ matrix.python-version }}/compiler_compat/ld
python3 -m pip install pip
python3 -m pip install --upgrade pip
- name: Install PECOS
run: |
export PATH=/tmp/miniconda/bin:$PATH
source activate "py${{ matrix.python-version }}"
make libpecos VFLAG=-v WARN_AS_ERROR=True
- name: Test with pytest
run: |
export PATH=/tmp/miniconda/bin:$PATH
source activate "py${{ matrix.python-version }}"
make test VFLAG=-v WARN_AS_ERROR=True