-
Notifications
You must be signed in to change notification settings - Fork 6
67 lines (53 loc) · 1.78 KB
/
build.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
name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
name: ${{ matrix.platform }} (${{ matrix.python-version }})
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
python-version: ["3.9"]
platform: [ubuntu-latest, macos-latest, windows-latest]
# The setup-miniconda action needs this to activate miniconda
defaults:
run:
shell: "bash -l {0}"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get conda - ${{ matrix.python-version }}
uses: conda-incubator/[email protected]
with:
miniconda-version: "latest"
auto-update-conda: true
activate-environment: test
python-version: ${{ matrix.python-version }}
channels: conda-forge
- name: Prepare
run: conda install -y pytest pytest-cov pytest-benchmark
- name: Install OpenCL (pocl)
if: matrix.platform != 'windows-latest'
run: conda install -y pocl
- name: Install OpenCL (oclgrind)
if: matrix.platform == 'windows-latest'
run: conda install -y oclgrind
- name: Build
run: |
pip install . -vvv --config-settings=cmake.define.CMAKE_PREFIX_PATH=$CONDA_PREFIX
- name: Test
if: matrix.platform == 'ubuntu-latest'
run: |
mkdir coverage && cd coverage
pytest -v --cov=pyclesperanto ../tests/ --cov-report=xml
- name: Coverage
if: matrix.platform == 'ubuntu-latest'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: ./coverage/coverage.xml
fail_ci_if_error: true # optional (default = false)