diff --git a/.appveyor.yml b/.appveyor.yml index 4cf1e7693..09e961dd3 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -8,34 +8,26 @@ build: cache: - c:\tools\vcpkg\installed\ -> testing\dependencies\appveyor\install.bat - c:\msys64\var\cache\pacman\pkg -> testing\dependencies\appveyor\install.bat - - c:\Deps\boost_1_67_0 -> testing\dependencies\appveyor\boost.bat - c:\Deps\conda\ -> testing\dependencies\appveyor\anaconda.ps1 + - c:\Deps\boost_1_67_0 -> testing\dependencies\appveyor\boost.bat image: - Visual Studio 2017 environment: # Create expected SHELL variable for pipenv. - SHELL: "windows" - CTEST_OUTPUT_ON_FAILURE: "1" + SHELL: 'windows' + CTEST_OUTPUT_ON_FAILURE: '1' matrix: - - CMAKE_GENERATOR: "MSYS Makefiles" - BUILDFLAGS: "VERBOSE=1" - CMAKEARGS: "" - - CMAKE_GENERATOR: "Visual Studio 15 2017 Win64" - BUILDFLAGS: "/verbosity:normal" - CMAKEARGS: "" - - CMAKE_GENERATOR: "Ninja" - BUILDFLAGS: "-v" - CMAKEARGS: "" - - CMAKE_GENERATOR: "MSYS Makefiles" - ANACONDA_TESTS_ONLY: "1" - BUILDFLAGS: "VERBOSE=1" - CMAKEARGS: "" - - CMAKE_GENERATOR: "Visual Studio 15 2017 Win64" - ANACONDA_TESTS_ONLY: "1" - BUILDFLAGS: "/verbosity:normal" - CMAKEARGS: "" + - CMAKE_GENERATOR: 'MSYS Makefiles' + BUILDFLAGS: 'VERBOSE=1' + - CMAKE_GENERATOR: 'Visual Studio 15 2017 Win64' + BUILDFLAGS: '/verbosity:normal' + - CMAKE_GENERATOR: 'Ninja' + BUILDFLAGS: '-v' + - CMAKE_GENERATOR: 'Visual Studio 15 2017 Win64' + BUILDFLAGS: '/verbosity:normal' + ANACONDA_TESTS_ONLY: '1' matrix: fast_finish: true diff --git a/chapter-11/recipe-04/cxx-example/custom.sh b/chapter-11/recipe-04/cxx-example/custom.sh index 69b797f41..c17938e1e 100755 --- a/chapter-11/recipe-04/cxx-example/custom.sh +++ b/chapter-11/recipe-04/cxx-example/custom.sh @@ -19,19 +19,23 @@ cp ../example.cpp . if [[ "$OSTYPE" == "msys" ]]; then conda.exe config --set always_yes yes --set changeps1 no - conda.exe build conda-recipe + conda.exe build --no-anaconda-upload conda-recipe - conda.exe install --use-local conda-example-simple + conda.exe install --no-update-dependencies --use-local --yes conda-example-simple hello-conda.exe + + conda.exe clean --all --yes else PATH=$HOME/Deps/conda/bin${PATH:+:$PATH} - conda build conda-recipe + conda build --no-anaconda-upload conda-recipe - conda install --use-local conda-example-simple + conda install --no-update-deps --use-local --yes conda-example-simple hello-conda + + conda clean --all --yes fi exit $? diff --git a/chapter-11/recipe-04/cxx-example/menu.yml b/chapter-11/recipe-04/cxx-example/menu.yml index 53a7bfba7..aa19cf4b7 100644 --- a/chapter-11/recipe-04/cxx-example/menu.yml +++ b/chapter-11/recipe-04/cxx-example/menu.yml @@ -1,3 +1,3 @@ local: env: - - VERBOSE_OUTPUT: 'True' + - VERBOSE_OUTPUT: 'ON' diff --git a/chapter-11/recipe-05/cxx-example/conda-recipe/meta.yaml b/chapter-11/recipe-05/cxx-example/conda-recipe/meta.yaml index 69ef03773..458073a0b 100644 --- a/chapter-11/recipe-05/cxx-example/conda-recipe/meta.yaml +++ b/chapter-11/recipe-05/cxx-example/conda-recipe/meta.yaml @@ -17,6 +17,7 @@ requirements: - cmake >=3.5 - {{ compiler('cxx') }} host: + - intel-openmp 2018 - mkl-devel 2018 about: diff --git a/chapter-11/recipe-05/cxx-example/custom.sh b/chapter-11/recipe-05/cxx-example/custom.sh index 9f7e0aaa8..97e52e780 100755 --- a/chapter-11/recipe-05/cxx-example/custom.sh +++ b/chapter-11/recipe-05/cxx-example/custom.sh @@ -19,19 +19,23 @@ cp ../example.cpp . if [[ "$OSTYPE" == "msys" ]]; then conda.exe config --set always_yes yes --set changeps1 no - conda.exe build conda-recipe + conda.exe build --no-anaconda-upload conda-recipe - conda.exe install --use-local conda-example-dgemm + conda.exe install --no-update-deps --use-local --yes conda-example-dgemm dgemm-example.exe + + conda.exe clean --all --yes else PATH=$HOME/Deps/conda/bin${PATH:+:$PATH} - conda build conda-recipe + conda build --no-anaconda-upload conda-recipe - conda install --use-local conda-example-dgemm + conda install --no-update-deps --use-local --yes conda-example-dgemm dgemm-example + + conda clean --all --yes fi exit $? diff --git a/chapter-11/recipe-05/cxx-example/menu.yml b/chapter-11/recipe-05/cxx-example/menu.yml index 53a7bfba7..fd571f799 100644 --- a/chapter-11/recipe-05/cxx-example/menu.yml +++ b/chapter-11/recipe-05/cxx-example/menu.yml @@ -1,3 +1,7 @@ +appveyor-vs: + env: + - VERBOSE_OUTPUT: 'ON' + local: env: - - VERBOSE_OUTPUT: 'True' + - VERBOSE_OUTPUT: 'ON' diff --git a/contributing/README.md b/contributing/README.md index 9b34073ae..1d739bc76 100644 --- a/contributing/README.md +++ b/contributing/README.md @@ -24,8 +24,9 @@ To update the README files, run `python contributing/generate-readmes.py` - this #### Indentation -We use 2 spaces instead of 4 spaces to reduce the printed page width. -No tabs. +We use 2 spaces instead of 4 spaces to reduce the printed page width. No tabs. +Get the integration for [EditorConfig](https://editorconfig.org/) in your +favorite editor to help you keep the conventions. #### Case of commands diff --git a/testing/README.md b/testing/README.md index 8ed232e34..7d3120db7 100644 --- a/testing/README.md +++ b/testing/README.md @@ -70,6 +70,22 @@ appveyor-msys: - 'MSYS Makefiles' ``` +## When to use `failing_generators` and `skip_generators` + +Marking generators as expected failures or skipping them achieves more or less +the same goal: not failing CI for recipes that are known not to work under +certain conditions. Using `failing_generators` means that the recipe is actually +tested, but the possible failure is not elevated to an error; whereas using +`skip_generators` will skip the testing altogether. +The semantic to differentiate the use of the two is thus: +1. Use `failing_generators` if the recipe does not work under the current CI set + up, but _it could be made_ to work. As an example, the Ninja is always marked as + an expected failure for Fortran recipes, since its set up is rather contrived, + requiring specific versions specific versions of CMake _and_ Ninja. + The hurdle could however be overcome in the future. +2. Use `skip_generators` when _you cannot foresee any way_ to make the recipe work. + This is the case for the Fortran recipes with the Visual Studio generators. + ## Bulding targets diff --git a/testing/collect_tests.py b/testing/collect_tests.py index 28f61cfc8..c8ba333cf 100644 --- a/testing/collect_tests.py +++ b/testing/collect_tests.py @@ -55,6 +55,8 @@ def run_command(*, step, command, expect_failure): # Stream stderr always stderr_streamer = functools.partial(streamer, file_handle=sys.stderr) stderr = '' + # subprocess.Popen can be managed as a context and allows us to stream + # stdout and stderr in real-time with subprocess.Popen( cmd, bufsize=1, @@ -166,6 +168,7 @@ def run_example(topdir, generator, ci_environment, buildflags, recipe, example): custom_script = 'custom.sh' custom_script_path = cmakelists_path / custom_script if custom_script_path.exists(): + sys.stdout.write('\nRunning a custom.sh script\n') # if this directory contains a custom.sh script, we launch it step = custom_script command = 'bash "{0}" "{1}"'.format(custom_script_path, build_directory)