diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 79763f2e..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,17 +0,0 @@ -version: 2 - -jobs: - bionic_gcc7_conda: - docker: - - image: circleci/buildpack-deps:bionic - steps: - - checkout - - run: - name: Build and test - command: bash ./tools/circleci_bionic_gcc7_conda.sh - -workflows: - version: 2 - all_builds: - jobs: - - bionic_gcc7_conda diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c34a84b7..5dda2a9c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,9 +16,30 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" - conda_release: + ubuntu-debug: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Build - run: bash tools/gha_conda_release.sh + run: bash tools/gha-ubuntu-debug.sh + osx-debug: + runs-on: macos-10.15 + steps: + - uses: actions/checkout@v2 + - name: Build + run: bash tools/gha-osx-debug.sh + windows-release: + runs-on: windows-2019 + steps: + - uses: actions/checkout@v2 + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.0.2 + - uses: conda-incubator/setup-miniconda@v2 + with: + auto-update-conda: true + python-version: 3.8 + channels: conda-forge + channel-priority: strict + - name: Build + run: .\tools\gha-windows-release.ps1 + shell: powershell \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index f49e689d..2496fffc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,20 +17,9 @@ matrix: sudo: required services: - docker - - env: AUDI_BUILD="manylinux64Py36" DOCKER_IMAGE="pagmo2/manylinux2010_x86_64_with_deps" - sudo: required - services: - - docker - - env: AUDI_BUILD="OSXDebug" AUDI_BUILD_TYPE="Debug" - os: osx - osx_image: xcode9.4 - - env: AUDI_BUILD="OSXRelease" AUDI_BUILD_TYPE="Release" - os: osx - osx_image: xcode9.4 script: - - if [[ "${AUDI_BUILD}" == OSX* ]]; then bash tools/travis_osx.sh; fi - if [[ "${AUDI_BUILD}" == manylinux* ]]; then bash tools/install_travis.sh; fi notifications: diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 46752c52..00000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,109 +0,0 @@ -trigger: - - master - -jobs: - - - job: 'vs2015_clang_release' - pool: - # NOTE: this is the same image currently used by conda. - # Like conda, we'll be using vs2015, not vs2017. If we - # try to use the vs2015 image, we get some DLL errors - # related to dbgeng, which *I think* are due to the - # fact that the vs2015 image is using an older version of - # the OS. - vmImage: 'vs2017-win2016' - timeoutInMinutes: 360 - steps: - - # Install Chocolatey (https://chocolatey.org/install#install-with-powershellexe) - - powershell: | - Set-ExecutionPolicy Bypass -Scope Process -Force - iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) - Write-Host "##vso[task.setvariable variable=PATH]$env:PATH" - choco --version - displayName: "Install Chocolatey" - - # Install Miniconda - - script: | - choco install miniconda3 --yes - set PATH=C:\tools\miniconda3\Scripts;C:\tools\miniconda3;C:\tools\miniconda3\Library\bin;%PATH% - echo '##vso[task.setvariable variable=PATH]%PATH%' - set LIB=C:\tools\miniconda3\Library\lib;%LIB% - echo '##vso[task.setvariable variable=LIB]%LIB%' - conda --version - displayName: "Install Miniconda" - - # Configure Miniconda - - script: | - conda config --set always_yes yes - conda config --add channels conda-forge - conda config --set channel_priority strict - conda info - displayName: "Configure Miniconda" - - # Create conda enviroment - # Note: conda activate doesn't work here, because it creates a new shell! - - script: | - conda install cmake ^ - clangdev ^ - ninja ^ - eigen ^ - obake-devel ^ - mppp ^ - boost-cpp ^ - boost ^ - python=3.7 - conda list - displayName: "Install conda packages" - - # Install pybind11. - - script: | - setlocal EnableDelayedExpansion - git clone https://github.com/pybind/pybind11.git - cd pybind11 - git checkout 4f72ef846fe8453596230ac285eeaa0ce3278bb4 - mkdir build - cd build - cmake .. -G "Visual Studio 15 2017" -A x64 ^ - -DCMAKE_PREFIX_PATH=C:\tools\miniconda3\Library ^ - -DCMAKE_INSTALL_PREFIX=C:\tools\miniconda3\Library ^ - -DPYBIND11_TEST=NO - cmake --build . --config Release --target install - cd .. - cd .. - displayName: "Install pybind11" - - # Configure, build and test. - - script: | - setlocal EnableDelayedExpansion - call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64 - mkdir build - cd build - cmake .. -G Ninja ^ - -DCMAKE_BUILD_TYPE=Release ^ - -DCMAKE_C_COMPILER=clang-cl ^ - -DCMAKE_CXX_COMPILER=clang-cl ^ - -DBoost_NO_BOOST_CMAKE=ON ^ - -DCMAKE_PREFIX_PATH=C:\tools\miniconda3\Library ^ - -DCMAKE_INSTALL_PREFIX=C:\tools\miniconda3\Library ^ - -DAUDI_BUILD_AUDI=yes ^ - -DAUDI_BUILD_TESTS=yes - cmake --build . -- -v - ctest -j4 -V . - cmake --build . --target install - cd .. - mkdir build_pyaudi - cd build_pyaudi - cmake .. -G Ninja ^ - -DCMAKE_BUILD_TYPE=Release ^ - -DCMAKE_C_COMPILER=clang-cl ^ - -DCMAKE_CXX_COMPILER=clang-cl ^ - -DBoost_NO_BOOST_CMAKE=ON ^ - -DCMAKE_PREFIX_PATH=C:\tools\miniconda3\Library ^ - -DCMAKE_INSTALL_PREFIX=C:\tools\miniconda3\Library ^ - -DAUDI_BUILD_AUDI=no ^ - -DAUDI_BUILD_PYAUDI=yes - cmake --build . -- -v - cmake --build . --target install - python -c "import pyaudi.test; pyaudi.test.run_test_suite()" - displayName: "Configure, build and test" diff --git a/include/audi/gdual.hpp b/include/audi/gdual.hpp index 1906fadf..65f1154b 100644 --- a/include/audi/gdual.hpp +++ b/include/audi/gdual.hpp @@ -70,7 +70,7 @@ namespace audi * @note The class can be instantiated with any type that is suitable to be a coefficient in a obake polynomial. * */ -template > +template > class gdual { // Static checks. diff --git a/tests/division_perf.cpp b/tests/division_perf.cpp index 717af54e..899fd049 100644 --- a/tests/division_perf.cpp +++ b/tests/division_perf.cpp @@ -6,8 +6,6 @@ #include -#include - #include using namespace audi; @@ -33,10 +31,6 @@ void scalable_div(int m, int n) BOOST_AUTO_TEST_CASE(division_performance) { - boost::optional tinit; - if (boost::unit_test::framework::master_test_suite().argc > 1) { - tinit.emplace(boost::lexical_cast(boost::unit_test::framework::master_test_suite().argv[1u])); - } std::cout << "Testing division of (x1^2 + ... + xn^2) / (x1 * (x1 + x2 + .. + xn) ): " << std::endl; for (auto m = 5; m < 10; ++m) { for (auto n = 5; n < 12; ++n) { diff --git a/tests/functions_from_d_perf.cpp b/tests/functions_from_d_perf.cpp index 5b1a3d36..2249213f 100644 --- a/tests/functions_from_d_perf.cpp +++ b/tests/functions_from_d_perf.cpp @@ -10,8 +10,6 @@ #include -#include - using namespace audi; void scalable_test(int m, int n, gdual (*func)(const gdual &d), double param) @@ -33,10 +31,6 @@ void scalable_test(int m, int n, gdual (*func)(const gdual &d), BOOST_AUTO_TEST_CASE(functions_from_derivative_vs_nilpotency) { - boost::optional tinit; - if (boost::unit_test::framework::master_test_suite().argc > 1) { - tinit.emplace(boost::lexical_cast(boost::unit_test::framework::master_test_suite().argv[1u])); - } unsigned int low = 9, high = 10; diff --git a/tests/gdual_d.cpp b/tests/gdual_d.cpp index 34c45ce0..3e83e3c2 100644 --- a/tests/gdual_d.cpp +++ b/tests/gdual_d.cpp @@ -272,7 +272,7 @@ BOOST_AUTO_TEST_CASE(subs) // Testing the substitution symbol->value. The Taylor expansion of sin(0+dx) evaluated in dx=1 is // compared against the value of sin(1) { - gdual> x(0, "x", 100); + gdual> x(0, "x", 100); auto sx = sin(x); auto sx1 = sx.subs("dx", 1.); std::cout << sx << std::endl; diff --git a/tests/invert_map.cpp b/tests/invert_map.cpp index 21c842ff..8a0594f6 100644 --- a/tests/invert_map.cpp +++ b/tests/invert_map.cpp @@ -22,8 +22,8 @@ BOOST_AUTO_TEST_CASE(computations) { // We invert (around 0) asin(x), hence checking to get the MacLaurin series // for sin(x) = dx - dx^3/3! + dx^5/5! + H.O.T. - gdual> x(0, "x", 5); - std::vector>> map, map_inv; + gdual> x(0, "x", 5); + std::vector>> map, map_inv; map.push_back(asin(x)); map_inv = invert_map(map); BOOST_CHECK_CLOSE(map_inv[0].constant_cf(), 0, 1e-12); // constant @@ -36,8 +36,8 @@ BOOST_AUTO_TEST_CASE(computations) { // We invert (around 0.1) some complex mathematical formula and check that its inversion // computes correctly - gdual> x(0.1, "x", 10); - std::vector>> map, map_inv; + gdual> x(0.1, "x", 10); + std::vector>> map, map_inv; auto p0 = x * 3. * sin(x / 2.) + x + 1. * pow(1 + x, cos(x * 3)); map.push_back(p0); map_inv = invert_map(map); @@ -50,44 +50,44 @@ BOOST_AUTO_TEST_CASE(computations) { // We invert a 2-D map in x,y (polynomial) and check that the map composition // is the identity f(g(x)) = x (since no constant_cf is present) - gdual> x(1., "x", 4); - gdual> y(1., "y", 4); - std::vector>> map, map_inv; + gdual> x(1., "x", 4); + gdual> y(1., "y", 4); + std::vector>> map, map_inv; map.push_back(x + y + x * x * y - 3.); map.push_back(x - y + y * y * x - 1.); map_inv = invert_map(map); auto I = map_inv & map; - BOOST_CHECK(EPSILON_COMPARE(I[0], gdual>(0, "x", 4), 1e-10)); - BOOST_CHECK(EPSILON_COMPARE(I[1], gdual>(0, "y", 4), 1e-10)); + BOOST_CHECK(EPSILON_COMPARE(I[0], gdual>(0, "x", 4), 1e-10)); + BOOST_CHECK(EPSILON_COMPARE(I[1], gdual>(0, "y", 4), 1e-10)); } { // We invert a 2-D map in x,y and check that the map composition // is the identity f(g(x)) = x (since no constant_cf is present) - gdual> x(1., "x", 4); - gdual> y(1., "y", 4); - std::vector>> map, map_inv; + gdual> x(1., "x", 4); + gdual> y(1., "y", 4); + std::vector>> map, map_inv; map.push_back(sin(x * y - 1.) + x + y - 2.); map.push_back(cos(x * y * y - 1) - y + x - 1.); map_inv = invert_map(map); auto I = map_inv & map; - BOOST_CHECK(EPSILON_COMPARE(I[0], gdual>(0, "x", 4), 1e-10)); - BOOST_CHECK(EPSILON_COMPARE(I[1], gdual>(0, "y", 4), 1e-10)); + BOOST_CHECK(EPSILON_COMPARE(I[0], gdual>(0, "x", 4), 1e-10)); + BOOST_CHECK(EPSILON_COMPARE(I[1], gdual>(0, "y", 4), 1e-10)); } // 3 - D cases { // We invert a 3-D map in x,y,z and check that the map composition // is the identity f(g(x)) = x (since no constant_cf is present) - gdual> x(1., "x", 4); - gdual> y(1., "y", 4); - gdual> z(1., "z", 4); - std::vector>> map, map_inv; + gdual> x(1., "x", 4); + gdual> y(1., "y", 4); + gdual> z(1., "z", 4); + std::vector>> map, map_inv; map.push_back(x * y * z + x * y - 2 * z); map.push_back(y * z * x * x + z * y - z - y); map.push_back(x - 2 * z + cos(x * y * z - 1.)); map_inv = invert_map(map); auto I = map_inv & map; - BOOST_CHECK(EPSILON_COMPARE(I[0], gdual>(0, "x", 4), 1e-10)); - BOOST_CHECK(EPSILON_COMPARE(I[1], gdual>(0, "y", 4), 1e-10)); - BOOST_CHECK(EPSILON_COMPARE(I[2], gdual>(0, "z", 4), 1e-10)); + BOOST_CHECK(EPSILON_COMPARE(I[0], gdual>(0, "x", 4), 1e-10)); + BOOST_CHECK(EPSILON_COMPARE(I[1], gdual>(0, "y", 4), 1e-10)); + BOOST_CHECK(EPSILON_COMPARE(I[2], gdual>(0, "z", 4), 1e-10)); } } diff --git a/tests/multiplication_perf.cpp b/tests/multiplication_perf.cpp index 885aba7e..bda940d9 100644 --- a/tests/multiplication_perf.cpp +++ b/tests/multiplication_perf.cpp @@ -5,8 +5,6 @@ #include #include -#include - #include #include @@ -15,7 +13,7 @@ #include using namespace audi; -using gdual_d = gdual>; +using gdual_d = gdual>; void scalable_mul(unsigned int m, unsigned int n) { @@ -44,10 +42,6 @@ void scalable_mul(unsigned int m, unsigned int n) BOOST_AUTO_TEST_CASE(multiplication_performance) { - boost::optional tinit; - if (boost::unit_test::framework::master_test_suite().argc > 1) { - tinit.emplace(boost::lexical_cast(boost::unit_test::framework::master_test_suite().argv[1u])); - } std::cout << "Testing multiplication of (1 + x1 + .. + xn)^m * (1 - x1 - .. - xn)^m: " << std::endl; for (auto m = 10u; m < 11u; ++m) { for (auto n = 10u; n < 11u; ++n) { diff --git a/tests/trigonometry_perf.cpp b/tests/trigonometry_perf.cpp index b88bcc85..f9bd961e 100644 --- a/tests/trigonometry_perf.cpp +++ b/tests/trigonometry_perf.cpp @@ -7,8 +7,6 @@ #include -#include - #include #include @@ -85,11 +83,6 @@ void scalable_test_sin_over_cos(int m, int n) BOOST_AUTO_TEST_CASE(trigonometry_perf) { - boost::optional tinit; - if (boost::unit_test::framework::master_test_suite().argc > 1) { - tinit.emplace(boost::lexical_cast(boost::unit_test::framework::master_test_suite().argv[1u])); - } - unsigned int low = 9, high = 10; // sin and cos diff --git a/tools/circleci_bionic_gcc7_conda.sh b/tools/circleci_bionic_gcc7_conda.sh deleted file mode 100644 index 8db13763..00000000 --- a/tools/circleci_bionic_gcc7_conda.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/env bash - -# Echo each command -set -x - -# Exit on error. -set -e - -# Core deps. -sudo apt-get install build-essential - -wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; -export deps_dir=$HOME/local -export PATH="$HOME/miniconda/bin:$PATH" -bash miniconda.sh -b -p $HOME/miniconda -conda config --add channels conda-forge --force - -conda_pkgs="cmake>=3.3 eigen obake-devel mppp boost boost-cpp python=3.7" - -conda create -q -p $deps_dir -y $conda_pkgs -source activate $deps_dir - -export deps_dir=$HOME/local -export PATH="$HOME/miniconda/bin:$PATH" -export PATH="$deps_dir/bin:$PATH" - -# Create the build dir and cd into it. -mkdir build - -# Install Pybind11 (making sure its the same used in our pipeline) -export PYAUDI_BUILD_DIR=`pwd` -git clone https://github.com/pybind/pybind11.git -cd pybind11 -git checkout 4f72ef846fe8453596230ac285eeaa0ce3278bb4 -mkdir build -cd build -pwd -cmake \ - -DPYBIND11_TEST=NO \ - -DCMAKE_INSTALL_PREFIX=$PYAUDI_BUILD_DIR \ - -DCMAKE_PREFIX_PATH=$PYAUDI_BUILD_DIR \ - .. -make install -cd ../.. - -# Install audi -cd build -cmake \ - -DBoost_NO_BOOST_CMAKE=ON \ - -DCMAKE_INSTALL_PREFIX=$deps_dir \ - -DCMAKE_PREFIX_PATH=$deps_dir \ - -DCMAKE_BUILD_TYPE=Debug \ - -DAUDI_BUILD_AUDI=yes \ - -DAUDI_BUILD_TESTS=yes \ - .. -make -j2 VERBOSE=1 install -ctest -j4 -V -cd .. - -# Install pyaudi -mkdir build_pyaudi -cd build_pyaudi -cmake \ - -DBoost_NO_BOOST_CMAKE=ON \ - -DCMAKE_INSTALL_PREFIX=$deps_dir \ - -DCMAKE_PREFIX_PATH=$deps_dir \ - -DCMAKE_BUILD_TYPE=Debug \ - -DAUDI_BUILD_AUDI=no \ - -DAUDI_BUILD_PYAUDI=yes \ - -Dpybind11_DIR=$PYAUDI_BUILD_DIR/share/cmake/pybind11/ \ - .. -make -j2 VERBOSE=1 install -python -c "import pyaudi.test; pyaudi.test.run_test_suite()" - -set +e -set +x diff --git a/tools/gha-osx-debug.sh b/tools/gha-osx-debug.sh new file mode 100644 index 00000000..8709fd0c --- /dev/null +++ b/tools/gha-osx-debug.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash + +# Echo each command +set -x + +# Exit on error. +set -e + +# Install conda+deps. +wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh +export deps_dir=$HOME/local +export PATH="$HOME/miniconda/bin:$PATH" +bash miniconda.sh -b -p $HOME/miniconda +conda config --add channels conda-forge +conda config --set channel_priority strict +conda create -y -q -p $deps_dir c-compiler cxx-compiler cmake eigen obake-devel mppp boost boost-cpp pybind11 python=3.10 +source activate $deps_dir + +# Create the build dir and cd into it. +mkdir build + +# Install audi +cd build +cmake \ + -DBoost_NO_BOOST_CMAKE=ON \ + -DCMAKE_INSTALL_PREFIX=$deps_dir \ + -DCMAKE_PREFIX_PATH=$deps_dir \ + -DCMAKE_BUILD_TYPE=Debug \ + -DAUDI_BUILD_AUDI=yes \ + -DAUDI_BUILD_TESTS=yes \ + .. +make VERBOSE=1 install +ctest -j4 -V +cd .. + +# Install pyaudi +mkdir build_pyaudi +cd build_pyaudi +cmake \ + -DBoost_NO_BOOST_CMAKE=ON \ + -DCMAKE_INSTALL_PREFIX=$deps_dir \ + -DCMAKE_PREFIX_PATH=$deps_dir \ + -DCMAKE_BUILD_TYPE=Debug \ + -DAUDI_BUILD_AUDI=no \ + -DAUDI_BUILD_PYAUDI=yes \ + .. +make VERBOSE=1 install +python -c "import pyaudi.test; pyaudi.test.run_test_suite()" + +set +e +set +x diff --git a/tools/travis_osx.sh b/tools/gha-ubuntu-debug.sh similarity index 56% rename from tools/travis_osx.sh rename to tools/gha-ubuntu-debug.sh index e99a0d94..b94308a9 100644 --- a/tools/travis_osx.sh +++ b/tools/gha-ubuntu-debug.sh @@ -6,55 +6,49 @@ set -x # Exit on error. set -e -wget https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -O miniconda.sh; +# Core deps. +sudo apt-get install wget +# Install conda+deps. +wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh export deps_dir=$HOME/local export PATH="$HOME/miniconda/bin:$PATH" -export PATH="$deps_dir/bin:$PATH" - bash miniconda.sh -b -p $HOME/miniconda conda config --add channels conda-forge conda config --set channel_priority strict - -conda_pkgs="cmake eigen obake-devel mppp boost-cpp python=3.7 pybind11 numpy" - -conda create -q -p $deps_dir -y +conda create -y -q -p $deps_dir c-compiler cxx-compiler cmake eigen obake-devel mppp boost boost-cpp pybind11 python=3.10 source activate $deps_dir -conda install $conda_pkgs -y - +# Create the build dir and cd into it. mkdir build # Install audi cd build -CXX=clang++ CC=clang cmake -DBoost_NO_BOOST_CMAKE=ON \ +cmake \ + -DBoost_NO_BOOST_CMAKE=ON \ -DCMAKE_INSTALL_PREFIX=$deps_dir \ -DCMAKE_PREFIX_PATH=$deps_dir \ - -DCMAKE_BUILD_TYPE=${AUDI_BUILD_TYPE} \ + -DCMAKE_BUILD_TYPE=Debug \ -DAUDI_BUILD_AUDI=yes \ - -DAUDI_BUILD_TESTS=yes\ + -DAUDI_BUILD_TESTS=yes \ .. -make -j2 VERBOSE=1 -make install +make VERBOSE=1 install ctest -j4 -V cd .. -# Install pyaudi +# Install pyaudi mkdir build_pyaudi cd build_pyaudi cmake \ -DBoost_NO_BOOST_CMAKE=ON \ -DCMAKE_INSTALL_PREFIX=$deps_dir \ -DCMAKE_PREFIX_PATH=$deps_dir \ - -DCMAKE_BUILD_TYPE=${AUDI_BUILD_TYPE} \ + -DCMAKE_BUILD_TYPE=Debug \ -DAUDI_BUILD_AUDI=no \ -DAUDI_BUILD_PYAUDI=yes \ - -Dpybind11_DIR=$PYAUDI_BUILD_DIR/share/cmake/pybind11/ \ .. -make -j2 VERBOSE=1 -make install +make VERBOSE=1 install python -c "import pyaudi.test; pyaudi.test.run_test_suite()" set +e set +x - diff --git a/tools/gha-windows-release.ps1 b/tools/gha-windows-release.ps1 new file mode 100644 index 00000000..583334ef --- /dev/null +++ b/tools/gha-windows-release.ps1 @@ -0,0 +1,50 @@ +# Powershell script + +# Install conda environment +conda config --set always_yes yes +conda create --name audi cmake eigen obake-devel mppp boost boost-cpp pybind11 python=3.10 +conda activate audi + +# Define environment variables for clang ... +# ... and make them persistent +cmd.exe /c "call `"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat`" && set > %temp%\vcvars.txt" + +Get-Content "$env:temp\vcvars.txt" | Foreach-Object { + if ($_ -match "^(.*?)=(.*)$") { + Set-Content "env:\$($matches[1])" $matches[2] + } +} + +#build and run the dcgp tests +mkdir build +cd build +cmake ` + -G "Ninja" ` + -DCMAKE_C_COMPILER=clang-cl ` + -DCMAKE_CXX_COMPILER=clang-cl ` + -DCMAKE_PREFIX_PATH=C:\Miniconda\envs\audi ` + -DBoost_NO_BOOST_CMAKE=ON ` + -DCMAKE_INSTALL_PREFIX=C:\Miniconda\envs\audi ` + -DAUDI_BUILD_AUDI=yes ` + -DAUDI_BUILD_TESTS=yes .. + +cmake --build . --target install --config Release +ctest -j4 -V -C Release + +cd .. +mkdir build_python +cd build_python + +cmake ` + -G "Ninja" ` + -DCMAKE_C_COMPILER=clang-cl ` + -DCMAKE_CXX_COMPILER=clang-cl ` + -DCMAKE_PREFIX_PATH=C:\Miniconda\envs\audi ` + -DBoost_NO_BOOST_CMAKE=ON ` + -DCMAKE_INSTALL_PREFIX=C:\Miniconda\envs\audi ` + -DAUDI_BUILD_AUDI=no ` + -DAUDI_BUILD_PYAUDI=yes .. + +cmake --build . --target install --config Release + +python -c "from pyaudi import test; test.run_test_suite();" diff --git a/tools/install_travis.sh b/tools/travis-all.sh similarity index 78% rename from tools/install_travis.sh rename to tools/travis-all.sh index f5749280..5c773134 100644 --- a/tools/install_travis.sh +++ b/tools/travis-all.sh @@ -8,7 +8,7 @@ set -e if [[ "${AUDI_BUILD}" == manylinux* ]]; then docker pull ${DOCKER_IMAGE}; - docker run --rm -e TWINE_PASSWORD -e AUDI_BUILD -e TRAVIS_TAG -v `pwd`:/audi $DOCKER_IMAGE bash /audi/tools/install_docker.sh + docker run --rm -e TWINE_PASSWORD -e AUDI_BUILD -e TRAVIS_TAG -v `pwd`:/audi $DOCKER_IMAGE bash /audi/tools/travis-docker.sh fi set +e diff --git a/tools/install_docker.sh b/tools/travis-docker.sh similarity index 88% rename from tools/install_docker.sh rename to tools/travis-docker.sh index 572c2a73..40305265 100644 --- a/tools/install_docker.sh +++ b/tools/travis-docker.sh @@ -20,18 +20,6 @@ else exit 1 fi -# Install pybind11 - -git clone https://github.com/pybind/pybind11.git -cd pybind11 -git checkout 4f72ef846fe8453596230ac285eeaa0ce3278bb4 -mkdir build -cd build -pwd -cmake ../ -DPYBIND11_TEST=NO > /dev/null -make install > /dev/null 2>&1 -cd .. - # Install audi headers cd /audi mkdir build_audi