-
Notifications
You must be signed in to change notification settings - Fork 6
67 lines (61 loc) · 1.81 KB
/
macos_x86.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
# NOTE: these tests do not run the C++
# test suite. We don't do these tests
# b/c boost from brew has proven tricky
# to work with here.
name: macOS_x86
on:
pull_request:
jobs:
test_macos_x86:
name: macOS_x86
runs-on: ${{ matrix.os }}
strategy:
matrix:
python: [ 3.8, 3.9, "3.10", "3.11" ]
os: [ macos-latest ]
rust: [1.62.1]
defaults:
run:
shell: bash
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install cbindgen
uses: baptiste0928/cargo-install@v2
with:
crate: cbindgen
version: "=0.24.3"
- name: Install GSL
run: |
brew install gsl
- name: Install Python dependencies
run: |
python -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
python -m pip install setuptools wheel build
python -m pip install -r requirements/development.txt
- name: Build extension module
run: |
source venv/bin/activate
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DBUILD_PYTHON_UNIT_TESTS=ON -DDISABLE_LTO=ON
cmake --build build -j 4
- name: Manualy run setuptools_scm
run: |
source venv/bin/activate
python -m setuptools_scm
- name: Run Python tests
run: |
source venv/bin/activate
python -m pytest -n 4 tests
python -m pytest -n 2 tests_with_cpp