Skip to content

Redesign core

Redesign core #1484

Workflow file for this run

name: CI
on:
push:
branches: [main, update-**, redesign_core]
pull_request:
branches: ["**"]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
os: [macos-13, ubuntu-latest]
mpi: ["openmpi"] # [ 'mpich', 'openmpi', 'intelmpi']
include:
- os: macos-13
path: ~/Library/Caches/pip
- os: ubuntu-latest
path: ~/.cache/pip
#- os: windows-latest
# path: ~\AppData\Local\pip\Cache
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
# - uses: mpi4py/setup-mpi@v1
# with:
# mpi: ${{ matrix.mpi }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
virtualenvs-path: .venv
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --all-extras --with=dev,algorithmExtension,sortingExtension #,mpi
- uses: FedericoCarboni/setup-ffmpeg@v3
id: setup-ffmpeg
with:
# like "6.1.0". At the moment semver specifiers (i.e. >=6.1.0) are supported
# only on Windows, on other platforms they are allowed but version is matched
# exactly regardless.
ffmpeg-version: release
# Linking type of the binaries. Use "shared" to download shared binaries and
# "static" for statically linked ones. Shared builds are currently only available
# for windows releases. Defaults to "static"
linking-type: static
# As of version 3 of this action, builds are no longer downloaded from GitHub
# except on Windows: https://github.com/GyanD/codexffmpeg/releases.
github-token: ${{ github.server_url == 'https://github.com' && github.token || '' }}
# Test MiV-OS using pytest
- name: Run pytests
if: always()
run: |
source .venv/bin/activate
make test
- name: Run mypy
if: always()
run: |
source .venv/bin/activate
make mypy
- name: Run formatting check
if: always()
run: |
source .venv/bin/activate
make check-codestyle
# Upload coverage to Codecov (use python 3.10 ubuntu-latest)
- name: Upload coverage to Codecov (only on 3.10 ubuntu-latest)
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10' }}
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: OS,PYTHON
fail_ci_if_error: true
flags: unittests
name: codecov-umbrella
verbose: true
file: ./coverage.xml