Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mkn #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
21 changes: 13 additions & 8 deletions .github/workflows/build_nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
branches: [ master ]

env:
KLOG: 3
TICK_DEBUG: 0


Expand All @@ -20,25 +21,29 @@ jobs:
fail-fast: false
max-parallel: 4
matrix:
python-version: ['3.7']
python-version: ['3.7', '3.10']

steps:
- uses: actions/checkout@v2
with:
submodules: true

- name: install swig
run: |
git clone https://github.com/swig/swig -b rel-4.0.2 swig
cd swig && ./autogen.sh && ./configure --without-pcre
make && sudo make install && cd .. && rm -rf swig
- run: |
swig -version

- uses: actions/setup-python@v1
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64

- run: |
python3 -m pip install wheel pip --upgrade
python3 -m pip install -r requirements.txt
python3 setup.py build_ext --inplace cpptest pytest

- run: |
curl -Lo mkn https://github.com/mkn/mkn/releases/download/latest/mkn_nix
chmod +x mkn
sudo cp mkn /usr/bin
./sh/mkn.sh
./sh/gtest.sh
python3 setup.py pytest
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
branches: [ master ]

env:
KLOG: 3
TICK_DEBUG: 0
TICK_WERROR: 0

Expand All @@ -20,22 +21,16 @@ jobs:
fail-fast: false
max-parallel: 4
matrix:
python-version: ['3.7', '3.8', '3.9']

python-version: ['3.10']
steps:
- uses: actions/checkout@v2
with:
submodules: true

- name: install swig
run: |
brew update
brew install automake m4
git clone https://github.com/swig/swig -b rel-4.0.2 swig
cd swig && ./autogen.sh && ./configure --without-pcre
make && make install && cd .. && rm -rf swigkey
- run: |
swig -version

- uses: actions/setup-python@v1
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
Expand All @@ -44,6 +39,11 @@ jobs:
pip install pip --upgrade
pip install wheel
pip install -r requirements.txt
python setup.py build_ext --inplace cpptest
python -m unittest discover -v . "*_test.py"

- run: |
curl -Lo mkn https://github.com/mkn/mkn/releases/download/latest/mkn_osx
chmod +x mkn
export PATH="$PWD:$PATH"
./sh/mkn.sh
./sh/gtest.sh
python -m unittest discover -v . "*_test.py"
32 changes: 25 additions & 7 deletions .github/workflows/build_win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ on:
branches: [ master ]

env:
KLOG: 3
TICK_DEBUG: 0
# TICK_CMAKE_GENERATOR: Visual Studio 16 2022
MKN_CL_PREFERRED: 1

jobs:
build:
Expand All @@ -20,24 +21,41 @@ jobs:
fail-fast: false
max-parallel: 4
matrix:
python-version: ['3.9']

python-version: ['3.9', '3.10']
steps:
- uses: actions/checkout@v2
with:
submodules: true

- uses: actions/setup-python@v1
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64

# setup MSVC compiler
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64

- run: |
swig -version
pip install pip --upgrade
pip install wheel
pip install -r requirements.txt
python setup.py build_ext --inplace
python -m unittest discover -v . "*_test.py"


- name: Build
shell: cmd
run: | # /bin/link interferes with cl/link.exe
bash -c 'rm /bin/link'
bash -c 'curl -Lo mkn.exe https://github.com/mkn/mkn/releases/download/latest/mkn.exe'
bash -c 'set -ex; export PATH="$PWD:$PATH" KLOG=3; ./sh/mkn.sh'

- name: cpp_test
shell: cmd
run: |
bash -c 'set -ex; export PATH="$PWD:$PATH" KLOG=3; ./sh/gtest.sh'

- name: py_test
shell: cmd
run: |
bash -c 'PYTHONPATH=$PWD python3 -m unittest discover -v . "*_test.py"'
7 changes: 6 additions & 1 deletion .github/workflows/pythonpublish-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
submodules: true

- run: |
git clone https://github.com/swig/swig -b rel-4.0.0 swig
git clone https://github.com/swig/swig -b rel-4.0.2 swig
cd swig && ./autogen.sh && ./configure --without-pcre
make && make install && cd .. && rm -rf swig

Expand All @@ -38,6 +38,11 @@ jobs:
$PYTHON39/bin/python -m pip install wheel -r requirements.txt
$PYTHON39/bin/python setup.py bdist_wheel

- run: |
$PYTHON310/bin/python -m pip install twine pip --upgrade
$PYTHON310/bin/python -m pip install wheel -r requirements.txt
$PYTHON310/bin/python setup.py bdist_wheel

- run: for wheel in $(ls dist); do auditwheel repair dist/$wheel; done

