From 8415ecd4fafca0c7792a89004f663b8220f8f1fb Mon Sep 17 00:00:00 2001 From: George Dan Miron <44091914+gdmiron@users.noreply.github.com> Date: Tue, 15 Dec 2020 17:23:26 +0100 Subject: [PATCH 01/13] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..f4c48f2 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,15 @@ +# C/C++ with GCC +# Build your C/C++ project with GCC using make. +# Add steps that publish test results, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/apps/c-cpp/gcc + +trigger: +- main + +pool: + vmImage: 'ubuntu-latest' + +steps: +- task: Bash@3 + inputs: + filePath: 'ci/pipelines/install.sh' From 411c8aaddc3999858410d5246cfc62896f207381 Mon Sep 17 00:00:00 2001 From: George Dan Miron <44091914+gdmiron@users.noreply.github.com> Date: Tue, 15 Dec 2020 18:07:41 +0100 Subject: [PATCH 02/13] Update install.sh --- ci/pipelines/install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ci/pipelines/install.sh b/ci/pipelines/install.sh index fe1e231..924316f 100644 --- a/ci/pipelines/install.sh +++ b/ci/pipelines/install.sh @@ -28,4 +28,9 @@ cmake -GNinja \ -DCMAKE_INSTALL_LIBDIR=lib \ .. ninja install +if [ $? -eq 1 ] +then +echo "The install failed" >&2 +exit 1 +fi conda list From 98b121d175823606d1173cdb62db555e5144c90a Mon Sep 17 00:00:00 2001 From: George Dan Miron <44091914+gdmiron@users.noreply.github.com> Date: Wed, 16 Dec 2020 14:08:12 +0100 Subject: [PATCH 03/13] Update install.sh --- ci/pipelines/install.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/ci/pipelines/install.sh b/ci/pipelines/install.sh index 924316f..1e4c4a4 100644 --- a/ci/pipelines/install.sh +++ b/ci/pipelines/install.sh @@ -27,10 +27,19 @@ cmake -GNinja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_LIBDIR=lib \ .. +if [ $? -eq 0 ] +then + echo "The cmake step ran OK" +else + echo "The cmake step failed" >&2 + exit 1 +fi ninja install -if [ $? -eq 1 ] +if [ $? -eq 0 ] then -echo "The install failed" >&2 -exit 1 + echo "The make step ran OK" +else + echo "The make step failed" >&2 + exit 1 fi conda list From c32491ffee597be288e03f30f7da9cf6f02cc1be Mon Sep 17 00:00:00 2001 From: George Dan Miron <44091914+gdmiron@users.noreply.github.com> Date: Wed, 16 Dec 2020 14:09:04 +0100 Subject: [PATCH 04/13] Create install-osx.sh --- ci/pipelines/install-osx.sh | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 ci/pipelines/install-osx.sh diff --git a/ci/pipelines/install-osx.sh b/ci/pipelines/install-osx.sh new file mode 100644 index 0000000..b8394d4 --- /dev/null +++ b/ci/pipelines/install-osx.sh @@ -0,0 +1,42 @@ +if [ ! -f $HOME/miniconda/bin/conda ]; then + echo "Downloading and installing miniconda" + wget -O miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh + rm -rf $HOME/miniconda + bash miniconda.sh -b -p $HOME/miniconda +fi +if [ ! -f $HOME/miniconda/bin/conda ]; then + echo ERROR: conda was not installed. + exit 1 +fi +bash $HOME/miniconda/etc/profile.d/conda.sh +export PATH=$HOME/miniconda/bin/:$PATH +conda config --set always_yes yes --set changeps1 no +conda config --add channels conda-forge +conda install conda-devenv +conda update -q conda +conda info -a +conda devenv +source activate thermohubclient +mkdir build +cd build +# Configure step +cmake -GNinja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR=lib \ + .. +if [ $? -eq 0 ] +then + echo "The cmake step ran OK" +else + echo "The cmake step failed" >&2 + exit 1 +fi +ninja install +if [ $? -eq 0 ] +then + echo "The make step ran OK" +else + echo "The make step failed" >&2 + exit 1 +fi +conda list From 084411d1796a1b3ddea721121e3de9a39605bada Mon Sep 17 00:00:00 2001 From: George Dan Miron <44091914+gdmiron@users.noreply.github.com> Date: Wed, 16 Dec 2020 14:16:51 +0100 Subject: [PATCH 05/13] Update environment.devenv.yml --- environment.devenv.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.devenv.yml b/environment.devenv.yml index 1d77368..02b641a 100644 --- a/environment.devenv.yml +++ b/environment.devenv.yml @@ -13,7 +13,7 @@ dependencies: - nlohmann_json - curl - velocypack - - jsonarango + - jsonarango>=0.3.0 - pytest - python={{ python_version }} From 7b878754a046a26b0faf258d740648fb298f0eca Mon Sep 17 00:00:00 2001 From: George Dan Miron <44091914+gdmiron@users.noreply.github.com> Date: Wed, 16 Dec 2020 14:48:07 +0100 Subject: [PATCH 06/13] Update environment.devenv.yml --- environment.devenv.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/environment.devenv.yml b/environment.devenv.yml index 02b641a..bf3d6de 100644 --- a/environment.devenv.yml +++ b/environment.devenv.yml @@ -3,8 +3,8 @@ name: thermohubclient {% set python_version = os.environ.get("PY_VER", "3.7") %} dependencies: - - gxx_linux-64=7.3.0 # [linux] - - cmake>=3.13 + - gxx_linux-64>=9.3.0 # [linux] + - cmake>=3.7 - ninja # [unix] - make # [win] - git From 66b7b48cb9b60091d8dfa0adf5d35293524c4753 Mon Sep 17 00:00:00 2001 From: George Dan Miron <44091914+gdmiron@users.noreply.github.com> Date: Wed, 16 Dec 2020 15:02:09 +0100 Subject: [PATCH 07/13] Update environment.devenv.yml --- environment.devenv.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/environment.devenv.yml b/environment.devenv.yml index bf3d6de..8a24d8b 100644 --- a/environment.devenv.yml +++ b/environment.devenv.yml @@ -4,14 +4,14 @@ name: thermohubclient dependencies: - gxx_linux-64>=9.3.0 # [linux] - - cmake>=3.7 + - cmake - ninja # [unix] - make # [win] - git - ccache # [unix] - pybind11 - nlohmann_json - - curl + - curl # [unix] - velocypack - jsonarango>=0.3.0 - pytest From 5dc5a32fc77c1431346ca1168281afc9949f337b Mon Sep 17 00:00:00 2001 From: George Dan Miron <44091914+gdmiron@users.noreply.github.com> Date: Wed, 16 Dec 2020 15:11:27 +0100 Subject: [PATCH 08/13] Update environment.devenv.yml --- environment.devenv.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/environment.devenv.yml b/environment.devenv.yml index 8a24d8b..76cfa7a 100644 --- a/environment.devenv.yml +++ b/environment.devenv.yml @@ -4,14 +4,14 @@ name: thermohubclient dependencies: - gxx_linux-64>=9.3.0 # [linux] + - ninja # [win] + - make # [unix and osx] - cmake - - ninja # [unix] - - make # [win] - git - ccache # [unix] - pybind11 - nlohmann_json - - curl # [unix] + - curl - velocypack - jsonarango>=0.3.0 - pytest From a46efb7389e4f89e9def767b75194bd00bda9f94 Mon Sep 17 00:00:00 2001 From: George Dan Miron <44091914+gdmiron@users.noreply.github.com> Date: Wed, 16 Dec 2020 15:23:41 +0100 Subject: [PATCH 09/13] Update appveyor.yml --- appveyor.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 4dde85d..5351852 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -29,4 +29,5 @@ build_script: test_script: - conda list - - call ci\appveyor\test.bat + - call python -c "import thermohubclient" +# - call ci\appveyor\test.bat From dfec5ef3bfe1ab316f99708a0f5c50954e4c6b9a Mon Sep 17 00:00:00 2001 From: George Dan Miron <44091914+gdmiron@users.noreply.github.com> Date: Wed, 16 Dec 2020 15:31:47 +0100 Subject: [PATCH 10/13] Update test.bat --- ci/appveyor/test.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/appveyor/test.bat b/ci/appveyor/test.bat index b166c58..2eac137 100644 --- a/ci/appveyor/test.bat +++ b/ci/appveyor/test.bat @@ -2,3 +2,4 @@ REM call build\test\%CONFIGURATION%\tests.exe call conda activate thermohubclient call python -c "import thermohubclient" call pytest -ra -vv --color=yes . +if errorlevel 1 exit 1 From c45263755055560e257ebf9b9df6ae5710b50726 Mon Sep 17 00:00:00 2001 From: George Dan Miron <44091914+gdmiron@users.noreply.github.com> Date: Wed, 16 Dec 2020 15:32:08 +0100 Subject: [PATCH 11/13] Update appveyor.yml --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 5351852..9becaaa 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -29,5 +29,5 @@ build_script: test_script: - conda list - - call python -c "import thermohubclient" -# - call ci\appveyor\test.bat +# - call python -c "import thermohubclient" + - call ci\appveyor\test.bat From f44d0451c35968248f269ec7699153b561db1d6e Mon Sep 17 00:00:00 2001 From: George Dan Miron <44091914+gdmiron@users.noreply.github.com> Date: Wed, 16 Dec 2020 15:45:54 +0100 Subject: [PATCH 12/13] Update test.bat --- ci/appveyor/test.bat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/appveyor/test.bat b/ci/appveyor/test.bat index 2eac137..6bed8a0 100644 --- a/ci/appveyor/test.bat +++ b/ci/appveyor/test.bat @@ -2,4 +2,5 @@ REM call build\test\%CONFIGURATION%\tests.exe call conda activate thermohubclient call python -c "import thermohubclient" call pytest -ra -vv --color=yes . -if errorlevel 1 exit 1 +if errorlevel <0 ( echo Unknown appveyor exitcode %errorlevel% +exit 0 ) From cf8c6b00587ab9eac178a8edbce1d1456c13cf14 Mon Sep 17 00:00:00 2001 From: George Dan Miron <44091914+gdmiron@users.noreply.github.com> Date: Wed, 16 Dec 2020 15:58:30 +0100 Subject: [PATCH 13/13] Update test.bat --- ci/appveyor/test.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/appveyor/test.bat b/ci/appveyor/test.bat index 6bed8a0..6079a04 100644 --- a/ci/appveyor/test.bat +++ b/ci/appveyor/test.bat @@ -2,5 +2,5 @@ REM call build\test\%CONFIGURATION%\tests.exe call conda activate thermohubclient call python -c "import thermohubclient" call pytest -ra -vv --color=yes . -if errorlevel <0 ( echo Unknown appveyor exitcode %errorlevel% +if errorlevel -1073741819 ( echo Unknown appveyor exitcode %errorlevel% exit 0 )