-
Notifications
You must be signed in to change notification settings - Fork 5
62 lines (49 loc) · 1.49 KB
/
ci.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
name: CI
on:
push:
branches:
- master
tags:
- 'v*'
pull_request:
branches:
- master
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
steps:
- uses: actions/checkout@v2
- name: Install gcc on macos
if: contains( matrix.os, 'macos')
run: brew install gcc@9 || brew upgrade gcc@9 || true
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install pytest numpy h5py scipy pandas scikit-build pybind11
pip install git+https://gitlab.com/reinholdt/polarizationsolver.git@master
- name: Configure CMake (Linux)
if: contains( matrix.os, 'ubuntu')
run: cmake -B build -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPYTHON_EXECUTABLE=$(which python) -DENABLE_PYTHON_INTERFACE=ON
- name: Configure CMake (macos)
if: contains( matrix.os, 'macos')
run: cmake -B build -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPYTHON_EXECUTABLE=$(which python) -DCMAKE_CXX_COMPILER=g++-9 -DENABLE_PYTHON_INTERFACE=ON
- name: Build CMake
run: cmake --build build --config $BUILD_TYPE
- name: Test CMake
run: |
source setup_environment.sh
py.test
- name: Build and Test Setuptools
run: |
rm -rf build
python setup.py install
pytest --pyargs cppe