- env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pythonpublish-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: ['3.7', '3.8', '3.9']
python-version: ['3.7', '3.8', '3.9', '3.10']
name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
with:
submodules: true

- uses: actions/setup-python@v1
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64

- run: |
brew update
brew install automake m4
git clone https://github.com/swig/swig -b rel-4.0.0 swig
git clone https://github.com/swig/swig -b rel-4.0.2 swig
cd swig && ./autogen.sh && ./configure --without-pcre
make && make install && cd .. && rm -rf swigkey

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pythonpublish-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: ['3.7', '3.8', '3.9']
python-version: ['3.7', '3.8', '3.9', '3.10']
name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
with:
submodules: true

- uses: actions/setup-python@v1
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
Expand Down
48 changes: 0 additions & 48 deletions .travis.yml.off

This file was deleted.

47 changes: 0 additions & 47 deletions appveyor.yml

This file was deleted.

1 change: 0 additions & 1 deletion examples/plot_2d_linear_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
from sklearn.metrics import mean_squared_error, r2_score
from sklearn.utils import shuffle
from sklearn.datasets import load_boston
from mpl_toolkits.mplot3d import axes3d
from matplotlib import cm

# Load the Boston Housing Dataset
Expand Down
1 change: 0 additions & 1 deletion examples/plot_conv_sccs_cv_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
and compare the estimated coefficients to the relative incidences used for
the simulation.
"""
from time import time
import numpy as np
from scipy.sparse import csr_matrix, hstack
from matplotlib import cm
Expand Down
6 changes: 3 additions & 3 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 3.7)
project(tick)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -ffast-math")
Expand Down Expand Up @@ -95,8 +95,8 @@ if (${GTEST_FOUND})
message(STATUS "Testing in C++ enabled")

find_package(Threads REQUIRED)
find_package(PythonInterp 3 REQUIRED)
find_package(PythonLibs 3 REQUIRED)
find_package(PythonInterp 3.7 REQUIRED)
find_package(PythonLibs 3.7 REQUIRED)

include_directories(${GTEST_INCLUDE_DIRS})

Expand Down
4 changes: 2 additions & 2 deletions lib/cpp-test/array/array_gtest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class ArrayTest : public ::testing::Test {
typedef ::testing::Types<ArrayFloat, ArrayDouble, ArrayShort, ArrayUShort,
ArrayInt, ArrayUInt, ArrayLong, ArrayULong>
MyArrayTypes;
TYPED_TEST_CASE(ArrayTest, MyArrayTypes);
TYPED_TEST_SUITE(ArrayTest, MyArrayTypes);

template <typename ArrType>
class Array2dTest : public ::testing::Test {
Expand All @@ -49,7 +49,7 @@ typedef ::testing::Types<ArrayFloat2d, ArrayDouble2d, ArrayShort2d,
ArrayUShort2d, ArrayInt2d, ArrayUInt2d, ArrayLong2d,
ArrayULong2d>
MyArray2dTypes;
TYPED_TEST_CASE(Array2dTest, MyArray2dTypes);
TYPED_TEST_SUITE(Array2dTest, MyArray2dTypes);

TYPED_TEST(ArrayTest, InitToZero) {
TypeParam arr{TICK_TEST_DATA_SIZE};
Expand Down
2 changes: 1 addition & 1 deletion lib/cpp-test/array/atomic_array_gtest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class AtomicArrayTest : public ::testing::Test {
};

typedef ::testing::Types<Array<float>, Array<double>> MyArrayTypes;
TYPED_TEST_CASE(AtomicArrayTest, MyArrayTypes);
TYPED_TEST_SUITE(AtomicArrayTest, MyArrayTypes);

TYPED_TEST(AtomicArrayTest, InitToZero) {
TypeParam arr{TICK_TEST_DATA_SIZE};
Expand Down
2 changes: 1 addition & 1 deletion lib/cpp-test/array/linear_system_gtest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class LinearSystemTest : public ::testing::Test {
};

typedef ::testing::Types<ArrayFloat, ArrayDouble> MyArrayTypes;
TYPED_TEST_CASE(LinearSystemTest, MyArrayTypes);
TYPED_TEST_SUITE(LinearSystemTest, MyArrayTypes);



Expand Down
2 changes: 1 addition & 1 deletion lib/cpp-test/base/utils_gtest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ TEST_P(ParallelTest, MapArray) {
}
}

INSTANTIATE_TEST_CASE_P(AllParallelTests, ParallelTest,
INSTANTIATE_TEST_SUITE_P(AllParallelTests, ParallelTest,
::testing::Values(1, 2, 4, 8, 16));

TEST(ParallelTest, CPUCount) {
Expand Down
Loading