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
59 changes: 59 additions & 0 deletions .github/workflows/cpp_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: C++ tests

on:
push:
paths:
- include/**
- src_core/**
- tests/**
- CMakeLists.txt
- .github/workflows/cpp_test.yml
pull_request:
paths:
- include/**
- src_core/**
- tests/**
- CMakeLists.txt
- .github/workflows/cpp_test.yml

jobs:
test-fast:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'

- name: Configure
run: cmake -B build -DCMAKE_BUILD_TYPE=Release

- name: Build
run: cmake --build build --target test_core --parallel

- name: Test
run: ctest --test-dir build --output-on-failure

test-full:
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'

- name: Configure
run: cmake -B build -DCMAKE_BUILD_TYPE=Release

- name: Build
run: cmake --build build --target test_core --parallel

- name: Test
run: ctest --test-dir build --output-on-failure
35 changes: 28 additions & 7 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,46 @@ name: Python package
on:
push:
paths:
- "py_package/**"
- ".github/workflows/python.yml"
- py_package/**
- .github/workflows/python.yml
pull_request:
paths:
- "py_package/**"
- ".github/workflows/python.yml"
- py_package/**
- .github/workflows/python.yml

jobs:
test:
test-fast:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install package
run: |
python -m pip install --upgrade pip
python -m pip install ./py_package[dev]

- name: Run tests
run: pytest py_package/tests

test-full:
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v4

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

Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/r_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: R package check

on:
push:
paths:
- R/**
- src/**
- man/**
- inst/**
- DESCRIPTION
- NAMESPACE
- Makefile
- .github/workflows/r_check.yml
pull_request:
paths:
- R/**
- src/**
- man/**
- inst/**
- DESCRIPTION
- NAMESPACE
- .github/workflows/r_check.yml

jobs:
test-fast:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
r-version: "release"

- name: Sync headers
run: make r-sync-headers

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck, any::tinytest

- uses: r-lib/actions/check-r-package@v2
with:
error-on: '"error"'

test-full:
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
r-version: "release"

- name: Sync headers
run: make r-sync-headers

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck, any::tinytest

- uses: r-lib/actions/check-r-package@v2
with:
error-on: '"error"'
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ r-doc:
Rscript -e "devtools::document()"

r-sync-headers:
mkdir -p inst/include
cp include/*.hpp inst/include/

r-build: r-sync-headers r-doc
Expand Down
1 change: 1 addition & 0 deletions src_core/MultisetMedian.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "MultisetMedian.hpp"
#include <iterator>
#include <limits>
#include <stdexcept>

MultisetMedian::MultisetMedian(std::size_t size) : window_size_(size) {
if (size <= 0) {
Expand Down
1 change: 1 addition & 0 deletions src_core/SlidingWelford.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "SlidingWelford.hpp"
#include <stdexcept>

SlidingWelford::SlidingWelford(std::size_t window_size)
: window_size_(window_size), mean_(0.0), M2_(0.0) {
Expand Down
1 change: 1 addition & 0 deletions src_core/SlidingWelfordRing.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "SlidingWelfordRing.hpp"
#include <stdexcept>

SlidingWelfordRing::SlidingWelfordRing(std::size_t window_size)
: window_size_(window_size), mean_(0.0), M2_(0.0) {
Expand Down
Loading