Update to [email protected] #541
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.11"] | |
platform: [ubuntu-latest, macos-latest] #, windows-latest] | |
defaults: | |
run: | |
shell: "bash -l {0}" | |
steps: | |
- name: Checkout | |
id: checkout | |
uses: actions/checkout@v4 | |
- name: Get conda - ${{ matrix.python-version }} | |
id: get-conda | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
miniforge-version: latest | |
activate-environment: test | |
use-mamba: true | |
- name: Dependencies | |
id: install-dependencies | |
run: | | |
mamba install -y pytest pytest-cov pytest-benchmark scikit-image | |
- name: Install OpenCL (pocl) | |
id: install-pocl | |
if: matrix.platform != 'windows-latest' | |
run: | | |
mamba install -y pocl | |
- name: Install OpenCL (oclgrind) | |
id: install-oclgrind | |
if: matrix.platform == 'windows-latest' | |
run: | | |
mamba install -y oclgrind | |
- name: Build | |
id: build | |
run: | | |
pip install . -vvv --config-settings=cmake.define.CMAKE_PREFIX_PATH=$CONDA_PREFIX | |
- name: Test | |
id: test | |
if: matrix.platform == 'ubuntu-latest' | |
run: | | |
mkdir coverage && cd coverage | |
pytest --cov=pyclesperanto ../tests/ --cov-report=xml | |
- name: Coverage | |
id: coverage | |
if: matrix.platform == 'ubuntu-latest' && github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos | |
files: ./coverage/coverage.xml | |
fail_ci_if_error: true # optional (default = false) |