-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (51 loc) · 1.8 KB
/
push_tests_mac.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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: MacOS Tests
on: [push, pull_request, workflow_dispatch]
jobs:
test-macos:
defaults:
run:
shell: bash -el {0}
name: Test CyRK on MacOS
runs-on: macos-latest
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: cyrk_test
auto-update-conda: true
python-version: ${{ matrix.python-version }}
auto-activate-base: false
- name: Conda info
shell: bash -el {0}
run: conda info
- name: install libomp
shell: bash -el {0}
run: |
brew reinstall llvm libomp
- name: Install Dependencies
shell: bash -el {0}
run: |
conda install numpy scipy cython llvm-openmp pytest
- name: Install package
shell: bash -el {0}
run: |
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
export PATH="/usr/local/opt/llvm/bin:$PATH"
export CPPFLAGS="$CPPFLAGS -Xpreprocessor -fopenmp -I/usr/local/opt/llvm/include"
export CFLAGS="$CFLAGS -I/usr/local/opt/libomp/include"
export CXXFLAGS="$CXXFLAGS -I/usr/local/opt/libomp/include"
export LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/local/opt/libomp/lib -L/usr/local/opt/libomp/lib -lomp -L/usr/local/opt/llvm/lib"
python -m pip install . -v
- name: Run pytest
shell: bash -el {0}
run: pytest --capture=sys -v Tests/