Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/validate-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# 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: Compile and test C++

on:
push:
branches: [ master ]
pull_request:
types: [edited, submitted]

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
#os: [ubuntu-20.04, ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-20.04, ubuntu-latest]
python-version: ["3.10"]

steps:
- name: Fetch sources
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip

- name: Install gcc toolchain
run: >-
sudo apt-get install
build-essential
libopenblas-dev
if: startsWith(matrix.os, 'ubuntu') == true

- name: Install Python dependencies
run: |
pip install --upgrade uv
uv pip install --system meson ninja

- name: Cache 3rd party C++ projects
uses: actions/cache@v3
with:
key: ${{ runner.os }}-meson-cache
path: 3rdparty/packagecache/

- name: Resolve C++ build dependencies (non-Windows)
run: meson setup build/
if: startsWith(matrix.os, 'window') == false

#- name: Resolve C++ build dependencies (msvc toolchain)
# run: meson setup --vsenv build/
# if: startsWith(matrix.os, 'window') == true

- name: Build everything
#run: meson compile -C build/
run: ninja -C build/ all

- name: Test everything
#run: meson test -C build/
run: ninja -C build/ test
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
# C++17 port of the MicroscPSF-Matlab project

[![Compile and test C++](https://github.com/MicroscPSF/MicroscPSF-Cpp/actions/workflows/validate-build.yml/badge.svg)](https://github.com/MicroscPSF/MicroscPSF-Cpp/actions/workflows/validate-build.yml)

## Status

Currently, this work is a *very* early work in progress. Refer to https://github.com/MicroscPSF/MicroscPSF-Matlab
Currently, this work is a *very* early work in progress. Refer to
https://github.com/MicroscPSF/MicroscPSF-Matlab for the reference implementation.

## Quick start

### Ubuntu/Linux

Install the compiler toolchain:
Install the compiler toolchain and the BLAS/LAPACK library:

```bash
sudo apt install build-essentials

# Use Openblas or Atlas or the original BLAS/LAPACK.
sudo apt install libopenblas-dev
```

Install Meson the build system:
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Placeholder config to satisfy the Github CI runner.
# To be converted to pyproject.toml when we expose the Python bindings.
Loading